Automating workflows with triggers

A trigger represents a set of actions that are automatically run by the system when certain conditions are met. For example, a trigger can be used to:

  • Add the label Order to new tickets that have a subject starting with New Order and are from a specific sender (i.e. orders@your-domain.com)
  • When the Refund label is added to a ticket, auto assign it to Nancy

There are two types of triggers in Enchant:

  • Ticket Create: these run whenever a ticket is created as a result of an incoming email
  • Ticket Update: these run whenever a member of your team updates a ticket, for example when a user updates the state of a ticket to open or adds a specific label to the ticket

Managing trigger configuration

Add and update triggers from the admin area.

1

From the top right navigation bar, click the cog icon

2

Click Inboxes

3

For a specific inbox, click Triggers

Creating a new trigger

1

From the top right of the triggers tab, click the Add a new trigger button

2

Here, you can name the trigger and tweak it to meet your needs

In the above screenshot:

  • Name: The name of the trigger
  • When: The type of the trigger (ticket create or ticket update)
  • All of these conditions: Run the actions if all of these conditions pass
  • Any of these conditions: Run the actions if any of these conditions pass
  • Run these actions: These are the list of actions that will run if the conditions pass

Working with conditions

Add conditions by clicking Add a new condition in either "all" or "any" sections.

A condition consists of an attribute, a comparator and a value. The attribute is compared against the value. The comparator describes how the comparison should be done. In the above screenshot:

  • Attribute: Ticket Subject
  • Comparator: starts with
  • Value: Order

Currently, trigger conditions can be based on the following attributes:

  • Ticket Subject
  • Ticket State
  • Ticket Assignee
  • Ticket Labels
  • Ticket Type
  • Ticket User Reply Count (only available for ticket update triggers)
  • Ticket Customer Reply Count (only available for ticket update triggers)
  • Customer Name
  • Customer Email Address

With ticket update triggers, at least one of the conditions must be change based. A change based condition has a comparator that requires that a field is changed. For example: has changed from, has changed to, has changed, etc.

Adding actions

Add actions by clicking Add a new action in the "Run these actions" section

Currently, trigger actions can:

  • Update state
  • Update assignee
  • Update subject
  • Add a label
  • Remove a label
  • Clear all labels
  • Mark as spam
  • Send to trash

Trigger interactions

Triggers run in the order they are shown in the admin interface. Actions taken by a trigger impact other triggers that run after it.