Skip to main content
Actions are tools your Chatbase AI agent can use during a conversation to trigger a task, pull in data, or hand off to a person, so it can resolve requests instead of only replying to them. Each Action connects your AI agent to a specific tool or workflow, such as a Shopify order lookup, a Calendly booking, a support ticket, or your own API. You choose which channels each Action works on, from the Chat Bubble on your website to WhatsApp, Instagram, email, and phone. You add and configure Actions in Build > Actions. The AI agent decides when to call each Action based on the When to use instructions you write for it.
You can create more than one Action of the same type. For example, Escalations on your website and Escalations on Instagram, in case they need separate When to use rules or different data to collect from the customer before opening the ticket.
Saving puts your changes in a draft. Your customers see them once you click Publish in the top-right corner. A few settings go live as soon as you save. See Drafts and versions.

Available Actions

Support and handoff

Commerce

Lead capture

Scheduling

Other

Available AI Actions

How the AI agent decides to call an Action

An enabled Action is a tool the AI agent can use, not a script it must run. The AI agent can call an Action only when all of these are true:
  1. The Action is enabled on your AI agent.
  2. The Action is turned on for the current channel. See Channels.
  3. The request matches the Action’s When to use instructions, or a Procedure step references the Action with @action_name.
If Only use in Procedures is on, the Action runs only from a Procedure step, never on the AI agent’s own judgment. If the Action has a message-number trigger, the AI agent can call it only on the customer messages you picked. With empty AI instructions, it calls the Action on each of those messages without deciding.

Write clear When to use instructions

The When to use field tells the AI agent when an Action applies, and a vague one is a common reason an Action never fires or fires at the wrong time. A descriptive Action name, such as create_ticket_refunds, also helps the AI agent understand what the Action is for. Describe the situation in the phrases customers actually type, and say when not to use the Action if another Action could match the same request. For example, a When to use for a Shopify order lookup could read:

Example: a customer asks where their order is

This example uses the Shopify Retrieve and display orders Action (named Get_Orders by default), enabled for the Chat Bubble.
1

The customer asks a question

A shopper on your store opens the Chat Bubble and types “Where is my order?”
2

The AI agent picks the Action

The AI agent checks which Actions are available on the Chat Bubble. The request matches the When to use of Get_Orders, so the AI agent calls it.
3

The AI agent identifies the order

If the shopper is signed in to your Shopify store, their orders are retrieved directly from their account. A guest is asked to verify the order with their checkout email and order number, or their phone number and order number. If Search by confirmation number is on, the confirmation number works in place of the order number. See Signed-in and guest customers.
4

The AI agent replies from the result

The Action pulls the order status directly from Shopify, and the AI agent writes its reply from it. A shipped order appears as Shipped, or On its way once the carrier reports it in transit.
This reply costs twice the model’s usual credits, because the AI agent used the model once to call the Action and once to write the reply. See Credit usage.

Channels

Every Action has a Channels section in its configuration that controls where the Action is available. Channels appear in one of three states: If you use Missions (Beta), an Action that missions support can also be turned on or off for Missions here. Turn it off to keep the Action out of every mission. Configured and unconfigured describe your own setup, so the same Action shows a different split on different AI agents. Incompatible is a property of the Action itself: those channels never become selectable, no matter how you set the channel up.
Enabling an Action on a channel doesn’t force it to run there. It only makes the Action available, and the AI agent still decides when to call it based on your When to use instructions.
See Channels for what each channel is and how to set it up.

Only use in Procedures

Every Action has an Only use in Procedures setting in its configuration. Turn it on when you want the Action to run only as a step inside a Procedure, never on the AI agent’s own initiative. When enabled, the Action stays fully functional, but the AI agent won’t call it based on its own judgment; it fires only when a Procedure step references it with @action_name. Because the AI agent no longer decides when to use it, its When to use field is hidden. Use it for high-control or sensitive tools (refunds, cancellations, escalations) that should fire only at the right point in a defined flow. See How Procedures run for how this behaves at runtime.
The Only use in Procedures setting on an Action

Trigger on a message number

Collect Leads, Custom Action, Slack, and Escalations Actions can run based on how many messages the customer has sent. For example, show the leads form on the customer’s second message, or notify Slack on their fifth. To set it up, open the Action’s When to use section, turn on Trigger based on message number, and pick a Message frequency:
The Message frequency options under Trigger based on message number
Only the customer’s messages are counted, per conversation. The first message the customer sends is message 1. The AI agent’s replies, including the welcome message, don’t count. On WhatsApp, Instagram, and Messenger, messages a customer sends in a row before the AI agent replies each count separately. If a customer sends messages 2, 3, and 4 together, an Action set to message 3 still runs. When the trigger is on, the AI instructions box becomes optional. Choose a setup based on what you want:
  • Run on set messages, whatever the customer says: leave AI instructions empty. The AI agent runs the Action on every matching message, once, before it replies. For example, show the leads form on the customer’s first message, whatever they asked.
  • Run on set messages, only when a condition is met: describe the condition in AI instructions. On a matching message, the AI agent runs the Action only if the condition applies. For example, set the message to 3 and write “Show the form if the customer asks about pricing.”
Put message counts in the trigger, not in AI instructions. The trigger counts messages exactly, while an instruction such as “after 10 messages” is up to the model and doesn’t run reliably. On every other message the Action isn’t available, even if the customer asks for it. To let customers trigger it on any message, turn the trigger off and describe when to use it in AI instructions. The trigger setting is hidden when Only use in Procedures is on, because a Procedure step then decides when the Action runs. For example, this Collect Leads Action is set to On specific user messages with 2 and empty AI instructions:
A Collect Leads Action set to run on user message 2, with empty AI instructions
The AI agent answers the customer’s first message as usual. On the second message, it answers and shows the leads form, even though the customer didn’t ask to be contacted:
The leads form shown with the AI agent's reply to the customer's second message

Use cases

A Slack Action with empty AI instructions posts to the first channel in the workspace. To post to another channel, name it in AI instructions, and the AI agent then decides on each matching message whether to notify. A Show Widget Action runs on the Chat Bubble, Help Page, Center Stage, and the mobile SDKs.

Actions vs. Procedures vs. instructions

For example, a Shopify return can run as a single Action the AI agent calls when a customer asks. If you want the AI agent to look up the order and ask for a photo before the return goes through, put those steps in a Procedure and turn on Only use in Procedures on the return Action. See Keeping high-stakes Actions on rails for a full example.

Credit usage

Actions use message credits based on your AI agent’s model. When the AI agent triggers an Action, it uses the model twice: once to run the Action, and once to write the reply from the result. So a reply that triggers an Action costs twice the model’s usual credits. See Models comparison for how many credits each model uses.

Frequently asked questions

Check that the Action is enabled, turned on for the customer’s channel, and has a When to use that matches how customers phrase the request. If Only use in Procedures is on, an active Procedure must reference it with @action_name. If Trigger based on message number is on, the Action can run only on the messages you picked. Some Actions have their own requirements: several Shopify Actions work only for signed-in customers.
It can, but an Action that’s set up correctly shouldn’t fail in normal use. When an Action fails, the AI agent writes its own reply based on the error, so the wording depends on the Action and the error. An Action that depends on another system can return an error, for example a Custom Action whose response is larger than 20KB. Some Actions let you set what happens next: if a phone transfer can’t be completed, the AI agent says your failure message and keeps helping the caller. To review Action outcomes, filter Activity by Action result.
It depends on your plan. See the pricing page for the Action limit on each plan.
Yes. A reply that triggers an Action uses the model twice, once to run the Action and once to write the reply, so it costs twice the model’s usual credits. See Credit usage.
Saving an Action puts it in your draft, and the Playground always uses your draft. Send a message that should trigger the Action and check the reply. When it works, publish it and run Tests with expected Actions to check that the AI agent calls the right Action. Tests run against your published AI agent, not your draft.