Masuk

Inbox

Automations

An automation is a rule that runs by itself: when something happens (a message, a keyword, a business event like a new order, what the customer wants, or what the AI reads in the chats), it runs a list of steps you put together, such as replying, letting the AI write a reply, assigning, tagging, adding the contact to an audience, calling a webhook or a plugin's action. Rules run in Priority order (lower first) before the AI agent, and every one that matches runs.

Create a rule

Open Automations → New rule and fill in:

  1. Basics: Name, Priority (lower runs first) and Active.
  2. When (the trigger), below.
  3. Channels: the channels it applies to. Leave all unselected to apply to every channel.
  4. Only if (optional): checks on the contact, conversation, message or event, joined by All match or Any matches. Operators: equals, does not equal, contains, does not contain, starts with, ends with, matches regex, greater/less than, at least/most, is one of, is not one of, is empty, is not empty.
  5. Then: the steps it runs, in order (below), then Afterwards and its Cooldown.

The Assistant can also write a rule for you: say what should happen, like Setiap ada order assign ke team sales, and it shows an Automation card in plain words. Nothing exists until you press Create; Edit opens it here first. See Assistant.

Triggers

TriggerFires on
Every messageAny customer message
First message of a conversationA new conversation, or one reopened by the customer
Message contains keywordsComma-separated keywords: Any keyword, All keywords or Exact message, optionally Case sensitive
Message matches a regexA Pattern with Flags (needs a plan with regex)
Outside business hoursAny message while you're closed. Use the workspace's business hours follows the hours set once in Settings › General (Business hours); turn it off to give this rule its own Business hours and Timezone
A business eventAn event from the event API, a stream an AI agent listens to, or a plugin, like the store's order.created or order.paid. * matches anything: order.* is every order event. The rule runs on the contact's latest conversation; an event that names no contact runs nothing
The customer wants…What the customer wants, read by the AI on each burst of messages, like order_status or refund_request. Needs Sentiment & intent (Settings › AI): the editor shows Turn on Sentiment & intent when it's off. The AI picks from the intents your rules wait for, so a rule never misses one worded differently. Runs once per message
The AI decides…A rule in plain words, judged on the contact's chats: see AI rules

Then

Then is a list of steps that run top to bottom. Add action offers them in groups; each step is a card you open to set it up, move with the arrows or remove. Text settings are templates, so <%= contact.name.first %> works.

GroupActionWhat it does
MessageReplySends a message to the customer
AIAI replyThe AI writes the reply from your prompt (optionally As the AI agent of your choice, with its persona); Send it or Leave it as a draft for the team (a private note)
AIAI noteThe AI writes a private note from your prompt (a summary, what to do next)
AIAI fills a fieldThe AI reads the chat and fills a contact field; nothing is set when the chat doesn't say
ConversationTag the conversation, Assign, Set status, Set priority, Private note, Hand over / AIChange the chat. Assign: a team (its automatic assignment then picks someone), a teammate, an AI agent or unassigned; a chat a teammate has is left alone unless Reassign even if someone has it
ContactTag the contact, Set a contact field, Add to an audienceChange the person (an audience here is a list you add people to). Remove instead of add takes a tag or audience off
Notify and webhooksNotify teammatesA notification (one per rule while unread; each run adds to its count)
Notify and webhooksWebhookPOSTs the contact, conversation, message and earlier steps' results as JSON to your https address, signed with Signing secret
Pluginsthe plugin's actionsActions your installed plugins offer for automations, with their settings as a form

Only if on a step runs it only when its checks pass. A step's results can be read by later steps as steps.<step id>.…, for example steps.ai_reply.text, steps.webhook.body.order_id or a plugin action's result, in their text and their Only if.

AI steps use AI tokens, need AI assist on your plan and count in the day's AI runs. They treat the customer's words as data and answer in the customer's language. Steps that take longer (AI, webhooks, plugins) run in the background right after the fast ones; a failed step doesn't stop the next one, tries again when it was a passing problem, and tells the people who manage automations once a day.

Afterwards (not on AI rules): Continue (later rules and the AI may go on), Stop here (no later rule, no AI answer), Hand over to the team, Pause the AI, Resume the AI. A rule that replies keeps the AI agent off that message.

On a phone, Save stays at the bottom of the screen with what the rule does in one line.

Each change shows in the chat with the rule's name, for example Assigned to Sales · by Orders to sales. Pause rule on that line turns the rule off.

When several rules match

They run in priority order. Only the first one with a Reply or AI reply step answers. An action an earlier rule already took in the same run (assign, status, priority) is skipped and logged. Stop here ends the run. A rule's actions never set off other rules, and rules skip conversations a plugin handles.

AI rules

An AI rule (trigger The AI decides…) lets the AI apply a tag or fill a contact field from the chats, so you can find contacts like Purchaser or Hot lead in a filter or a Broadcast audience.

  1. Rule: write it in plain words (up to 300 characters), for example The customer paid for an order or confirmed a purchase.
  2. Set on the contact: the tag or field it sets.
  3. Mode:
ModeTagsFields
KeepAdded once, never removed by the AIFilled once when empty
FollowAdded and removed as the chats change (the AI only removes a tag it added)Updated when the chats say something new
  1. Then (optional): steps that run on the contact and their latest conversation when the AI adds the tag or sets the field, once per conversation: anything except replies and hand-overs (status only Open or Pending), for example Assign, Tag the conversation, AI note, Add to an audience, Notify teammates, a webhook or a plugin action. In Follow mode, when the AI removes the tag, the rule's conversation tags come off that conversation too.

Never by AI on a tag (Settings › Tags) or field (Settings › Contact fields) keeps the AI off it whatever a rule or a customer says; use it for tags that give prices or discounts. The same dialogs have New AI rule, which opens a new AI rule for that tag or field.

When it runs: 15 minutes after a customer's last message (a burst of messages costs one AI run, whatever the number of AI rules), and right away when a conversation is resolved. It reads both sides of the contact's chats since its last run (up to 20 messages), never private notes or sensitive messages, and does nothing when there is nothing new. If the AI service fails, the run tries again and the messages are still read. Requests written by the customer ("tag me as VIP") are ignored. A field your team set is never overwritten. Because it runs after the chat goes quiet, an AI rule never replies, hands over, snoozes or resolves: use a message, intent or event rule for that.

Undo: removing a tag the AI added, changing a field it set, or pressing Undo reverts the change and keeps the AI off that tag or field for that contact. Allow AI again on the contact's Changed by AI card lifts that.

The AI chip on Automations lists every AI rule with how many contacts it tagged, removed and how many were undone (a high undo count, shown in red, means the rule needs better words), and every change with filters and Undo. Per rule:

  • Test this rule: shows what the AI would do on the 5 most recent contacts and why, without saving. Each contact tested is one AI run and counts toward the day's runs. The editor's Test on recent contacts does the same.
  • Run on recent contacts: applies the rule to the contacts who chatted in the last 30 days (at most 1,000), a few a minute, with Stop. Run it again after editing a rule.

AI rules use AI tokens and need AI assist on your plan and the Auto tags switch in Settings › AI.

Variables and templates

Replies and notes are templates. Write <%= path %> to insert a value, add conditions and filters:

Hi <%= contact.name.first | default:"there" %>!
<% if now.hour >= 17 %>We're closed now, we'll answer at 9.<% else %>We'll answer in a few minutes.<% endif %>
Fields
Contactcontact.name.full, contact.name.first, contact.phone, contact.email, contact.language, contact.tags
Conversationconversation.status, conversation.priority, conversation.handler, conversation.isFirstMessage, conversation.tags
Channel, messagechannel.type, channel.name, message.text, message.type
Event (event rules)event.type, event.data.<key> (what the event sent, like event.data.number or event.data.total)
Workspace, timeworkspace.name, now.date, now.time, now.hour, now.weekday
Business hourshours.isOpen, and while closed hours.next.time, hours.next.date, hours.next.weekday, hours.next.isToday, hours.next.isTomorrow

Filters: upper, lower, capitalize, trim, default, truncate, date, phone, replace, regexReplace, first, last, length, join, json. Templates also support <% for item in list %>…<% endfor %> and <%# comments %>. No code is ever run.

Cooldown

Cooldown keeps a rule from firing again too soon: none, 1 minute, 1 hour, 1 day or 7 days, Per contact or Per conversation.

A rule with the Outside business hours trigger also offers Once per closed period: one reply per contact or conversation each time you're closed, however long that lasts. A customer who writes on Saturday and again on Sunday gets your away message once, and gets it again after you next close.

Say when you open again

The hours.* variables read the workspace's business hours, whichever trigger the rule uses:

Terima kasih sudah menghubungi kami. Kami sedang tutup<% if hours.next.isToday %> dan buka lagi hari ini jam <%= hours.next.time %><% elseif hours.next.isTomorrow %> dan buka lagi besok jam <%= hours.next.time %><% else %> dan buka lagi tanggal <%= hours.next.date %> jam <%= hours.next.time %><% endif %>.

hours.isOpen also works in Only if, so any rule can run only while you're open or only while you're closed. With no business hours set, hours.isOpen is true and the hours.next values are empty.

Test a rule

Test tries a message (or, for an event rule, an event with its data as JSON; for an intent rule, an intent) with example contact data. It shows Matches or Does not match and each step as it would run: skipped by its Only if or not, and the text it would send or set. AI, webhook and plugin steps show their prompt or settings instead of calling anything. Nothing is sent or changed. Each rule also counts how many times it ran.

The list

Automations shows every rule with its trigger, its steps, how often it ran, and a switch to turn it off. Needs attention means a plugin step's action is no longer available (the plugin was turned off or changed); that step is skipped until you fix it. The chips All, Replies, Actions, Events and AI filter it. A ✨ next to a name means the Assistant made it.

Plan limits

Plans limit the number of automations (replies, actions, events and AI rules together), whether regex is allowed, and the AI rule runs per day (counted from midnight in the workspace's time zone, tests included). Rules over the limit show Locked: over plan limit; regex rules on a plan without regex show Locked: regex needs a higher plan. Managing automations needs the Manage automations permission.

FAQ

Can an automation and the AI both answer?

Not the same message: a rule that replies (a Reply or AI reply step) keeps the AI agent off that message. A rule that only acts (assign, tag) with Afterwards: Continue lets the AI answer.

Can the AI write the automatic reply?

Yes: add AI reply and write what it should do ("answer the stock question and offer the bundle"). Pick an AI agent to use its persona, and Leave it as a draft for the team if a person should check it first.

Can a plugin add its own actions?

Yes. A plugin can offer actions for automations; they appear under Add action › Plugins. If the plugin is turned off later, the rule shows Needs attention.

How do I send every new order to my sales team?

Make a rule with A business event set to order.created and Assign to › A team › Sales. Or tell the Assistant Setiap ada order assign ke team sales and press Create on its card. The store (version 1.4.0 or later) sends order.created when an order is placed, order.paid, order.shipped, order.delivered, order.fulfilled, order.cancelled and order.refunded, each with the order's customer and chat; your own system can send events through the event API.

Why didn't my event rule run?

The event must name its customer (a contact id, phone or email for the event API; the contact or conversation for a plugin), and the customer needs a conversation. Also check the event name and Only if.

Will a rule take a chat from a teammate?

No, unless it has Reassign even if someone has it. Unassigned chats and chats the AI handles are assigned.

How do I reply only once to each customer?

Use First message of a conversation, or add a cooldown of 1 day or 7 days per contact.

How do I send an away message only once while we're closed?

Use the Outside business hours trigger and set Cooldown to Once per closed period. It stays quiet for that customer until you have opened and closed again.

Why doesn't my Outside business hours rule fire?

With Use the workspace's business hours on, the rule needs hours set in Settings › General. Until then you count as always open, and the rule editor says so.

Can an AI rule assign a chat?

Yes, on the contact's latest conversation once the AI decides (15 minutes after the chat goes quiet), once per conversation. To route a new chat right away, use The customer wants… or a keyword rule.

Where did Auto tags go?

Auto tags are AI rules now: the AI chip on Automations has them with their changes and Undo. Settings › AI links there.

Do automations work on every channel?

Yes, unless you pick channels in Channels.