Template types
All messages in the Kustomer Chat SDKs are defined by the following JSON message template types:
-
Texts: Messages in plain text.
"templateType": "text"
-
Quick replies: Messages customers can select from available response buttons.
"templateType": "quick_replies"
-
Multi-level Lists (MLL): Messages customers can select from a multi-level list with parent list items and children list items.
"templateType": "mll"
-
KObject Lists: KObjects (custom Objects) that customers can select from a list during a conversation with a conversational assistant.
"templateType": "list"
We've provided below sample JSON objects and chat UI images for message template types.
Texts
Messages in plain text.
JSON object template
{
"channel": "chat",
"messageTemplate": {
"templateType": "text",
"body": "Hello world"
},
"conversation": "5f97083cfc8ccb008eb599c0",
"sendAt": "2020-10-26T17:20:12.926Z"
}Quick Replies
Messages customers can select from available response buttons.
JSON object template
{
"channel": "chat",
"messageTemplate": {
"templateType": "quick_replies",
"body": "Hello! What type of issue are you talking about?",
"actions": [{
"displayText": "marketing",
"value": "marketing",
"valueType": "text"
}]
},
"conversation": ":id",
"sendAt": "2020-10-26T17:20:12.926Z"
}
Message template type quick_replies (Quick replies) in the chat UI.
Multi-level Lists (MLL)
Messages customers can select from a multi-level list with parent list items and children list items.
JSON object template
{
"channel": "chat",
"messageTemplate": {
"templateType": "mll",
"body": "Here is an multi-level list, or MLL",
"actions": {
"tree": {
"children": [
{
"id": "tvs",
"displayName": "TVs",
"children": [
{
"id": "size",
"displayName": "size"
}
]
}
]
}
}
},
"conversation": "5f97185c956548008e5fcc40",
"sendAt": "2020-10-26T17:20:12.926Z"
}
Message template type mll (Multi-level Lists) in the chat UI.
KObject Lists
KObjects (custom Objects) that customers can select from a list during a conversation with a conversational assistant.
JSON object template
{
"channel": "chat",
"messageTemplate": {
"templateType": "list",
"body": "Which team can we connect you with?",
"actions": [
{
"imageUrl": "someUrl",
"titleText": "someTitle",
"detailsText": "someDetails",
"value": "someId",
"valueType": "kobject"
}
]
},
"conversation": "5f97185c956548008e5fcc40",
"sendAt": "2020-10-26T17:20:12.926Z"
}
Message template type list (KObject Lists) in the chat UI.
Updated about 2 months ago