The digital interaction webhooks are triggered when a message or conversation event occurs.
Subscribe to this webhook on the Administration > Webhooks page. For more information, refer to Webhooks in the Voiso Documentation Portal.
Event | Description | Webhook |
---|---|---|
message.received | An agent receives a new reply in an ongoing conversation. | Digital interactions |
message.sent | An agent sends a new reply in an ongoing conversation. | Digital interactions |
conversation.ended | A digital conversation is archived (ends), and an agent assigns a wrap-up code. | Digital interactions |
Message received
The Message Received webhook POSTs the following request when a digital channel message is received. Refer to Webhooks overview for descriptions of the common objects used by this webhook.
{
"event": "message.received",
“object: "message",
"timestamp": "2024-05-24T08:36:39Z",
“secret”: "45XXYYZZa08",
"contact_center_id": "187edc75-3008-44e3-8798-aa0bbc12yt703"
"data": {
//message object
//agent object
//contact object
//channel object
}
Example
{
"event": "message.received",
"object": "message",
"timestamp": "2024-07-04T12:38:21Z",
"secret": "87edc123abc787edc7"
"contact_center_id": "187abc75-3008-44e3-5555-aa0abc12yt703"
"data": {
"id": "123450f3-3c33-419e-b8b6-2cb933d014aa",
"reference_id": null,
"content_type": "text",
"content_data": {
"text": "Hi, can you help me with my request, please."
},
"status": "accepted",
"conversation_id": "f0f749d7-46ad-4abc-b094-4c123f8dbfc8",
"agent": {
"id": 487,
"name": "John S",
"email": "[email protected]",
"extension": "8835"
},
"contact": {
"id": 345,
"username": "Guest",
"channel_identifier": "df451a0d1-a3d9-459d-96c2-f23e81f94a6d"
},
"channel": {
"id": "ab5ba051-a8fc-5555-a4ab-cf6f4de6c2ab",
"type": "chat",
"name": "premium support"
}
}
}
Message sent
The Message Sent webhook POSTs the following request when a digital channel message is sent by an agent. Refer to Webhooks overview for descriptions of the common objects used by this webhook.
{
"event": "message.sent",
“object: "message",
"timestamp": 2024-05-24T08:36:39Z,
“secret”: "45XXYYZZa08",
"contact_center_id": "00000000-0000-0000-0000-000000000000" // UUID of the cc
"data": {
//message object
//agent object
//contact object
}
}
Example
{
"event": "message.sent",
"object": "message",
"timestamp": "2024-05-24T08:36:39Z",
"secret": "FAKESECRET12345",
"contact_center_id": "00000000-0000-0000-0000-000000000000",
"data": {
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"reference_id": null,
"content_type": "text",
"content_data": {
"text": "Hello from Voiso!"
},
"status": "sent",
"error_message": null,
"conversation_id": "ffffffff-1111-2222-3333-444444444444",
"agent": {
"id": 10001,
"name": "Support Team",
"email": "[email protected]",
"extension": "1010"
},
"contact": {
"id": 55555,
"username": "John Doe",
"channel_identifier": "919999999999"
},
"channel": {
"id": "gggggggg-hhhh-iiii-jjjj-kkkkkkkkkkkk",
"type": "whatsapp",
"name": "WA 1234567890"
}
}
}
Conversation ended
The Conversation Ended webhook POSTs the following request when a digital channel conversation is archived. Refer to Webhooks overview for descriptions of the common objects used by this webhook.
{
"event": "conversation.ended",
“object: "conversation",
"timestamp": "2024-05-24T08:36:39Z",
“secret”: "45XXYYZZa08",
"contact_center_id": "187edc75-3008-44e3-8798-aa0bbc12yt703"
"data": {
//conversation object
//SLA object
//contact object
//channel object
}
Example
{
"event": "conversation.ended",
"object": "conversation",
"timestamp": "2024-07-05T09:44:58Z",
“secret”: "45XXYYZZa08XXYYZZa08",
"contact_center_id": "187edc75-3008-44e3-8798-aa0bbc12yt703"
"data": {
"id": "050d7df0-971e-4c68-adfd-dbe5df9771df",
"wrapup_code": "Sales Completed",
"queue": "Omnichannel queue",
"disposition": "archived",
"source": "user",
"sla": {
"time_to_first_response": 4,
"time_to_resolution": 14,
"time_to_reply": 8
},
"cpc": 0.04,
"contact": {
"id": 1645,
"username": "Marta Massle",
"channel_identifier": "6661846620607097"
},
"channel": {
"id": "4422cc29-8f43-4d2e-8d52-5212da820567",
"type": "instagram",
"name": "Instagram Support"
}
}
}