Digital Interactions in JSON Format
About Digital Interactions in JSON Format
XM Discover enables you to upload digital interactions via JSON files. Digital interactions need to follow the format outlined on this page to be available for conversational analytics.
Digital Interaction Fields
Top-Level Objects
The following table describes the top-level objects of a document node.
Element | Description |
conversationId | A unique ID for the entire conversation.
You can map this field to the natural_id attribute to use it as the document’s Natural ID. |
conversationTimestamp | The date and time of the entire conversation. Use the ISO 8601 format with seconds precision.
You can map this field to the document_date attribute to use it as Document Date. |
content | An object that contains the content of the conversation. Includes these nested objects:
|
custom fields (attributes) | You can provide multiple key-value pairs to add structured attributes to the conversation. |
content Object
The following table describes the objects nested inside the content object.
Element | Description |
participants | An array of objects that provides information about the participants of the conversation. Includes these fields:
|
conversationContent | An array of objects that contains the lines of the conversation. Includes these fields:
|
participants Object
The following table describes the fields nested inside the participants object.
Element | Description |
participantId
(required) |
The ID of the participant. Must be unique per conversation (document). |
participantType
(Required) |
The type of the participant. Possible values:
These values are passed through to the CB Participant Type attribute for reporting and participants visualization. If unspecified, CB Participant Type will have no reportable value. |
is_bot
(Optional) |
A Boolean field that indicates whether a participant is a chat bot or a person.
These values are passed through to the CB Kind of Participant attribute for reporting and participants visualization. If unspecified, CB Kind of Participant will have no reportable value. |
conversationContent Object
The following table describes the fields nested inside the conversationContent object.
Element | Description |
participantId
(Required) |
The ID of the participant who is speaking. Must match one of the IDs provided in the participants array. |
text
(Required) |
Speech transcript.
Attention: A sum of all text elements may not exceed 100,000 characters. If it does, the document is skipped.
|
timestamp
(Required) |
The date and time of the message. Use the ISO 8601 format with seconds precision. |
id
(Required) |
The unique ID of the message.
Call Transcript Example |
Digital Interaction Example
Here is an example of a call transcript between an agent and a client.
[
{
"conversationId": "37852",
"conversationTimestamp": "2020-07-30T12:42:15.000Z",
"content": {
"participants": [
{
"participantId": "1",
"participantType": "AGENT",
"is_bot": true
},
{
"participantId": "2",
"participantType": "CLIENT",
"is_bot": false
}
],
"conversationContent": [
{
"participantId": "1",
"text": "Hello, how may I help you?",
"timestamp": "2020-07-30T12:42:15.000Z",
"id": "3785201"
},
{
"participantId": "2",
"text": "Hi, are you open today?",
"timestamp": "2020-07-30T12:42:15.000Z",
"id": "3785202"
},
{
"participantId": "1",
"text": "We're open from 17:00 till 23:00.",
"timestamp": "2020-07-30T12:42:15.000Z",
"id": "3785203"
},
{
"participantId": "2",
"text": "I'd like to make a reservation.",
"timestamp": "2020-07-30T12:42:15.000Z",
"id": "3785204"
},
{
"participantId": "1",
"text": "Absolutely! What name can I use?",
"timestamp": "2020-07-30T12:42:15.000Z",
"id": "3785205"
}
]
},
"city": "Boston",
"source": "Facebook"
}
]
For an overview of all XM formats, please see XM Discover Data Formats Overview.