Advanced Trigger — send a message to a visitor based on the department selected in the Pre-Chat Form
Advanced Triggers allow you to send an automated message to a visitor based on a set of conditions. In this article, we’ll show you how you can create a trigger to send visitors a message based on the department they have selected in the Pre-Chat Form.
In order for this trigger to work, you will first need to set up departments in your tawk.to Dashboard and activate a Pre-Chat Form.
Learn how to create departments in this article: Creating and managing departments
Learn how to create and modify a Pre-Chat Form in this article: Using the Pre-Chat form
How to set up the trigger:
If you have multiple properties, check to make sure you're viewing the correct one. Hover over the current property name in the upper-left menu to select a new property from the list.
Next, make your way to ⚙️Administration ⮕ Settings ⮕ Triggers.
Click Add Trigger and select Advanced Trigger.
We recommend that you name your trigger and add a Description. This will only be visible to you and your team, not the visitor, and will help you stay organized.
Set the following conditions for your trigger so it sends a message when the sender selects the department (in this example, the trigger will send a message when the Support department is selected):
Run Trigger: When a visitor requests a chat
Check: ALL of the following conditions
Department — Equals — Support
Click the drop-down menu to change the department selected. The options available will be dependent upon which departments you have set up.
Of course, you could add other conditions here. For example, the following setting will only send the trigger message to the visitor the first time they have started a chat and selected that department:
Visitor Previous Chats — Equals — 0
You may also opt to add a delay. You can set the exact period of time that will elapse before the message is sent.
To do this select Wait as the first Action. Then, choose the time for your delay from the drop-down menu in the box.
The second Action should be to Send the Visitor a Message.
If you do have a delay set, make sure you add the following condition:
Visitor Served = False
This will ensure that the message doesn't get sent if you have already responded to the chat.
Once everything looks good, click the green Save button at the bottom right corner of your screen. After clicking Save, you’ll be sent back to the list of triggers you’ve created.
If you would like to send a message for each department you have created, you will need to create an Advanced Trigger for each one. Keep in mind, there is a limit of 20 Trigger messages per property.
Well done! Now you have an Advanced Trigger that will send a message to a visitor based on the department they have selected in the pre-chat form.
Need help setting up? Reach out to our support team or schedule a call.