편집

다음을 통해 공유


Markdown formats in custom channels that use Direct Line

In Omnichannel for Customer Service, you can send and receive messages formatted with Markdown in custom messaging channels using Direct Line API 3.0. As a developer, understanding how the Markdown format is passed through the channel and knowing the details of the format will help you update the HTML styling and tags in your own user interface.

In the Direct Line channel, when an agent sends (outbound) a message formatted with Markdown to a Direct Line bot, the bot receives the message in a certain format. Now, if a bot receives (inbound) a formatted message from a customer, it must be able to correctly interpret the message that's formatted with Markdown. As a developer, you'll need to use Markdown appropriately so that the message is formatted correctly for your agents and customers.

Markdown formats

The following table lists the Markdown formats used in inbound messages sent by the customer and outbound messages sent by the agent to the customer.

Style Inbound Outbound Example
bold **bold** **bold** text
italics _italics_ _italics_ text
strikethrough ~strikethrough~ ~strikethrough~ text
blockquote > blockquote > blockquote > text
header (levels 1–4) ### header3 ### header3 Text
hyperlink https://www.microsoft.com https://www.microsoft.com https://www.microsoft.com
hyperlink with text [text](https://www.microsoft.com) [text](https://www.microsoft.com) Microsoft website
monospace ```
text
```
```
text
```
text
numbered list <number> item one <number> item one 1. item one
2. item two
unordered list * item one
or
- item one
`* item one
or
- item one
* item one
* item two
new line Paragraph 1 <br> Paragraph 2 </br> Paragraph 1
Paragraph 2

Note

Currently, we don't support the <Shift + Enter> key combination to add multiple line breaks.

For inbound messages, set the Markdown text to the Activity object's text property.

For outbound messages, the Markdown text will be received in the Activity object's text property (similar to a normal message).

Next steps

Bring your own custom messaging channel using Direct Line
Sample code to bring your own channel
Configure custom messaging channel

Support for live chat and asynchronous channels
Enable formatted messages
Markdown formats for agents
Key concepts in Direct Line API 3.0