Once you fetch your data and are ready to format it, what is the best way to do so?
There are only 3 required fields when passing data into Dashbot, but being aware of all the possible fields and how to format them are equally important when it comes to configuring your unstructured data to be passed into Dashbot.
The main requirements are User ID, Message, and a 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 and Events are not required, but when passed through to Dashbot, these data elements can be leveraged to produce higher fidelity enrichments, insights and visualizations.
Below are some fields or parameters you can send to Dashbot 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> |
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. | 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 Dashbot reports:
| Object |
sessionId | (Optional) if you do not want Dashbot to calculate sessions based on the 5-minute message timeout, you may send sessionId instead. | String |
dashbot_timestamp | (Optional) 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 to Dashbot, 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 |