Sending a Payload with custom message in bot framework Direct line API

To have more control over the text formatting of your messages, you can create a custom messageobject and set the properties necessary before sending it to the user.

d12
custom message

But how can we send a payload i.e extra information through the custom message?

The extra information can be useful at client side when using the Direct line API while developing a custom bot client application.

Below code show us how. Using the entities object it is possible:

d10
custom message or prompt with a sample pay loaded info

We checked the response in the direct line APIalso:

d11
API response at client side

Here is the full documentation on how to create custom messages in Bot framework:Create Messages

Hope it helps!

Leave a comment