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 Dimension, 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 Dimension.

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 Dimension, these data elements can be leveraged to produce higher fidelity enrichments, insights and visualizations.

Below are some 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>

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 reports:

  • firstName
  • lastName
  • locale
  • timezone
  • gender

Object

sessionId

(Optional) if you do not want to calculate sessions based on the 5-minute message timeout, you may send sessionId instead.

String

dimension_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, the following formats are needed:

The intent object includes:

ParameterDescriptionType
namename of intentString
inputsintent inputsArray<Object>

The intent input object has fields:

ParameterDescriptionType
nameinput nameString
valueinput valueString

The images field contains image objects that have the fields:

ParameterDescriptionType
urlurl of the imageString

The buttons field contains button objects that have the fields:

ParameterDescriptionType
idid of the buttonString
labellabel for the buttonString
valuevalue of the buttonString

The postback includes the fields:

ParameterDescriptionType
buttonClickButton click objectObject

The button click object includes:

ParameterDescriptionType
buttonIdid of the clicked buttonString