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.

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:

custom message or prompt with a sample pay loaded info

We checked the response in the direct line APIalso:

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 Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s