TORM JSON Schemas

部分TORM元素可用於指令碼中。您可以在SNIPPET動作中建立它們,以傳送給聯絡人。使用元素之前,請先確認您使用的數碼通道支援該元素。

您可以使用Outbound API Icon of a square with an arrow point from the center through the top right corner.直接傳送這些元素。

在 NiCE CXone 開發人員網站上的 Outbound API 中可取得以下 TORM 豐富媒體元素的 JSON 結構定義:

  • 自適應卡片
  • 清單選取器
  • 快速回覆
  • 富連結
  • Text/HTML
  • 時間選取器

JSON 結構

本頁所述每個TORM元素的JSON必須正確地嵌套於以下有效載荷結構中。請將<rich content JSON>替換為TORM JSON。

必填 PROPERTIES:type、payload

{
 "prompts": [{ 
   "mediaSpecificObject": {  
	"dfoMessage": {  
	  "messageContent": {	
		"type": "PLUGIN"
		"payload": {
		  [rich message payload]
		 }
		"fallbackText": "Text sent as fallback if external platform can't accept rich messages."
		"postback": "Value sent to system to identify what action the user takes"
		}	 
	   ]	   
	  } 	  
     }	
    }	
   }  
  } 
 ]
}

範例:

{
"prompts": [{ 
  "mediaSpecificObject": {  
    "dfoMessage": {   
      "messageContent": {	
        "type": "PLUGIN",	 
        "payload": {	
          "elements": [{	  
          "id": "bf2521f4-5e85-413f-b6ed-815d1c3905f0",
          "type": "TEXT",	   
          "fallbackText": "Text sent as fallback if external platform can't accept rich messages.",	  
          "text": "This is a successfully created outbound message."
          "mimeType": "text/html"     
        }]
        "postback": "postback-value"  
        "fallbackText": "Text sent as fallback if external platform can't accept rich messages." 
        } 	  
      }	
    }	
   }  
  }]	
}