HomeGuidesAPI ReferenceChangelogDiscussions
API Reference

chat.assigned

This event occurs when a chat is assigned to a Virtual Agent. Chats can be assigned to a VA in any of the following ways:

  • Intelligent Routing Rules
  • REST APIs (POST /chats and PATCH /chats/ and PATCH /internal/chats/)
  • Auto Assign to Agents Toggle
{
  "event_type": "chat.assigned",
  "channel": "LiveChat",
  "chat_id": "CSRCJ17FWP50IOZ9",
  "asset": "im15102452",
  "destination_id": "d3a7c304-da43-4ab2-bf7c-0ea4733ab16c",
  "thread_id": "ece941a6-3103-4232-947b-d3b5b31fe866",
  "browserfingerprint": "d3a7c304-da43-4ab2-bf7c-0ea4733ab16c",
  "subject": "",
  "posted_on": "2020-07-06T07:11:33.2599382Z",
  "payload": {
    "skill": "",
    "messages": [
      {
        "transid": "89149b44-ed51-4760-a1a4-729376fb0602",
        "type": "text",
        "text": "This is a sample message content",
        "attachments": [],
        "timestamp": "2020-07-02T05:04:27.93Z",
        "interactive_response": null,
        "wab_interactive_response": {
          "identifier": "<uuid>",
          "title": "Button 1"
        }
      }
    ]
  },
  "transaction_id": "030f2ce37c2e4d199246abe89271b94f"
}

Payload Description

NameTypeDescription
event_typestringContains a pre-fixed name of the event
channelenumChannel on which chat has been created:

- sms

- facebook

- twitter

- livechat

- email

- abc

- whatsapp

- api
chat_idstringUnique identifier of a chat
destination_idstringThe destination ID of the end customer being addressed based on the channel

- SMS - Mobile No

- Facebook - PS ID

- Twitter - Twitter ID

- Email - Email ID

- API - User ID

- Livechat - Livechat ID

- Apple Business Chat - ABC Opaque User ID

- WhatsApp Business - WhatsApp Mobile Number
thread_idstringUnique identifier of a chat on the Livechat widget

Applicable to Livechat channel alone
browserfingerprintstringUnique identifier of a customer's device on the Livechat widget. Stored in a cookie within the customer's browser (to fetch previous chat history if at all widget chat history is enabled by the Client Admin)

Applicable to Livechat channel alone
subjectstringSubject of the Email chat

Applicable to Email channel alone
posted_ondatetimeTimestamp of when the event request was initiated from Webex Engage
payloadobjectContains an JSON object specific to the event_type

chat.assigned - Payload OBJECT

NameTypeDescription
skillstringName of the skill that is mapped to a chat.

Contains null if no skill has been mapped
messagesarrayContains the last message (OBJECT) received/sent from/to the customer on the chat.

This block is channel specific. Kindly refer to the message OBJECT definition in POST /chats (listed in the API v3.0 section) for further details
transidstringUnique trace of the request streamed onto the BOT's webhook

📘

Note

Replies to WhatsApp's interactive templates are received under the object wab_interactive_response

👍

Best Practice

We recommend BOT developers to store the chat ID and transid received as part of any events received. These details will help our support teams debug better should any issues arise as part of the integration