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!

Advertisements

Leave a Reply

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

WordPress.com Logo

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

Google+ photo

You are commenting using your Google+ 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