Docs menuRules: route new conversations as they arrive

Rules: route new conversations as they arrive

Use with AI

A rule looks at a customer's message as it opens a new conversation and, when it matches, assigns the conversation, adds tags, and sets its priority and status. For example: mail from acme.com goes to Ana with the billing tag and high priority.

On this page

Rules run only when a conversation opens. A reply on a conversation that already exists, and every conversation already in the inbox, stay as they are.

Add a rule

Open Settings → Rules and select New rule.

  1. Name the rule, for example Billing → Ana. Names are unique in the workspace, ignoring case.
  2. Under When a customer opens a conversation, add 1 to 10 conditions and choose Match: every condition (all), or one is enough (any).
  3. Under Then, choose what the rule does: Assign to a team member, Add tags (up to 10), set the Priority, set the Status. Choose at least one.
  4. Select Add rule. A new rule goes at the end of the list.

Conditions

Every condition ignores upper and lower case.

Condition Matches when
From address is The sender's address is exactly this one, such as ana@example.com.
From domain is The sender's domain is this one or a domain under it: example.com matches ana@example.com and ana@eu.example.com, not ana@badexample.com.
Sent to The mail went to this address: the email channel's own address, or any To or Cc address. Web forms, help chat, Zalo and problem reports have none, so a Sent to condition never matches them.
Subject contains The subject contains these words.
Message contains The text of the customer's first message contains these words (the first 64 KB of it). Messages collected into one conversation are read together.

From address is and From domain is read the address the customer gave when the conversation opened. A help chat customer who asks for a person live usually gives an email after the chat opens: by then the rules have run, so match those chats by Message contains instead.

Each value is 1 to 200 characters.

Order: the first match wins

Rules are checked from the top. The first rule that is on and matches applies, and no other rule runs on that conversation. Move a rule with the up and down arrows on its row, or Move to top in its menu.

A rule that is off is skipped. Turn it on again when you need it.

What a rule does

  • Assign to: the person sees the conversation under assigned to you, as when AI assigns one. A rule whose person was deactivated still does the rest, and says on the conversation and in the list that it skipped the assignment.
  • Add tags: added to any tags the channel or a command already set. A tag deleted from the workspace leaves the rule; a rule with nothing left to do says so.
  • Priority and Status: a rule runs after the channel's defaults, a chat command and the choice a person made in the review queue, so what the rule sets wins. A status set by a rule never messages the customer and asks for no rating. When a rule sets Spam, Resolved or Closed, the customer gets no "we received your message" notice either.

The conversation's timeline names the rule that applied, and the status change says by rule with its name. AI triage on Auto runs after the rules and only fills what they left empty (AI).

Rules do not run on mail from a sender marked as spam: those conversations open in Spam as before.

Where rules run

On every new conversation a customer opens: email (also mail held while the channel was off and opened later), the web form, help chat, Zalo, a card the review queue opens as a new request, and a problem report to the support desk. Rules run once, when the conversation opens: an email or a detail the customer gives later runs none again. They never run on a conversation a team member starts, on article feedback, on an import, or when a person moves messages.

When a rule fails

A rule that cannot be applied never stops the message: the message is saved, the conversation opens, and the next rule that matches is tried. The rule shows the failure in the list, and the server log has the details.

The list

Each rule shows its conditions, what it does, how many conversations it matched in the last 30 days and when it last matched, and any warning.

Delete and restore

Move to trash stops the rule at once. Select Undo, or open Trash within 30 days and restore it: it goes back to the place it had in the order. After 30 days it is deleted for good; the conversations it already routed keep what it set and still name it.

Limits

  • 100 rules per workspace, 10 conditions and 10 tags per rule.
  • Everyone on the team sees the rules. Changing them needs Update on the role's Channels row (the Admin role); see Roles and permissions.

Export

The export has every rule in arrival-rules.ndjson, the trash included, and every rule that ran on a conversation in conversation-rule-runs.ndjson.

For developers and AI agents

An agent lists rules with colliedesk_rules_list (with trash for deleted ones), adds or changes one with colliedesk_rule_save, and deletes or restores one with colliedesk_rule_trash (MCP). colliedesk_conversation_get names the rules that ran on a conversation under arrival_rules. The API is GET and POST /api/v1/rules, PATCH and DELETE /api/v1/rules/{id}, POST /api/v1/rules/{id}/restore and GET /api/v1/rules/trash.

Was this page helpful?

Updated

This page is rendered from the repository. Spot a mistake? Open an issue or a pull request.