Skip to content
Docs
Esc
↑↓navigate↵open⌘Jpreview
On this page

Trigger conditions

Guide your agent on when to use an action or show a standalone widget by describing what the visitor is asking for or trying to do.

When to use (or When to notify, When to escalate, and When to collect on specific actions) tells your agent when to use an action. A standalone widget’s When to show field tells the agent when to display that widget on its own.

How it works

Every enabled action included in your plan—and on for the current channel—is available to your agent on every turn. There is no separate pre-check that hides actions until a message matches. Instead, your agent reads each action’s When to use text and decides whether to call it based on the conversation.

A few rules always apply:

  • Required inputs come first. An action never runs until all of its required inputs are provided. If something is missing—such as an order number or email address—the agent asks the visitor for it before running the action.
  • Visitor-provided details only. The agent only passes details the visitor actually wrote in the conversation, or known details from User identification. It does not invent values, guess a name from an email address or URL, or reuse contact details from your knowledge sources.
  • No false claims or impossible promises. The agent never says an action ran when it didn’t, and never promises things no enabled action can do (such as saying “someone will call you tomorrow” or booking an appointment when no action arranges calls or bookings). If you want your agent to book, submit, notify, or arrange something, enable an action that does it.

The details an action needs come from its own settings, such as a Custom API action’s input fields or Collect Leads’ form fields. Your When to use text only needs to describe what the visitor wants.

Default guidance

Built-in actions come with visible default guidance that you can edit at any time:

  • Collect Leads (Smart lead collection on): pre-fills When to collect with default sales and follow-up guidance. Select Use default to restore it. With Smart lead collection off, leaving When to use blank shows the lead form after the visitor’s first message.
  • Escalate to Human: pre-fills When to escalate for the escalation method you chose (Live chat or Create ticket), and updates automatically if you switch methods before editing it.
  • Slack Notification, Web Search, and Salesforce: Create Ticket: each starts with default guidance you can customize.
  • Custom API and MCP Server: start blank so you can describe your own task. For MCP Server, When to use is optional guidance across the server’s enabled tools.

Set when a widget appears

In your agent, go to Build > Widgets, open and enable a widget, then select Settings. Write When to show in plain language, such as “When the visitor wants to book a call or see open times.” Every enabled standalone widget is available to the agent on each turn, and the agent uses When to show to decide when to display it. Leave it empty to let the agent decide on its own. Selecting the widget in any Custom API action prevents standalone display, even if that action is disabled.

Standalone widgets can appear in the web widget, Public Chat, and Playground. They do not appear on WhatsApp or in REST API conversations. You can also select an enabled widget in a Custom API action to show it after that action receives a successful JSON response.

Write When to show like an action’s When to use: describe the visitor’s goal, not the widget’s fields, and keep it specific enough that the widget appears only when it’s helpful.

Focus on what the visitor is trying to do

Write the guidance around the visitor’s goal. Don’t require the details the action needs to collect: if you tell the agent to use the action only when the visitor gives an order number or email upfront, the agent may not realize it should ask for that detail first.

Too narrow Better
“When the visitor asks for order status and gives an order number.” “When the visitor asks where their order is or when it will arrive.”
“When the visitor gives their phone number and preferred time for a call.” “When the visitor asks for a callback or wants to schedule a call with sales.”
“When the visitor provides their email address and reason for a return.” “When the visitor wants to return or exchange an item.”

Then mark those details as required in the action’s settings. For example, add Order number as a required input field:

Visitor: Where’s my order?

Agent: I can check that for you. What’s your order number?

Visitor: A-1234

Agent: Order A-1234 has shipped and should arrive on Friday.

Be specific about the goal

Your guidance still needs to be clear about which situations it covers:

Too vague Better
“When the user wants help.” “When the visitor asks to speak to a person, or is frustrated after two attempts to solve the problem.”
“Order questions.” “When the visitor wants to know where their order is, or when it will arrive.”
“Search the web.” “When the visitor asks about recent news, current prices, or public facts that may have changed.”

Examples

Action When to use
Check order status When the visitor wants to know where their order is, or when it will arrive.
Check stock When the visitor wants to know if a product is in stock or available in a size or color.
Book a callback When the visitor wants someone from the team to call them back.
Start a return When the visitor wants to return or exchange an item they bought.
Cancel a subscription When the visitor wants to cancel their subscription. Don’t use it when they only ask how cancellation works.
Web search When the visitor asks about recent news, current prices, or public facts that may have changed. Don’t search for questions about our own products.

Tips

  • Describe the goal, not the required inputs. The action’s own settings handle collecting any missing details.
  • Write in plain, everyday language. Think of what visitors actually ask for, such as tracking an order, booking a demo, or speaking to someone.
  • Say when not to use it, if it matters, like the Cancel a subscription example above.
  • Keep one goal per action. If two tasks need different details, create two actions.
  • Join alternatives with “or”. Write separate cases clearly with “or”, such as “When the visitor asks for a catalog, or asks for the form again after dismissing it.”
  • Test in the Playground. Try real messages that should, and shouldn’t, use the action, including a first message that leaves out required details. The Playground runs actions as your web widget would, and its action steps show which actions ran and what they sent and received. For Custom API, also see Test it.
  • Improve with AI. Select Improve to rewrite the current text more clearly with AI, or Undo to switch back. Improving uses a small amount of credit.

Channels

An action is only available to the agent on the channels you’ve switched on in its Channels settings.