Metadata Information

Create additional information for the Flow AI engine.

Each message can include additional metadata, which the AI engine also uses to help determine the response.

The following table shows the metadata information.

ParameterDescriptionType
languageISO language code of the message and not the userstring
timezoneMessage’s timezone (where it was sent). Number of hours in UTCnumber
paramsA list of parameters to use within the AIparams 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"
  }]
}