When setting up triggers for chats, there are specific events and conditions that you can use. Here’s a simple guide to help you understand how to create triggers for chat-related actions.
Events for Chat Triggers
Creating a Chat
- When a client sends a message (not using a chatbot), a new chat is created, and the Chat: Incoming Message event is triggered.
- When a chat is created through a chatbot, the trigger won't work because the chat fields are pre-filled by the bot.
Important: The Chat: Incoming Message event applies when:
- A new chat is created.
- A message arrives in a chat with no assigned agent.
- A message arrives in a closed chat.
It won’t trigger if the chat was created through a chatbot scenario.
Updating a Chat
- Object is Updated event triggers when any field of the chat is updated (e.g., status, assigned agent). New messages do not count as updates.
Scheduled Events
Use Scheduled events to trigger actions after a set amount of time.
- Object is Created: Triggers for any new object, including chats.
- Object is Completed: Triggers for completed objects (e.g., chats).
- Object Without Activity: Triggers when there’s no public comment or message in the chat for a certain period.
- Due on Passed: Triggers after the Due On date.
To apply these only to chats, set the condition: Object:Type is Chat
Specific Chat Events
- Chat: On Click
Triggered when a user clicks on a specific page element (e.g., a button or link). Specify the element using its HTML selector.Example: Send a message when the "Welcome" button is clicked.
- Chat: User Activity
Triggered by user activity, like time spent on a page.Example: Notify the agent if the user spends too much time on the pricing page.
- Chat: User Opens Chat
Triggered when a user opens the chat window.Example: Send a welcome message when the chat is opened.
Setting Up a Trigger for Chat
- Select the Event: Choose an event based on what you want to trigger (e.g., Chat: Incoming Message, Object is Updated).
- Add Conditions: Define conditions (e.g., Object:Type is Chat) to apply the trigger only to chats.
- Choose Actions: Decide what happens when the conditions are met (e.g., notify agents, send messages to the client).
For Scheduled events, make sure to set the correct delay before triggering.
Examples of Chat Triggers
Example 1
When a chat is created (without a chatbot scenario), automatically assign a responsible agent using smart assignments, notify the responsible, and set the chat status to Opened.
Event: Chat: Incoming Message
Trigger Actions:
- Set: Responsible - Smart Assignment and Notify with Event Template.
- Set: Status - Opened.
Example 2
When a chat is closed, set Lock Replies (the client will not be able to send messages within this chat; a new chat will be created) and send a Satisfaction Survey.
Event: Object is Updated
Conditions: Object: Status changed to Completed.
Trigger Actions:
- Lock Replies.
- Send Satisfaction Survey to Author (creator) with Satisfaction Survey - Template.
Example 3
If there is no response from the client for 10 minutes, send the message: "Since we haven't received any response from you, we will have to close the chat. Please let us know if you have any questions" and change the chat status to Completed.
Event: Scheduled: Object Without Activity - 10 minutes
Conditions: Object: Type is Chat.
Trigger Actions:
- Send Chat Message - Full Message.
- Set: Status - Completed.