Skip to content

Black Friday:

60% off

Cliedesk Pro

Every plan, every site count. Ends Cyber Monday.

00 days 00 hrs 00 min 00 sec
Claim 60% off

Automation

Rules

Rules do work for you. When something happens and the conversation matches the conditions (If), the rule runs its actions (Then) in order. Rules run as the person who turned them on and never do more than that person may do. Open them in Settings → Rules. People with Manage automation (Cliedesk Admin) can change rules.

Order, on and off

  • Rules for the same trigger run from top to bottom. Drag a rule onto another rule to put it there, or use Move up and Move down.
  • The switch next to a rule turns it on or off. Each rule shows when it last ran.
  • Organise on a rule: Copy (the copy starts off) and Folder…. More on a rule: Check this rule and, for a rule that is off, Delete… (see How rules run).
  • Use Find rules, Status, Channel and Folder above the list to narrow it.
  • Export downloads your rules as a JSON file. Import reads such a file on another site. Teams, queues, saved replies are matched by name, products and tags by their slug, and people by email. Missing tags are created; anything else that is missing is listed. Imported rules start off. On the command line: wp cliedesk automation export --file=rules.json and wp cliedesk automation import rules.json.

Triggers

  • The customer writes, The team replies, An internal note is added. Options: only the first customer message, a pattern (use * and ? as wildcards, or a regular expression between slashes such as /order #?\d+/), the address the customer wrote to, and who wrote it (customer, agent, AI agent or rule).
  • The status changes, The priority changes, The type changes: optionally only from or to chosen values.
  • A field changes (optionally only some fields; also on closed conversations), Conversations are merged into this one, Messages are split off into a new conversation, A conversation is linked.
  • An agent runs it: see below.
  • A contact is created, A contact is changed (optionally only some attributes), Contacts are merged, A contact enters a segment and A contact leaves a segment. Contact rules run on the contact: they have no conversation conditions and use contact actions.
  • A customer event happens (from cliedesk_log_event() or Cliedesk.track(); optionally only one event name).

Time triggers (the customer or the team has not replied for a while, a conversation stays in a status), schedules, WordPress hooks and page scripts start rules with Cliedesk Pro; Free shows a PRO badge under the trigger.

Under Business hours, a rule can start Only during business hours or Only outside business hours. A rule limited to some channels or products starts only on events there; use the Channel filter to find such rules. More about order and how often a rule runs: How rules run. All conditions and actions: Rule conditions and actions.

Rules that agents run

A rule with the trigger An agent runs it shows in the conversation header (Run rule…), in the inbox bulk bar (Run rule), in the command palette (Run rule: …) and next to the saved replies in the composer. You can limit it to some roles. A rule can ask for inputs first (text, a number or a choice); use them in the rule’s texts as {inputs.key}. It runs with the permissions of the agent who runs it, on one conversation or up to 100 at once. On the command line: wp cliedesk action run workflow.run with the same inputs; a repeated --idempotency-key runs once.

Actions

Besides status, priority, assignment, tags, notes and replies, rules can: set the subject, the language, any conversation field, a field of the customer or of their organization; add a follower; assign to a team and hand the conversation to the team queue’s method (distribute); Run the router now; Snooze for a number of hours (a customer reply wakes it); Block the customer; Create a linked conversation (with tags, an assignee, another product or queue). Open a side thread is available with Cliedesk Pro. Forwarding takes up to 50 addresses; Check this rule warns above 15. There is no action that deletes for good.

Conditions

Conditions include the chat state (active, inactive, ended by an agent, ended unanswered), a linked tracker, the channel account, the conversation language, email domain lists (in / not in), fields of the customer’s organization (for example a tier) and contact fields mapped to WordPress user meta. The Side thread condition (waiting or answered) is available with Cliedesk Pro.

Protection

  • One automated reply per customer message, and at most one per customer in 4 hours (automation.autoreply_cooldown).
  • Autoresponders, bulk mail and no-reply senders never get automated replies.
  • A conversation that reaches the limit of rule runs per hour shows on Settings → Health.
  • System emails are sent by Cliedesk itself, not by rules. See Recipes, system emails and the assistant.
  • Pause all rules stops every rule. When you resume, held events run, except customer messages that waited more than 24 hours.

Recipes and bot behaviour

Recipes creates ready rules that start off, for example Recover unhappy ratings. Recipes marked Pro need Cliedesk Pro. Below the defaults, Bot behaviour has switches for: asking for the email address when nobody answers the chat, showing the typical reply time, and asking for a rating when a conversation is resolved.

See Recipes, system emails and the assistant for the acknowledgement recipes.