logoRocketFlow

Automation Rules

Create no-code "when X happens, do Y" rules for your chatbots

Automation Rules

Automate repetitive tasks with rules that trigger on chatbot events. No code required.

How It Works

Each rule reads like a sentence: If something happens and conditions match, then do something. Build rules in Settings → Automations with the guided if → then builder, or start from a quick start (for example, "Hand over when the visitor asks for a person").

  1. Trigger: what event starts the rule
  2. Conditions: optional filters. All conditions must match (AND)
  3. Actions: what to do when they match

Rules run in priority order (higher first). Rules created without a chatbot apply to all your chatbots.

Triggers

TriggerFires whenCondition fields
message.receivedA visitor sends a message (runs before the AI answers)message.text
session.createdA new conversation startslocale, deviceType
lead.capturedA lead is collectedlead.name, lead.email
ticket.createdA ticket is openedticket.subject, ticket.priority, ticket.email
handoff.escalatedThe AI (or a rule) escalates to a personreason

During a handover (queued or human) the widget stores visitor messages without calling the AI, so message.received rules do not run for those.

Conditions

OperatorExample
containsmessage.text contains "refund"
not_containslead.name not_contains "test"
equalslocale equals "pt-BR"
starts_withlead.email starts_with "test@"
ends_withlead.email ends_with "@bigcustomer.com"
regexmessage.text matches refund|invoice (case-insensitive)

Actions

ActionWhat it does
escalateHands the conversation to a person (queued). Value: optional reason
assign_agentAssigns the conversation to a team member (value: their user id; the builder shows a picker)
auto_replyShows the visitor a fixed message. On message.received it replaces the AI answer
add_label / remove_labelAdds or removes a label by name (created if it doesn't exist)
set_prioritySets a ticket's priority (ticket.created only)
resolveMarks the conversation resolved

When a message.received rule escalates, assigns or replies, the AI is skipped for that message and the visitor sees the rule's reply (or a default "connecting you with our support team" line). escalate is not offered on handoff.escalated to avoid loops, but assign_agent is, which is how you route escalations to a specific person (for example VIP customers).

Hand over when the visitor asks for a person

The quick start Hand over when the visitor asks for a person is a message.received rule with a regex over common phrases ("talk to a human", "falar com um atendente", "hablar con un agente", ...) and an escalate action. Unlike the AI's own escalateToHuman tool, it is deterministic: it doesn't depend on the model deciding to escalate.

Example Rule

"Auto-resolve short-lived sessions from a locale"

{
  "name": "Auto-resolve pt-BR sessions",
  "trigger": "session.created",
  "conditions": [
    { "field": "locale", "operator": "equals", "value": "pt-BR" }
  ],
  "actions": [
    { "type": "resolve", "value": "" }
  ]
}

API

MethodEndpointAction
GET/api/automationsList all rules
POST/api/automationsCreate rule
PATCH/api/automationsUpdate rule
DELETE/api/automationsDelete rule

Disable a rule by setting active: false.

Last updated on