Metadata Information
Each message can include additional metadata, which the AI engine also uses to help determine the response.
The following table shows the metadata information.
| Parameter | Description | Type |
|---|---|---|
| language | ISO language code of the message and not the user | string |
| timezone | Message’s timezone (where it was sent). Number of hours in UTC | number |
| params | A list of parameters to use within the AI | params object |
The following is an example of a text message with metadata:
{
"type": "message.send",
"payload": {
"threadId": "EXAMPLE327348ed3bd1439e7b",
"speech": "I want to book a flight between Amsterdam and Toronto",
"originator": {
"name": "John Doe",
"role": "external"
},
"metadata": {
"language": "en-US",
"timezone": -6,
"params": {
"seats": [{
"value": "Business class"
}]
}
}
}
}Params object
The params object resembles the result generated by the AI engine through entity classification. Each parameter is a list of objects formatted as [{ value }].
The following is an example of a params object:
{
"passengerCount": [{
"value": "2"
}]
}
{
"food": [{
"value": "food-item-22332",
"match": "Pizza Hawaii"
}, {
"value": "food-item-44525",
"match": "Pizza Calzone"
}]
}Updated 12 days ago