SquidSupport
Product reference / Settings

Automation Rules

In the app: Settings → Rules

Needs the 'View Rules' permission.

An automation rule does something to a conversation by itself when something happens: it can tag it, change its priority, assign it, reply, snooze or close it, or hand it to the AI. A rule made on this page applies to every store in the organization.

Rule list

Rules are listed in the order they run: lowest priority number first, and the oldest rule first when two share a number.

Each rule shows:

  • its name, with "Active" or "Disabled";
  • a store name when the rule only runs for one store's conversations. Rules made on this page never have one; such a rule was made through the API;
  • "Dry run — no actions executed" when the rule is in test mode;
  • "No conditions — never runs" when the rule has no conditions;
  • a warning when the rule checks the message but its trigger carries no message. Such a condition may still match if it tests for a missing value, and an "ANY" rule may match another condition. The warning says to use the "Message received" trigger, by which it means "Customer Message Received". This is the only warning Squid gives;
  • its description, and its conditions written out as a sentence;
  • its trigger, the number of actions and "Priority" with its number;
  • "Stops later rules" when the rule is active, not in dry run and set to stop other rules;
  • "Matched … times" and "Last match", once the rule has matched.

The buttons on a rule: disable or enable (pause and play), "History", edit (pencil) and delete (bin). Disabling takes effect at once. Deleting asks for confirmation and cannot be undone on this page: the rule and the record of its runs are removed, but its saved versions are kept. The rule stops running on new events, and what it already did to conversations stays. The deletion is recorded in Settings → Audit Log.

"Create Rule" opens an empty rule. When there are no rules, the page shows "No rules yet" with "Create a rule" and "Start from an example: flag urgent tickets", which opens the form filled in. Nothing is created until you save.

Seeing this page needs the 'View Rules' permission. Creating, editing, enabling, disabling, deleting and restoring need the 'Edit Rules' permission.

Create or edit a rule

Needs the 'Edit Rules' permission.

"Create Rule" opens the rule form; the pencil opens it for an existing rule. Nothing is saved until you save at the bottom. While something required is missing, the save button is disabled and a line next to it says what to fill in first.

"Rule Name" is required, up to 255 characters.

"Description" is optional, up to 1,000 characters. It is shown in the rule list.

"Trigger" is what starts the rule; see "Triggers".

"Conditions" and "Actions" are required: at least one condition with a value, or an "is set" or "is not set" condition that needs no value, and at least one action.

"Enable this rule" is off for a new rule and decides whether the rule runs after saving. A disabled rule is kept but never runs.

Triggers

Needs the 'Edit Rules' permission.

A rule has one trigger. It is checked each time that event happens on a conversation. Most triggers only react to what a customer or a teammate does: a change made by the AI or by another rule's action does not start them, unless it is named below.

  • "Conversation Created": a new conversation starts from an incoming email, from the chat widget or from a return portal submission, or a teammate creates one in the app. A new conversation that starts on WhatsApp does not start this trigger; use "Customer Message Received" for those.
  • "Customer Message Received": a customer sends a message by email, chat or WhatsApp.
  • "Conversation Assigned": a teammate assigns or claims a conversation in the app, assigns several at once, sends several to the AI at once, or is assigned automatically by replying. An assignment made by the AI or by a rule does not start it.
  • "Conversation Closed": a teammate closes or resolves a conversation, or closes it while replying; the AI closes it, also through an approved draft; or Squid closes it automatically, for example an idle chat or after a snooze. A conversation closed by a rule's own action does not start it.
  • "Conversation Reopened": a teammate reopens a closed conversation, or wakes a snoozed one by hand. A customer's reply that reopens a closed conversation does not start it; that reply starts "Customer Message Received".
  • "Snooze Expired": a snoozed conversation's timer runs out.
  • "Ticket Updated": a teammate edits a conversation's status, priority, assignee, department, snooze time or subject in the app. It does not react to every change: tags, and closing, reopening and assigning with their own buttons, start their own triggers instead.
  • "Tag Added" and "Tag Removed": a teammate puts a tag on a conversation or takes one off. Tags set by the AI, a rule or a macro do not start them.
  • "Message Created": a customer sends a message, or a teammate writes a reply or an internal note in the app. A message from the AI does not start it.
  • "Agent Message Sent": a teammate writes a reply or an internal note in the app.
  • "Automated Message Sent": offered in the list, but nothing in Squid starts it today, so a rule with this trigger never runs.
  • "Schedule": the rule runs at set times over matching conversations, not in response to an event. It needs a schedule under "Advanced Settings", which also explains how such a rule runs.

Conditions about the message itself, such as "Message Content", are only offered for the four triggers that carry a message: "Customer Message Received", "Message Created", "Agent Message Sent" and "Automated Message Sent".

Conditions

Needs the 'Edit Rules' permission.

Conditions decide which conversations the rule acts on. Choose "ALL" to require every condition, or "ANY" to require at least one. A rule without conditions never runs.

Each condition is a field, a comparison and a value.

Fields: "Message Content", "Email Subject (as received)", "Customer Email", "Customer Name", "Subject", "Priority", "Tags", "Status", "Conversation Channel", "Assigned Agent", "Department", "Received at mailbox", "Store language", "Customer language", "Message Count", "Created At", "Last Message At", "Content Type", "Sender Type", "Has Attachments", "Customer Tags", "Customer LTV" and "Order Count".

"Received at mailbox", "Store language" and "Customer language" give you a list to choose from. The other fields take typed text.

Comparisons: "equals", "does not equal", "contains", "does not contain", "starts with", "ends with", "is set", "is not set", "is greater than", "is less than", "is greater than or equal to", "is less than or equal to", "is in list", "is not in list", "array contains", "matches regex", "contains any of these keywords" and "contains none of these keywords".

  • Text comparisons ignore upper and lower case. "matches regex" is the exception: it is case-sensitive. A pattern that is not valid, or that takes longer than a second to check, does not match.
  • For the list and keyword comparisons, separate the values with commas.
  • The keyword comparisons match whole words, so "member" does not match "remember". A keyword of several words is matched as written. In an email, the text the customer wrote is searched, not the HTML around it.
  • When the field has no value at all, "does not equal", "does not contain", "is not in list", "is not set" and "contains none of these keywords" are true for the values entered on this page, and the other comparisons are false. An empty text or an empty list also counts as "is not set", but the other comparisons still examine that text or list. For example, empty text does not equal a non-empty value; an empty list is written as "[]" for text comparisons.
  • The four "greater" and "less" comparisons work on numbers and on dates. For "Created At" and "Last Message At", type a date such as 2026-01-31 or a date with a time; a date without a time zone is read as UTC. A date field compared with a plain number never matches.
  • "Assigned Agent" and "Department" hold the internal ID of the person or department, not the name. To test whether a conversation is assigned at all, use "is set" or "is not set".
  • "Customer Email", "Customer Name", "Customer Tags", "Customer LTV" and "Order Count" are only filled when the event knows the customer.

Actions

Needs the 'Edit Rules' permission.

A rule needs at least one action. Actions run in the order listed.

  • "Set Priority": sets the conversation's priority to "Low", "Normal", "High" or "Urgent". When this changes the priority, the conversation's SLA policy is chosen again and its due times are recalculated.
  • "Add Tag" and "Remove Tag": type the tag name. It is stored in lower case. A tag that "Add Tag" names and that does not exist yet is created, so it also appears under Settings → Tags.
  • "Assign Agent": assigns the conversation to the teammate you pick.
  • "Assign Department": moves the conversation to the department you pick.
  • "Clear Assignee": removes the assigned person, unless someone claimed or reassigned the conversation after the rule loaded it. In that case the new assignee stays.
  • "Send Reply": writes a reply with the text you enter and sends it to the customer on the conversation's channel. It appears in the thread as a reply from the AI agent, not from a teammate. Tick "Send as internal note" to add it as a note for your team instead; a note is never sent to the customer. A reply to the customer is skipped in these cases:
    • the rule's trigger carries a message and that message did not come from the customer;
    • the trigger is "Conversation Created" and the conversation was opened by a teammate, not by the customer;
    • the conversation is an email and the store cannot send email at all, the customer's address is recognized as one of your own mailboxes or store domains, or Squid cannot complete that safety check.

    Email replies are queued for sending; creating the reply does not guarantee delivery. On WhatsApp, a reply outside the 24-hour customer service window, or when delivery is unavailable, stays in the thread marked as undeliverable.

    On the other triggers, such as "Conversation Assigned", "Tag Added" or "Schedule", the reply is sent whoever wrote last. When the store's AI sends its replies automatically, the AI does not also answer a customer message that a rule's reply has answered.

  • "Snooze": snoozes the conversation for the number of hours you enter; the default is 24. A closed conversation becomes snoozed too. A live chat is never snoozed; the action is skipped for chats.
  • "Close": closes the conversation.
  • "Send to AI": assigns the conversation to the AI agent and, when the rule's trigger carries a message, queues the AI to answer that message, unless a rule has already answered it and the store auto-sends AI replies, or a chat FAQ has already supplied a saved answer. On a trigger without a message the conversation is only assigned to the AI; nothing is answered until the customer writes again. The action is skipped for a mailbox that is set to never be handled by the AI, and for automated mail that no person sent.
  • "Set Status": sets the status to "Open", "Snoozed" or "Closed". "Snoozed" set this way adds no wake-up time of its own, but keeps an existing one, and it is not skipped for a live chat; to snooze for a period, use "Snooze".
  • "Set Custom Field": fills a custom field. Enter the field's key, as shown under Settings → Custom Fields, and the value.
  • "Call Webhook": calls one of your webhooks with the conversation's details. Enter the webhook's ID. The webhook must be active.
  • "Enqueue Job": offers eight background tasks. The form supplies no extra details, so "AI: Process Response", "AI: Retry Failed" and "Email: Send Outbox" fail because they need details that this form does not collect. The other five choices request background work for pending email, audit-log cleanup, snooze sweeps or scheduled rules; they do not act only on the conversation that matched.
  • "Apply Macro": adds the text of the macro you pick to the conversation as a message, with the macro's variables filled in. Unlike "Send Reply", it does not send that text to the customer: no email goes out.

In "Send Reply" and in the value of "Set Custom Field" you can use variables in double curly brackets, for example the conversation's subject or the customer's name. A variable that has no value is left in the text between square brackets.

Closing and snoozing are held back for certain email failures. If the reply was held back because the store cannot send email, the recipient is recognized as your own mailbox or store domain, or the safety check failed, every "Close", "Snooze" and "Set Status" to "Closed" or "Snoozed" in that rule is skipped, wherever it stands in the list. If the reply was written but could not be queued for email, the ones after it are skipped. A reply skipped because its trigger was not a customer message does not block closing or snoozing. Neither does a WhatsApp delivery refusal. The other actions, such as tags and assignment, are still carried out.

Each action is carried out by itself. When one fails, the actions before it stay done and the ones after it are still tried.

Advanced Settings

Needs the 'Edit Rules' permission.

"Priority" is the rule's place in the running order, from 0 to 1,000. The default is 0. Lower numbers run first; rules with the same number run oldest first.

"Cooldown (minutes)": after the rule has acted, it does not act again for this many minutes, at least 1. For a new rule, empty means no cooldown. Clearing this field on an existing rule does not remove a saved cooldown today. Dry-run matches do not start a cooldown.

"Run Scope" says what the cooldown is measured against, and nothing else. "Per Ticket", the default, means one cooldown per conversation. "Per Message" means one cooldown per message; when the trigger has no message it works like "Per Ticket".

"Dry Run (test mode — evaluate but don't execute)": the rule is checked as usual, but none of its actions are carried out. Each match is counted and logged with the actions it would have taken. Use it to see what a new rule would do before letting it act.

"Stop processing other rules after this one matches": when this rule matches, rules later in the order are not run for that event. A rule in dry run never stops other rules; its history records that it would have.

"Schedule Settings" appear when the trigger is "Schedule". "Cron Expression" is required and sets when the rule runs, for example "0 9 * * *" for every day at 9:00. The times are in UTC, and Squid checks the schedules once a minute. The four filters limit which conversations it runs over: "Filter by Status", "Filter by Priority", "Filter by Assignment" (assigned or unassigned) and "Filter by Department". "Any" means no limit.

A scheduled rule works differently from the others:

  • At each scheduled time it goes over every conversation of the organization that passes the filters, closed ones included but deleted ones excluded, and acts on each one that meets the conditions.
  • It acts on the same conversation again at every scheduled time for as long as the conversation still matches. Set a cooldown, or let the rule change something its own conditions test (for example add a tag and require that the tag is absent), or a daily rule with "Send Reply" emails the same customers every day.
  • Conditions about the message are not available, because no message is involved.
  • "Priority" and "Stop processing other rules after this one matches" have no effect: scheduled rules do not stop one another.

Rule history

"History" on a rule opens its change history under the row. Creating a rule and saving changes to its settings are recorded as new versions, with who made them and when. Saving without changing anything adds no version. A change that came from an approved Squid Agent proposal has an "Open the proposal" link.

"Restore" on an earlier version puts the rule back exactly as it was then, including whether it was on and whether it was in dry run. The restore is itself saved as a new version and applies at once. When that would switch on a rule that is now off or in dry run, Squid first asks you to confirm with "Restore and go live". Restoring needs the 'Edit Rules' permission.

For a rule in dry run, the panel also shows matches and the actions it would have taken since its latest saved version, limited to the last 30 days and the stores you can access. An edit starts that evidence window again; it is not a lifetime total.

A rule that was never changed since history started shows "No changes recorded yet. The next save starts this rule's history."

How rules run

When an event happens on a conversation, Squid takes the active rules with that trigger, in list order. For each one it checks the conditions, then the cooldown, and if both pass it carries out the actions.

  • A rule runs at most once per conversation for one event, even when its own actions cause new events.
  • When one rule's actions set off other rules, the chain stops after 10 steps.
  • Messages written by "Send Reply" and "Apply Macro" do not start message rules, so a rule cannot answer itself in a loop.
  • A rule that only belongs to one store runs for that store's conversations; all other rules run for every store.
  • If one rule fails, the others still run.
  • Changing a rule affects events from that moment on. It does not go back over earlier conversations.