Skip to main content

The Botium User (user-to-bot) message

Botium User Message is a common format for user-to-bot messages.

Note: Botium Connectors are converting the chatbot provider-specific user-to-bot message to a Botium Bot Message. These Bot messages can then be asserted via Botium Asserters

Live Chat Example

The (simplified) Botium User Message can be inspected in Botium, for example in Live Chat:



Typically the user sends a text message or media, pushes a specific button, or fills out a form. In Botium User Message it means that the "messageText", the "media", the "buttons", or the "forms" field is set.
{
 "sender": "me",
 "messageText": "Hello",
 "buttons": [
   {
     "text": "Push me!",
     "payload": "Push me!"
   }
 ],
 "media": [
   {
     "mimeType": "audio/wav",
     "buffer": "buffer",
     "mediaUri": "testsets/hello.wav",
   }
 ],
 "forms": [
   {
     "name": "username",
     "value": "John Doe"
   },
   {
     "name": "gender",
     "value": "male"
   }
 ],
 "header": {
   "name": "hello",
   …
 },
 "conversation": [
   {
     "sender": "me",
     "messageText": "hello",
     …
   },
   {
     "sender": "bot",
     "messageText": "Hello Joe!"
     …
   }
 ],
 "currentStepIndex": 0,
 "scriptingMemory": {
   "username": "John Doe"
 }
}

Fields for User Interactions

  • messageText: The message sent to the chatbot
    Note: This is not supported by all chatbot technologies!
  • buttons: The pushed button
    Note: This is not supported by all chatbot technologies!
  • media: File/audio sent to the bot.
    Example:
    {
     "media": [
       {
         "mimeType": "audio/wav",
         "buffer": "<buffer base64 encoded>",
         "mediaUri": "hello.wav",
         "downloadUri": "test/scripting/userinputs/convos/hello.wav"
       }
     ]
    }
    
    The Media field provides additional options:
    • mimeType: The mime type
    • buffer: The media in base64 format (optional)
    • mediaUri: The media URL
    • downloadUri: The media URL where the file is stored in the Box
      Note: This is not supported by all chatbot technologies!
  • forms: Key/Value pairs of the form
    Note: This is not supported by all chatbot technologies!

Other Fields

  • sender: It is always "me" in case of the Botium User Message
  • header: Information about the test run, like test case name
  • conversation: The test case
  • currentStepIndex: The current conversation step in the test case
  • scriptingMemory: The context of the conversation, like the user name.

Was this article helpful?

0 out of 0 found this helpful