Skip to content

Automation rules

A rule is one sentence: when trigger, if conditions, then actions. Open Rules in the sidebar (under Automate, next to Flows and AI Agents), pick New rule or Start from a template, and fill in the three parts.

  • Trigger — what the rule listens for. Some triggers take a filter (a keyword, a label name, an emoji, a flag name, a number of minutes).
  • Conditions — every one must hold, or the rule is skipped and the run log says why.
  • Actions — up to 10 per rule, run in order. Each can be delayed by up to 30 days; a delayed action is queued and runs on the minute. A failed action is recorded and the next one still runs.

Every evaluation that matched — and, for event triggers, every one that did not — is logged with the reason and each action’s outcome (ok, skipped + why, failed + why). Click Runs & test under a rule to see its Recent runs (the last 20). Test on a conversation (admins) runs the rule against a chat you name — by contact name, W-code or conversation id — as a dry run: nothing is sent, created or changed.

A rule’s actions can raise the very events other rules listen for (a ticket is created or updated, a flag is set). A rule’s own tag changes are the exception: they never raise the label triggers. Each such event carries the depth it was raised at, and the engine refuses anything raised deeper than two steps — so a rule can start a chain, but a chain cannot run forever. A flag action also never re-triggers the rule that raised it with the same flag.

TriggerFires whenFilter
A new conversation startsthe first message of a chat is stored—
A message is receiveda customer message arriveskeywords (any of), only outside business hours
A label is added / removeda tag is added to / removed from the chatthe label
Someone reacts to a messagesomeone reacts to a messagethe emoji; by agent, customer or any
A ticket is created / updated / closeda ticket changesupdated: the statuses
A message is flaggedan agent or a rule flags a messagethe flag name
A task is assigned to someonea task’s owner changes—
A customer has waited N minutes for a replytimed: an open chat’s last customer message has had no reply for N minutesminutes (1 minute to 7 days); only inside business hours (on by default)
A ticket passes its due datetimed: a ticket that is not closed passed its due date—

The two timed triggers are checked every minute. “Nobody has replied” means no person has replied — the out-of-hours auto-reply, a broadcast, an API send, a flow, an AI agent or a rule’s own message do not end a customer’s wait. Each wait fires a rule once; a new customer message starts a new wait, and a rule never fires for waits that began before the rule existed. Likewise an overdue ticket fires once per due date (moving the due date re-arms it), and due dates that passed before the rule existed are ignored.

ConditionHolds when
It is inside / outside business hoursby the org’s business hours and timezone
The conversation has / does not have the tagthe chat carries the tag
The conversation is assigned toanyone (holds for every chat, assigned or not) / unassigned / a specific agent
The conversation status isopen / closed
The message containsthe message text contains the words
The ticket priority islow / medium / high / urgent
The conversation is flaggedthe chat carries a flag (any, or a named one)

A flag is a lightweight mark an agent puts on a message from the thread (hover → Flag this message), or that a rule sets with the Flag the message action. Two things happen: the event A message is flagged fires, and the conversation gets the tag flag:<name> — which is what The conversation is flagged reads, and what you remove to clear the flag. That is how “flagged and still unanswered after 10 minutes → open a ticket” is expressible.

ActionParamsNotes
Send a text replytextonly inside the 24-hour customer-service window; skipped otherwise
Send a templatetemplate name, languageworks outside the window
Add / remove a tagtaga rule’s tag change does not raise the label triggers
Assign to the next available agenttarget: the conversation or the ticket on this eventthe least-busy available agent; ties go round-robin
Assign to a specific agentagentskipped if that agent is no longer active
Give the ticket to the chat’s owner—skipped when the chat is unassigned or the ticket already has that owner
Close the conversation—the full close: drops the assignment, ends AI sessions, cancels parked flows
Create a tickettitle, priority, ownertitle defaults to the message
Close the ticket—the ticket on this event
Add the message to the open ticket (or open one)title, priority“create-or-append”: the chat’s newest open ticket, else a new one
Flag the messageflag, reasonsets flag:<name> and fires A message is flagged
Send a push notificationpeople (or “the assignee”), title, body“the assignee” is the chat’s assignee
Send an emailto, subject, bodyfrom no-reply@whatbot.in; customer text is escaped
Call a URLurlPOST with the event and placeholders; private and internal addresses are refused

Reply text, ticket titles, flag reasons, and push and email text take {{ }} placeholders:

{{contact_name}} {{message}} {{label}} {{emoji}} {{agent_name}} {{ticket_title}} {{ticket_status}} {{ticket_priority}} {{waiting_minutes}} {{flag}} {{flag_reason}} {{task_title}} {{event}}

Unknown placeholders become empty.

TemplateWhenThen
Reply to a keywordmessage contains price / pricing / costsend a text
Out-of-hours replymessage received outside business hourssend a text
Keyword → ticketmessage contains refund / money backcreate a high-priority ticket
New chat → next agenta new conversation starts, unassignedassign round-robin
New ticket → next agenta ticket is createdassign the ticket round-robin
Ticket → the chat’s ownera ticket is createdgive the ticket to the chat’s owner
Unanswered 15 min → assign + pushwaiting 15 min inside hours, unassignedassign round-robin, push the assignee
Ticket overdue → push the ownera ticket is overduepush the chat’s assignee
Keyword → flagmessage contains invoice / gst / refund / chargebackflag as billing
Flagged “billing” and unanswered → ticketwaiting 10 min and the chat carries flag:billingcreate a high-priority ticket, then clear flag:billing so the flag escalates once
Every message → the open ticketevery customer messageadd to the open ticket, or open one (ships disabled)

Pick a template, change what you like — the name, the words, the minutes — and save. Nothing is created until you save.

Settings → Business Hours (or the Business hours button on the Rules page; only admins can change them): timezone, per-day ranges, and an optional out-of-hours reply sent at most once per chat every four hours while you are closed. It is not a rule: it runs on every incoming message alongside your rules, flows and AI agents. The reply is not an answer: a customer who writes at night still counts as waiting at 09:15.

With no business hours saved, the workspace counts as always open, so “outside business hours” never holds.