Learn about the Originator and Profile objects used by the Flow Socket API to include information about the sender of a message

With each message, you can customize information regarding the sender, user, or as Flow calls it, the originator of the message. Use the Profile object to add additional profile information to the originator.

{
  "type": "message.send",
  "payload": {
    "threadId": "EXAMPLE27348ed3bd1439e7b",
    "traceId": 1111111111111,
    "nonce": "SECRET",
    "speech": "Turn off the lights in the Living room",
    "originator": {
      "name": "John Doe",
      "role": "external"
    },
  }
}

Originator fields

ParameterDescriptionType
nameName representing the originatorstring
roleEither external or moderatorstring
profileOptional profile typeprofile object
metadataKey value pairs with additional infoobject

Profile object fields

An originator can contain additional profile information using the profile object.

ParameterDescriptionType
fullNameComplete namestring
firstNameFirst namestring
lastNameFamily namestring
genderGender, M, F or Ustring
localeLocale code (ISO)string
timezoneNumber of hours of UTCnumber
countryTwo letter country codestring
emailEmail addressstring
pictureURL to profile picturestring

Profile object examples

{
  "type": "message.send",
  "payload": {
    "threadId": "EXAMPLE27348ed3bd1439e7b",
    "traceId": 1111111111111,
    "speech": "has my milk expired?",
    "originator": {
      "name": "John Doe",
      "role": "external",
      "profile": {
        "fullName": "John Doe",
        "firstName": "John",
        "lastName": "Doe",
        "gender": "M",
        "locale": "en-US",
        "timezone": -5,
        "country": "us",
        "email": "[email protected]",
        "picture": "https://..."
      }
    }
  }
}
{
  "type": "message.send",
  "payload": {
    "threadId": "EXAMPLE27348ed3bd1439e7b",
    "speech": "I want to book a flight between Amsterdam and Toronto",
    "originator": {
      "name": "John Doe",
      "role": "external",
      "metadata": {
        "clientNumber": "asddaasq333ee332",
        "preference": "A,B,G"
      }
    }
  }
}