TORM JSON 스키마
이 페이지는 다음 TORM 리치 미디어 요소에 대한 JSON 스키마를 제공합니다.
- 텍스트/HTML
- 목록 선택기
- 빠른 응답
- 시간 선택기
- 리치 링크
- 적응형 카드
스크립트에서 사용할 수 있는 TORM 요소는 다음과 같습니다. 컨택 에 전송하기 위한 SNIPPET 동작으로 TORM 요소를 빌드할 수 있습니다. 요소를 사용하기 전에, 작업하고 있는 디지털 채널 이 해당 요소를 지원하는지 확인합니다.
아웃바운드 API를 사용하여 이러한 요소를 직접 전송할 수 있습니다. 이 페이지의 TORM 예시는 아웃바운드 API messageContent 매개 변수에 대해 따라야 할 스키마를 보여줍니다.
JSON 구조
이 페이지에 설명된 각 TORM 요소에 대한 JSON은 다음 페이로드 구조에 적절하게 중첩되어야 합니다.
{ "prompts": [{ "mediaSpecificObject": { "dfoMessage": { "messageContent": {
[rich content JSON]} ] } } } } } ] }
예:
{ "prompts": [{ "mediaSpecificObject": { "dfoMessage": { "messageContent": {
"type": "PLUGIN", "payload": { "elements": [{ "id": "bf2521f4-5e85-413f-b6ed-815d1c3905f0", "type": "FILE", "filename": "photo.jpg", "url": "https://www.nice.com/-/media/niceincontact/layout/nice-logo-web-header/nice-web-logo.ashx", "mimeType": "image/jpeg"
} ] } } } } } ] }
텍스트/HTML
일반 텍스트나 HTML 코드로 표시된 텍스트를 보낼 수 있습니다.
{
"type": "TEXT",
"fallbackText": "Text sent as fallback if external platform can't accept rich messages.",
"payload": {
"text": "<p><b>This</b> is a successfully created outbound message.</p>"
}
}
목록 선택기
목록 선택기는 연락처가 선택할 수 있는 옵션 목록입니다. 옵션은 일반적으로 아이콘, 제목, 자막과 같은 리치 서식 지정 기능을 갖춘 오버레이로 표시됩니다. 목록 선택기는 일반적으로 빠른 응답보다 더 많은 옵션을 허용합니다. TORM 목록 선택기에는 일부 채널 기반 제한이 있습니다. 선택은 대화에서 지속적으로 나타납니다.
연락처는 Apple Messages for Business채널에서 두 개 이상의 옵션을 선택할 수 있습니다.
{
"type": "LIST_PICKER",
"fallbackText": "Text sent as fallback if external platform can't accept rich messages.",
"payload": {
"title": {
"content": "Choose a color!"
},
"text": {
"content": "What is your favorite color?"
},
"options": {
"multiselect": false
}
"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"
}
]
}
빠른 응답
빠른 답장은 버튼이 있는 문자 메시지입니다. 컨택은 버튼 중 하나를 클릭할 수 있습니다. 클릭하고 나면 내용 중 하나가 아웃바운드로 전송됩니다. 일반적으로 답장이 전송되면 다른 버튼을 클릭할 수 없습니다. TORM 빠른 답변에는 일부 채널 기반 제한이 있습니다.
{
"type": "QUICK_REPLIES",
"fallbackText": "Text sent as fallback if external platform can't accept rich messages.",
"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\"}"
}
]
}
}
시간 선택기
시간 선택기를 사용하면 약속 일정을 잡는 등의 목적으로 연락처에 시간을 선택할 수 있습니다. TORM 시간 선택기에는 일부 채널 기반 제한이 있습니다.
{
"type": "TIME_PICKER",
"fallbackText": "Text sent as fallback if external platform can't accept rich messages.",
"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
}
}
}
리치 링크
리치 링크는 이미지 미리보기와 제목이 있는 URL로, 클릭하면 URL이 열립니다. TORM이 풍부한 링크에는 일부 채널 기반 제한이 있습니다.
{
"type": "RICH_LINK",
"fallbackText": "Text sent as fallback if external platform can't accept rich messages.",
"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"
}
}
Adaptive Cards
Adaptive Cards는 Microsoft이 개발한 플랫폼 독립적인 리치 미디어 전송 방식입니다. Adaptive Cards은 디지털 Digital Experience에 연결된 모든 채널, 컨택 또는 스킬입니다. 채팅 채널
컨택 센터에서 고객 인터랙션을 원활하게 지원하는 다양한 음성 및 디지털 커뮤니케이션 매체를 말합니다.에서만 지원됩니다.
{
"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"
}]
}
}