TORM JSON 스키마
이 페이지는 다음 TORM 리치 미디어 요소에 대한 JSON 스키마를 제공합니다.
- 목록 선택기
- 빠른 응답
- 시간 선택기
- 리치 링크
- 적응형 카드
스크립트에서 사용할 수 있는 TORM 요소는 다음과 같습니다. 컨택 에 전송하기 위한 SNIPPET 동작으로 TORM 요소를 빌드할 수 있습니다. 요소를 사용하기 전에, 작업하고 있는 디지털 채널 이 해당 요소를 지원하는지 확인합니다.
아웃바운드 API를 사용하여 이러한 요소를 직접 전송할 수 있습니다. 이 페이지의 TORM 예시는 아웃바운드 API messageContent 매개 변수에 대해 따라야 할 스키마를 보여줍니다.
리치 링크
리치 링크는 이미지 미리보기와 제목이 있는 URL로, 클릭하면 URL이 열립니다. TORM이 풍부한 링크에는 일부 채널 기반 제한이 있습니다.
{
"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"
}
}
목록 선택기
목록 선택기는 연락처가 선택할 수 있는 옵션 목록입니다. 옵션은 일반적으로 아이콘, 제목, 자막과 같은 리치 서식 지정 기능을 갖춘 오버레이로 표시됩니다. 목록 선택기는 일반적으로 빠른 응답보다 더 많은 옵션을 허용합니다. 컨택은 두 가지 이상의 옵션을 선택할 수 있으며, 옵션은 대화에서 영구적으로 유지됩니다. TORM 목록 선택기에는 일부 채널 기반 제한이 있습니다.
{
"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"
}
]
}
빠른 응답
빠른 답장은 버튼이 있는 문자 메시지입니다. 컨택은 버튼 중 하나를 클릭할 수 있습니다. 클릭하고 나면 내용 중 하나가 아웃바운드로 전송됩니다. 일반적으로 답장이 전송되면 다른 버튼을 클릭할 수 없습니다. TORM 빠른 답변에는 일부 채널 기반 제한이 있습니다.
{
"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\"}"
}
]
}
}
시간 선택기
시간 선택기를 사용하면 약속 일정을 잡는 등의 목적으로 연락처에 시간을 선택할 수 있습니다. TORM 시간 선택기에는 일부 채널 기반 제한이 있습니다.
{
"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
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"
}]
}
}