{
"event": "chat_ended",
"chat": {
"chat_id": "3f9e2a64-8c1b-4d7e-9f20-5b6a7c8d9e01",
"loop_id": "ba99c99d-19b9-4a0d-8df6-3e213088989a",
"attempt": 2,
"channel": "sms",
"direction": "outbound",
"from_number": "+17755719467",
"to_number": "+14155552671",
"external_contact_id": "external-123",
"contact_id": "6bd1e7e0-6d00-4c0b-ad5b-daa72457a27d",
"contact_details": {
"company": "Art Studio Inc"
},
"contact_properties": [
{
"key": "industry",
"value": "retail",
"dataType": "string",
"label": "Industry"
}
],
"agent_id": "d8931604-92ad-45cf-9071-d9cd2afbad0c",
"triggered_at": 1731956924302,
"triggered_at_iso": "2024-11-18T15:08:44.302Z",
"started_at": 1731957645000,
"started_at_iso": "2024-11-18T15:20:45.000Z",
"ended_at": 1731959505000,
"ended_at_iso": "2024-11-18T15:51:45.000Z",
"status": "connected",
"transcript": "Agent: Hi Frida, are you still interested in an ice cream machine?\nUser: Yes, but it was too expensive.\nAgent: Thanks, I will pass that on.",
"transcriptObject": [
{
"role": "agent",
"content": "Hi Frida, are you still interested in an ice cream machine?"
},
{
"role": "user",
"content": "Yes, but it was too expensive."
},
{
"role": "agent",
"content": "Thanks, I will pass that on."
}
],
"outcomes": [
{
"key": "custom_lost_reason",
"dataType": "category",
"value": "PRODUCT_TOO_EXPENSIVE",
"reason": "The contact said the product was too expensive."
}
]
},
"contact": {
"contact_id": "6bd1e7e0-6d00-4c0b-ad5b-daa72457a27d",
"external_contact_id": "external-123",
"external_url": null,
"created_at": "2024-11-18T15:00:00.000Z",
"gender": null,
"first_name": "Frida",
"last_name": "Kahlo",
"phone_number": "+14155552671",
"in_call_since": null,
"reached_at": "2024-11-18T15:20:45.000Z",
"contact_details": {
"company": "Art Studio Inc"
},
"call_attempts": 1,
"next_call_at": null,
"email": "[email protected]",
"timezone": "America/Los_Angeles",
"salutation": "Ms.",
"status": "reached",
"properties": [
{
"key": "industry",
"value": "retail",
"dataType": "string",
"label": "Industry"
}
]
}
}Events
Chat beendet
Payload, die telli sendet, wenn ein SMS-Chat endet
WEBHOOK
chat_ended
{
"event": "chat_ended",
"chat": {
"chat_id": "3f9e2a64-8c1b-4d7e-9f20-5b6a7c8d9e01",
"loop_id": "ba99c99d-19b9-4a0d-8df6-3e213088989a",
"attempt": 2,
"channel": "sms",
"direction": "outbound",
"from_number": "+17755719467",
"to_number": "+14155552671",
"external_contact_id": "external-123",
"contact_id": "6bd1e7e0-6d00-4c0b-ad5b-daa72457a27d",
"contact_details": {
"company": "Art Studio Inc"
},
"contact_properties": [
{
"key": "industry",
"value": "retail",
"dataType": "string",
"label": "Industry"
}
],
"agent_id": "d8931604-92ad-45cf-9071-d9cd2afbad0c",
"triggered_at": 1731956924302,
"triggered_at_iso": "2024-11-18T15:08:44.302Z",
"started_at": 1731957645000,
"started_at_iso": "2024-11-18T15:20:45.000Z",
"ended_at": 1731959505000,
"ended_at_iso": "2024-11-18T15:51:45.000Z",
"status": "connected",
"transcript": "Agent: Hi Frida, are you still interested in an ice cream machine?\nUser: Yes, but it was too expensive.\nAgent: Thanks, I will pass that on.",
"transcriptObject": [
{
"role": "agent",
"content": "Hi Frida, are you still interested in an ice cream machine?"
},
{
"role": "user",
"content": "Yes, but it was too expensive."
},
{
"role": "agent",
"content": "Thanks, I will pass that on."
}
],
"outcomes": [
{
"key": "custom_lost_reason",
"dataType": "category",
"value": "PRODUCT_TOO_EXPENSIVE",
"reason": "The contact said the product was too expensive."
}
]
},
"contact": {
"contact_id": "6bd1e7e0-6d00-4c0b-ad5b-daa72457a27d",
"external_contact_id": "external-123",
"external_url": null,
"created_at": "2024-11-18T15:00:00.000Z",
"gender": null,
"first_name": "Frida",
"last_name": "Kahlo",
"phone_number": "+14155552671",
"in_call_since": null,
"reached_at": "2024-11-18T15:20:45.000Z",
"contact_details": {
"company": "Art Studio Inc"
},
"call_attempts": 1,
"next_call_at": null,
"email": "[email protected]",
"timezone": "America/Los_Angeles",
"salutation": "Ms.",
"status": "reached",
"properties": [
{
"key": "industry",
"value": "retail",
"dataType": "string",
"label": "Industry"
}
]
}
}Das Event
chat_ended wird für jeden SMS-Chat zwischen einem Agenten und einem Kontakt einmal gesendet, nachdem der Chat beendet ist und seine Ergebnisse gespeichert sind. Ein Chat endet nach einer Zeit ohne neue Nachrichten, wenn sein Call-Loop ihn beendet oder wenn telli die erste Nachricht nicht senden konnte.
Die Payload entspricht call_ended für SMS-Chats. Felder, die nur für Telefonanrufe gelten, etwa call_status, recording_url oder collected_data, fehlen.
Chat-Status
chat.status beschreibt, was im Chat passiert ist:
connected— der Kontakt hat mindestens eine Nachricht geschriebennot_connected— der Kontakt hat nie geschriebenfailed— telli konnte die erste Nachricht nicht senden
chat.direction ist outbound, wenn telli den Chat begonnen hat, und inbound, wenn der Kontakt ihn begonnen hat. started_at ist der Zeitpunkt der ersten Nachricht des Kontakts im Chat oder null, wenn der Kontakt nie geschrieben hat.
Ergebnisse
chat.outcomes hat dasselbe Format wie outcomes in call_ended. Unter chat.chat_id sind die Ergebniswerte des Chats gespeichert. Chats eines Call-Loops teilen sich dessen loop_id mit den Anrufen des Loops, und attempt zählt Anrufe und Chats.Body
application/json
Antwort
2XX
Acknowledged. Return any 2xx within 15 seconds or the message is retried.
War diese Seite hilfreich?