There are only 4 required fields when passing data into Dimension, but being aware of all the possible fields and how to format them can help when it comes to configuring your unstructured data to be passed into Dimension.
The required fields are User ID, Session ID, Text, and dimensionlabs_timestamp. However, there are several pieces of Metadata that you are already collecting that may be useful for analyzing and enriching your unstructured data. Metadata such as Intents are not required but when passed through to Dimension, these data elements can be leveraged to produce higher fidelity enrichments, insights and visualizations.
Below are the fields or parameters you can send to Dimension along with the format needed.
Message Format
You can send the following fields
| Parameter | Description | Type |
|---|---|---|
| text | Required Text of the message | String |
| userId | Required This should be the same userId for both incoming and outgoing messages. This is not the bot’s user ID | String |
| intent | (Optional) An object containing intent metadata | Object |
| images | (Optional) Urls to any images | Array<Object> |
| sessionId | Loose grouping of a session. This will connect messages across the same day | String |
| conversationId | Strong grouping of a session. Messages with the same conversationId will always appear in the same transcript. | String |
| buttons | (Optional) Button options in the message | Array<Object> |
| postback | (Optional) Record of any button clicks | Object |
| platformJson | (Optional) Send your platform-specific message JSON here. It will be available for viewing in your transcripts. Reporting on this data is available with our enterprise plan. This field is required for ingesting structured metadata to use as part of the Agentic workflow. | Object |
| platformUserJson | (Optional) send any user-specific information (ie. zipcode, A/B test group, etc). Reporting on this data is available from audience builder, with our enterprise plan. If you use these exact field names, they will be used in the expected places on reports:
| Object |
| sessionId | Required The ID for a conversation or full interaction. This is required to "stitch" conversations together. If your data source is not conversational, you may omit | String |
| dimensionlabs_timestamp | Required UNIX timestamp (in milliseconds) of the message. If you want to use your server timestamp you can send a unix-timestamp value see Advanced Usage for more information | Number |
Additional Metadata Format
If you're sending metadata fields, the following formats are needed:
The intent object includes:
| Parameter | Description | Type |
|---|---|---|
| name | name of intent | String |
| inputs | intent inputs | Array<Object> |
The intent input object has fields:
| Parameter | Description | Type |
|---|---|---|
| name | input name | String |
| value | input value | String |
The images field contains image objects that have the fields:
| Parameter | Description | Type |
|---|---|---|
| url | url of the image | String |
The buttons field contains button objects that have the fields:
| Parameter | Description | Type |
|---|---|---|
| id | id of the button | String |
| label | label for the button | String |
| value | value of the button | String |
The postback includes the fields:
| Parameter | Description | Type |
|---|---|---|
| buttonClick | Button click object | Object |
The button click object includes:
| Parameter | Description | Type |
|---|---|---|
| buttonId | id of the clicked button | String |
Example Conversation Payload
{
"text":"Complete message",
"userId":"7675836189527716",
"incoming":true,
"dimensionlabs_timestamp":1703240310000,
"intent": {
"name":"HELLO",
"confidence":0.9634560130000001
},
"type":null,
"sessionId":"1434868331",
"platformJson": {
"anyFieldYouWant": "Mongo Is Appalled",
"gender":"female",
"customerTier":"silver",
"customerStatus":"new",
"locale":"en-CA",
},
}
{
"text":"Platform JSON is optional",
"userId":"7675836189527716",
"incoming":false,
"dimension_timestamp":1703240315000,
"intent": {
"name":"HELLO_RESPONSE"
},
"type":null,
"sessionId":"1434868331",
}
{
"text":"This is the 3rd message in the same session",
"userId":"7675836189527716",
"incoming":true,
"dimensionlabs_timestamp":1703240320000,
"intent": {
"name":"TRACK_ORDER",
"confidence":0.948014021
},
"type":null,
"platformJson": {
"firstMessage":false,
"incoming":true,
"gender":"female",
},
"sessionId":"1434868331"
}
{
"text":"This is a different session, using conversationId",
"userId":"1165873486259425",
"incoming":true,
"dimension_timestamp":1703278090000,
"intent": {
"name":"ORDER_NUMBER",
"confidence":0.999861845
},
"rawEventLogTypeId":1,
"type":null,
"extraInfo": {
"eventName":null
},
"platformJson": {
"gender":"female",
"customerTier":"bronze",
"customerStatus":"new",
"locale":"en-CA"
},
"sessionId":"9950934871",
"conversationId":"9950934871"
},
{
"text":"Second Message, even if it was a week later",
"userId":"1165873486259425",
"incoming":false,
"dimension_timestamp":17032890000,
"platformJson": {
"gender":"male",
"customerTier":"gold",
"customerStatus":"legacy",
"locale":"en-CA"
},
"sessionId":"9950934871",
"conversationId":"9950934871"
}