Template types
Kustomer Chat message template types with sample JSON object templates and UI examples.
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"
}
![Screen Shot 2021-10-27 at 4.20.14 PM.png 1074](https://files.readme.io/ffb2e8e-Screen_Shot_2021-10-27_at_4.20.14_PM.png)
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-mll.png 790](https://files.readme.io/ccc93fe-message-template-mll.png)
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"
}
![Screen Shot 2021-06-17 at 2.44.01 PM.png 417](https://files.readme.io/8110ccb-Screen_Shot_2021-06-17_at_2.44.01_PM.png)
Message template type list
(KObject Lists) in the chat UI.
Updated almost 3 years ago