Live chat events
UpdatedHow it works
If you send live chat events from one of your sources into Data Pipelines, you should shape incoming events using the formats on this page. We use this specification to support default actions—any we have now and ones we might add in the future. If you send live chat events that conform to this specification, you’ll be ready to trigger downstream actions in destinations that rely on an live chat events.
Events in the live chat lifecycle
Live chats typically produce the following events. To make the most of your live chat events, make sure that you use the event names and structures set below.
In general, you’ll open a conversation, send and receive messages, and then close the conversation.
- Live Chat Conversation Started
- LIve Chat Conversation Ended
- Live Chat Message Sent
- Live Chat Message Received
Live Chat Events
Live chat consists of four events. You can see payloads below, but the schema is the same for each; only the event name
changes. These events are from your perspective, so you’ll send Live Chat Message Sent events when you or your agent sends a message and Live Chat Message Received events when you or your agent receives a message.
While all properties
in events are optional, you should send the conversation_id
and message_id
properties in your events at a minimum, so you can trace individual messages to a specific chat instance.
{
"userId": "020ba8yf4r",
"action": "track",
"event": "Live Chat Conversation Started",
"properties": {
"agent_id": "adf21fcad99100",
"agent_name": "Wile E Coyote",
"agent_username": "wileecoyte",
"conversation_duration": 0,
"conversation_id": "abd627dbecffc",
"message_body": "Meep Meep",
"message_id": "fgdaab013614cda"
}
}
- agent_id stringThe ID of the agent taking the conversation.
- agent_name stringThe real name of the agent.
- agent_username stringThe username of the agent.
- conversation_duration integerThe duration of the conversation in seconds. 0 when the conversation starts, and the number of seconds indicates the time in the conversation when each message
- conversation_id stringThe ID of the conversation.
- message_id stringThe ID of the message that starts the conversation.