Chatbot API-specific activities and events

These activities are specific to API chatbot. Microsoft Bot Framework implements these features by using Direct Line API

Text

Sends a text message with a time stamp. Text formatting can be used for WebChat, Facebook and WhatsApp - since different channels use different types of formatting, we have introduced automatic conversion in our application and it is enough to always send HTML elements to the mluvii. The following tags are allowed: <strong> <em> <a>.

Other tags are removed and ignored.

For the Apple channel, you can use ‘n‘

to insert a new line.

Example of a text message:

{
  "sessionId": <long>,
  "type": "mluvii",
  "timestamp": "2020-09-09T10:03:53.4976861+02:00",
  "text": "Simple sample"
}

Example of formatted text message:

{
  "sessionId": <long>,
  "type": "mluvii",
  "timestamp": "2020-09-09T10:03:53.4976861+02:00",
  "text": "<em>Italic part</em>, <strong>Bold part</strong>"
}

Events

Incoming message

When a client sends a text message to a chat, the following activity arrives at the callback url:

{
  "sessionId": <long>,
  "activity": "Text",
  "text": "Hello world"
}

Incoming file

If the client uploads the file using a paper clip in the chat input, it bot gets an Activity in the following format.

{
  "activity": "GuestFileUpload",
  "fileUrl": <string>, (URL of file uploaded by a client)
}

Last updated