Skip to content

Let your AI agent take actions

Give your AI agent functions to look up an order, book a slot or return fixed information during a conversation.

2 min read

A function is something your AI agent can do mid-conversation, such as checking an order’s status in your own system. You create a function once, then switch it on for any AI agent.

Before you start

Pro and Business plansNeeds: Custom functions: Write
  • For a webhook function: a web address (API) of your own system that answers over HTTPS with JSON.
  1. Go to AI AgentsCustom Functions and click New Function.

  2. Type a Function Name in lowercase with underscores, such as check_order_status.

  3. Write a Description that tells the AI agent exactly when to use it, such as “Use when the customer asks where their order is.”

  4. Choose a Function Type:

    • Static Data: returns fixed text you write under Response Data, such as your returns policy.
    • Webhook (External API): calls your system. Enter the Endpoint URL, choose the HTTP Method, and add any Headers your system needs, such as an authorisation key. Header values are stored securely and never shown again.
  5. Under Parameters, click Add Parameter for each piece of information the AI agent must get from the customer first, such as order_id. Give each a Type and a Description. To put a parameter in the address, write it in braces: https://api.example.com/orders/{{order_id}}.

  6. For a webhook, click Test Webhook to check your system answers. The test uses sample values.

  7. Click Add Function.

    You should see ”Custom function created successfully!” and the function on the page.
  1. Go to AI Agents and open the AI agent.
  2. Open the Actions tab, click the functions it may use, and click Save.

Try it on the Test tab: the answer’s Tool calls show what the function did. See Test your AI agent.

  • Your system has up to 10 seconds to answer (5 by default; set Timeout (seconds)). The AI agent reads up to 10 KB of the answer.
  • An AI agent can have up to 20 functions.
  • A function in use can’t be deleted. Switch it off on each AI agent first.
  • Changing a function changes it for every AI agent that uses it.
  • To see who changed a function, click History on its card.