TORM JSON Schemas
This page provides the JSON schemas for the following TORM rich media elements:
- List pickers
- Quick replies
- Time pickers
- Rich links
- Adaptive cards
These are the TORM elements that are available to be used in scripts. You can build them in a SNIPPET action to send to contacts . Before using an element, verify that the digital channel you're working with support that element.
You can send these elements directly using the Outbound API. The TORM examples on this page are show the schema to follow for the Outbound API's messageContent parameter.
Rich Link
{
"type": "RICH_LINK",
"fallbackText": "Text sent if rich message is not available on external platform",
"payload": {
"media": {
"fileName": "place-kitten.jpg",
"url": "https://placekitten.com/200/300",
"mimeType": "image/jpeg"
},
"title": {
"content": "Check our new gadget!"
},
"url": "https://www.google.com"
}
}
List Picker
{
"type": "LIST_PICKER",
"fallbackText": "Text sent if rich message is not available on external platform",
"payload": {
"title": {
"content": "Choose a color!"
},
"text": {
"content": "What is your favourite color?"
},
"actions": [
{
"type": "REPLY_BUTTON",
"icon": {
"fileName": "place-kitten.jpg",
"url": "https://placekitten.com/200/300",
"mimeType": "image/jpeg"
},
"text": "red",
"description": "Like a tomato",
"postback": "/red"
},
{
"type": "REPLY_BUTTON",
"icon": {
"fileName": "place-kitten.jpg",
"url": "https://placekitten.com/200/300",
"mimeType": "image/jpeg"
},
"text": "Green",
"description": "Like an apple",
"postback": "/green"
}
]
}
Quick Replies
{
"type": "QUICK_REPLIES",
"fallbackText": "Text sent if rich message is not available on external platform",
"payload": {
"text": {
"content": "Hello, we will deliver the package between 12:00 and 16:00. Please specify which day."
},
"actions": [
{
"type": "REPLY_BUTTON",
"text": "Today",
"postback": "{\"id\":\"1\"}"
},
{
"type": "REPLY_BUTTON",
"text": "Tomorrow",
"postback": "{\"id\":\"2\"}"
}
]
}
}
Time Picker
{
"type": "TIME_PICKER",
"fallbackText": "Text sent if rich message is not available on external platform",
"payload": {
"title": {
"content": "Check our new gadget!"
},
"timeSlots": [
{
"id": "unique-id",
"duration": 3600,
"startTime": "2017-05-26T08:27:55+00:00"
}
],
"location": {
"title": {
"content": "Check our new gadget!"
},
"latitude": 44.44,
"longitude": 55.55,
"radius": 33.3
}
}
}
Adaptive Card
Allows you to send an adaptive card. Adaptive cards are only supported on digital Any channel, contact, or skill associated with Digital Experience. chat channels A way for contacts to interact with agents or bots. A channel can be voice, email, chat, social media, and so on..
{
"type": "ADAPTIVE_CARD",
"fallbackText": "Url sent: https://placekitten.com",
"payload": {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.5",
"body": [{
"type": "Image",
"url": "https://placekitten.com/200/300",
"spacing": "none",
"size": "stretch"
}],
"actions": [{
"type": "Action.OpenUrl",
"title": "Show me the cats!",
"url": "https://placekitten.com"
}]
}
}