Message format
Message structure
The StartChat intent can take an optional message property, that will contain a preset message that the user can preview and send in the chat.
The message can include rich text, using markdown. We support paragraphs, bullet points and links, as well as text in bold and italic. In addition, we also support entities such as mentions, cashtags, hashtags, attachments (including images) and action buttons.
It is possible to add several images or action buttons in a message.
FDC3 Action buttons
We also support FDC3 action buttons, that can be included in a chat message and trigger an intent or broadcast a context when clicked by a user.
Action buttons can be placed at a specific location in the message by referencing them in the text section using the following format: §[My button 1](id/button1) where button1 is the identifier of the entity, and My Button 1 is the fallback text that would be displayed if the user viewing the message does not have FDC3 enabled.
The behavior of an action button is then described in the entities section of the context data. It is possible to specify which title the button will have and which intent and contextdata will be raised when clicked, or even the channel used. When an intent is used, it is also possible to specify a predefined app (using its appId) that will receive the intent, in order to bypass the platform intent resolver.
Few examples of action buttons are available below.
Examples
See below few examples of messages showing how they are structured.
{
"type": "fdc3.chat.initSettings",
"message": {
"type": "fdc3.message",
"text": {
"text/markdown": "\n\n Rich text example: \n\n Bullet points:\n - bullet 1 \n - bullet 2 \n\n Text in *italic* \n\n Text in **bold** \n\n Link: [Symphony](https://www.symphony.com)"
}
},
"members": {
"type": "fdc3.contactList",
"contacts": [
{
"type": "fdc3.contact",
"id": {
"email": "[email protected]"
}
}
]
}
}Last updated
Was this helpful?