Skip to content
Chat on your store is live, answered from the same inbox.
GROWTH DEPT.HELPDESK

Rule conditions and actions reference

Every field a rule can check, the operators each one offers, how matching works, and every action a rule can take.

On this page

This page lists what the rule editor offers under If, Then and Otherwise, in the order its menus show them. For how the parts fit together, see How rules work.

How matching works#

  • contains, starts with, ends with and the any of / all of operators on text ignore capital letters and match part of a word: "refund" matches "Refunded" and "refunds". Check short words such as "card" against real messages, since "card" also matches "discard".

  • is and is not on text compare the whole value exactly, capitals included. Email addresses, tags and sender addresses are the exception: they are always compared without regard to capitals.

  • contains any of and its relatives take a list. Type each value and press Enter.

  • is empty is true when a field has no value at all, or holds empty text.

  • Date conditions with … ago compare against the moment the rule runs. Rules run only when one of their events happens, so "Created is more than 3 days ago" is checked when the ticket next changes, not on the day it turns three days old.

Ticket#

FieldWhat it checksOperators
Ticket idThe ticket's numbernumber
External idAn id another system gave the ticket, through the API or an importtext value
StatusOpen or Closedchoice
PriorityLow, Normal, High or Criticalchoice
ChannelWhere the ticket came in: Email, Chat, Contact form, Help center, SMS, Phone, API, Facebook, Messenger, Instagram comment, Instagram message or WhatsAppchoice
Created viaThe route of the ticket's first message, such as email, api or helpdesk (started by an agent)text value
SubjectThe ticket's subject linetext
LanguageThe ticket's language as a two-letter code, such as en, when it is knowntext value
SpamWhether the ticket is marked as spamyes or no
Started by an agentWhether an agent, not the customer, opened the ticketyes or no
UnreadWhether the ticket is unreadyes or no
Number of messagesHow many messages the ticket hasnumber
Created, Updated, Opened, ClosedWhen the ticket was created, last changed, first opened by an agent, or closeddate
Last messageWhen the newest message arrived or was sentdate
Last message from the customerWhen the customer last wrotedate
Last reply sentWhen your team last replieddate
Snoozed untilWhen a snooze ends; empty if the ticket is not snoozeddate
Moved to trashWhen the ticket was put in the trashdate
AssigneeThe agent the ticket is assigned toagent or team
Assignee email, Assignee nameThat agent's email address or nametext value / text
TeamThe team the ticket is assigned toagent or team
Team nameThat team's nametext
TagsThe tags on the ticketlist
Satisfaction scoreThe customer's survey rating, 1 to 5number

Ticket fields and customer fields#

Each active ticket field has its own entry, listed by its name under Ticket fields, and each active customer field under Customer fields. The operators depend on the field's type:

Field typeBehaves like
DropdownA choice field, with the field's own choices as values. It also offers is empty and is not empty
TextA text value, without the list operators
NumberA number, without the list operators
Yes or noYes or no, plus the two empty checks
DateA date with a calendar day; the "… ago" operators are not offered

See Ticket fields and Customer fields.

Customer#

FieldWhat it checksOperators
CustomerThe customer's id numbernumber
Customer emailThe customer's main email addresstext value
Customer name, Customer first name, Customer last nameThe names on the customer's profiletext
Customer languageThe language on the customer's profile, as a two-letter codetext value
Customer external idAn id from another systemtext value

Message#

Message fields read the message that started the run. For a new message, that is the message itself; for a new ticket, its first message; for an update, the newest message on the ticket.

FieldWhat it checksOperators
Message textThe message without the earlier emails quoted under it, when those can be told apart; otherwise the whole messagetext
Message bodyThe whole message, quoted replies includedtext
Message without quoted textOnly the new part of the message; empty when it cannot be separatedtext
Message subjectThe subject of this messagetext
Message channelThe channel this message used, with the same choices as Channelchoice
Message sent viaThe route this message took, such as email, api, helpdesk or ruletext value
Sent by an agentWhether your team wrote the messageyes or no
Public (not an internal note)Whether the customer can see the messageyes or no
Message sentWhen the message was writtendate
Message intents, Message sentimentsLabels attached to the message by the REST API or an import. The helpdesk does not add these to email or chat by itselflist
Sender addressThe address the message came fromtext value
Sender nameThe name the sender gavetext
Recipient addressesThe addresses the message was sent tolist
Sender emailThe email of the customer or agent who sent ittext value
Attachment namesThe file names of attachmentslist

A few fields stay out of the menu unless a rule already uses them, usually one written as code or imported: Tag ids, Mailbox or channel integration, Message integration, Message id, Latest message preview and Message source type.

Operators#

The Operators column in the tables above names a kind of field. This table says which operators each kind offers and what they mean.

OperatorTrue whenOffered for
isThe value equals what you enterEvery kind except lists
is notThe value differs from it, or the field is blankEvery kind except lists
is one ofThe value equals any entry in your listchoice, text value, number, agent or team
is not one ofThe value equals none of your entrieschoice, text value, number, agent or team
containsThe text includes what you enter, anywheretext, text value
does not containThe text lacks ittext, text value
starts withThe text begins with ittext, text value
ends withThe text finishes with ittext, text value
contains any ofThe text includes at least one of your wordstext
contains all ofThe text includes every one of your wordstext
contains none ofThe text includes no word from your listtext
does not contain all ofAt least one of your words is missingtext
includes any ofThe list, such as the ticket's tags, has at least one of your entrieslist
includes all ofThe list has every entrylist
includes none ofThe list has no entry from yourslist
does not include all ofAt least one of your entries is missing from the listlist
is more than, is at leastThe number is above, or at least, yoursnumber
is less than, is at mostThe number is below, or at most, yoursnumber
is after, is on or afterThe date falls after, or on, the day you pickdate
is before, is on or beforeThe date falls before, or on, that daydate
is more than … agoThe date lies further back than the length you give, in minutes, hours, days or weeksdate
is at least … agoThe same, counting the exact length as a matchdate
is less than … agoThe date is more recent than that lengthdate
is at most … agoThe same, counting the exact length as a matchdate
is emptyThe field has no value. Agent and team fields call it is not settext, text value, number, date, agent or team, list
is not emptyThe field has a value. Agent and team fields call it is settext, text value, number, date, agent or team, list

Yes-or-no fields offer only is and is not, with Yes or No.

Actions#

The same list appears under Then and Otherwise.

ActionWhat you setWhat it does
Add tagsOne or more tag namesAdds the tags. A name that is not a tag yet is created
Remove tagsOne or more tag namesTakes those tags off
Set statusOpen or ClosedOpens or closes the ticket
Set priorityLow, Normal, High or CriticalChanges the priority
Assign to agentAn agent, or Nobody (unassign)Assigns the ticket or removes its agent
Assign to teamA team, or No teamAssigns the team or removes it
Snooze1 hour, 4 hours, 1 day, 3 days, 1 week, or Custom lengthSnoozes the ticket for that long
Apply a macroA macroWrites the macro's reply to the customer and makes its changes. An archived macro is skipped
Send a replyThe reply text, with Insert variableSends a reply on the ticket's channel, as Automation
Add an internal noteThe note text, with Insert variableAdds a note only your team sees
Set a ticket fieldA ticket field and its valueFills in the field, replacing its value
Change the subjectThe new subjectReplaces the subject line
Skip the satisfaction surveyNothingThe ticket gets no satisfaction survey when it closes

Replies and notes go out before the other changes, so a rule that answers and then closes the ticket sends the answer first. When two actions change the same thing, the lower one wins. Variables in rule replies are listed in Variables in macros; the agent variables are left out, because no agent is involved.

Not available in rules#

These exist in some other helpdesks but not here: sending an email to an address outside the ticket, replacing all tags at once (use Remove tags and Add tags), setting a customer field, spreading tickets across several teams, moving a ticket to the trash, keeping a ticket out of automatic merging, conditions on business hours or holidays, conditions on Shopify order data, and actions on social media comments.

Still stuck?

Write to the Growth Dept team and a person answers. Say which helpdesk you work in and what you were trying to do.

support@growthdept.ai