In About messaging triggers in Admin Center, we introduced the Messaging triggers page, messaging trigger basics, and the pre-made triggers that are included in your account by default.
In this article, we’ll discuss how to create and edit messaging triggers to help automate your messaging bots.
This article includes the following sections:
Creating messaging triggers
Messaging triggers are created on the Messaging trigger admin page in Admin Center.
Messaging triggers run when a customer requests or interacts with a conversation through a messaging channel. Precipitating conditions can include user data (like account status), conversation data (such as the time of day a conversation is started), and agent data (such as queue size). These conditions can then spark actions that are performed through that same messaging channel (such as sending an automated message to the conversation).
To create a messaging trigger
- Admin Center, click Objects and rules in the sidebar, then select Business rules > Messaging triggers.
- Click Create trigger.
Alternatively, you can copy an existing trigger and modify it.
- Enter the basic information for your new trigger:
- Name. Use a consistent naming convention to help you recognize similar types of triggers.
- Description (optional). You can provide details about what the trigger does for other agents and admins. You'll be able to search for triggers based on description.
- Activate this trigger. Select this option if you want the trigger to be active immediately after creating it.
- Run only once per ticket. Select this option if you want the trigger to run on the ticket only the first time the conditions are met.
- Select Visual to build the trigger using the visual editing tool, or Developer to edit trigger definitions directly in JSON format.
- Use the Run trigger dropdown to determine the
event that initiates the trigger. The trigger is not
acted upon unless the conditions are met.
- When a customer requests a conversation initiates the trigger when the conversation is passed to an agent.
- When a message is sent initiates the trigger when a customer sends a comment in an existing conversation.
- Create at least one condition:
- Choose whether the trigger must meet All or Any of the conditions before it is run.
-
Select a Condition, Field operator, and Value for each condition you add.
The field operator determines the relationship between the condition and the value. For example, if you select the field operator "Is", your condition will need to be equal to the value. Different conditions will contain different field operators. - Click Add condition and repeat these steps if needed.
- Create at least one action:
-
Select an Action, then enter the action information.
The required information is determined by the action selected. For example, if you select Wait, you’ll need to enter the time (in seconds) before the next action is performed, or the next trigger fires.
-
Click Add action and repeat these steps if needed.
-
- Click Create.
Once created, the trigger appears on the Messaging triggers admin page.
Editing messaging triggers
You can modify existing messaging triggers if needed.
To edit an existing trigger
- Admin Center, click Objects and rules in the sidebar, then select Business rules > Messaging triggers.
- Click the name of the trigger you want to edit in the triggers list. Use the search at the top of the page, if needed, to locate the trigger.
- On the trigger’s edit page, make the necessary changes, and click Save.
Cloning messaging triggers
You can duplicate an existing trigger to use as a template for creating new triggers.
To clone an existing trigger
- Admin Center, click Objects and rules in the sidebar, then select Business rules > Messaging triggers.
- Find the trigger you want to clone in the triggers list. Use the search at the top of the page, if needed, to locate the trigger.
- Hover over the trigger and click the Options menu().
- Select Clone.
- On the Create trigger page, update the information as needed, and click Create.
Activating and deactivating messaging triggers
A trigger can be activated or deactivated. If activated, the trigger will run whenever its conditions are met. If deactivated, the triggers are built, but will not fire even if the firing conditions are met.
To activate or deactivate a trigger
- Admin Center, click Objects and rules in the sidebar, then select Business rules > Messaging triggers.
- Find the trigger you want to change in the triggers list. Use the search at the top of the page, if needed, to locate the trigger.
- Hover over the trigger and click the Options menu ().
- If the trigger is inactive, select Activate forthe trigger to fire when conditions are met. If the trigger is Inactive, select Inactivate to prevent the trigger from firing.
- Click Save.
Deleting messaging triggers
If you no longer need a trigger, and will not want to use it in the future, you can permanently delete it from the messaging triggers list.
To delete a trigger
- Admin Center, click Objects and rules in the sidebar, then select Business rules > Messaging triggers.
- Find the trigger you want to change in the triggers list. Use the search at the top of the page, if needed, to locate the trigger.
- Hover over the trigger and click the Options menu ().
- Select Delete.
- Confirm that you want to delete the trigger by clicking the Delete button.