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.

A rich link is a URL with an image preview and title that can be clicked to open the URL. TORM rich links have some channel-based limitations.

{
 "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

A list picker is a list of options the contact can choose from. The options are typically shown in an overlay with richer formatting capabilities, such as icons, titles, and subtitles. List pickers generally allow for more options than quick replies. Contacts can select more than one option, and the options are persistent in the conversation. TORM list pickers have some channel-based limitations.

{
"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

A quick reply is atext message with buttons. The contact can click one of the buttons. After a click, its content is sent as outbound. Usually, when a reply is sent, it is not possible to click other buttons. TORM quick replies have some channel-based limitations.

{
 "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

Time pickers allow you to offer the contact a choice of times, such as for scheduling appointments. TORM time pickers have some channel-based limitations.

{
"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 digitalClosed Any channel, contact, or skill associated with Digital Experience. chat channelsClosed 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"
  }]   
 }
}