public class DeskMessageUtil extends Object
createMessage(String, Map) or createMessage(String, String, String, Map) to render a message based on your template.
 You can use a message code in combination with a language and optional channel to even make messages channel specific (e.g. a message internally might be
 rendered in a different way as for WhatsApp or WeChat, etc). Use DEFAULT_CHANNEL as the default.| Modifier and Type | Field and Description | 
|---|---|
| static String | DEFAULT_CHANNEL | 
| static String | DEFAULT_LANGUAGE | 
| static String | DESK_AND_TICKET_MESSAGES_TEMPLATE_KEYThe template definition key used for standard messages. | 
| static String | VARIANT_KEY_CHANNEL | 
| static String | VARIANT_KEY_LANGUAGE | 
| static String | VARIANT_KEY_MESSAGE_CODE | 
| Modifier and Type | Method and Description | 
|---|---|
| static String | createMessage(String messageCode,
             Map<String,Object> payload)Creates a standard message based on the provided message code and payload. | 
| static String | createMessage(String messageCode,
             String language,
             String channel,
             Map<String,Object> payload)Creates a standard message based on the provided message code and payload. | 
public static final String DESK_AND_TICKET_MESSAGES_TEMPLATE_KEY
public static final String VARIANT_KEY_MESSAGE_CODE
public static final String VARIANT_KEY_LANGUAGE
public static final String VARIANT_KEY_CHANNEL
public static final String DEFAULT_LANGUAGE
public static final String DEFAULT_CHANNEL
public static String createMessage(String messageCode, Map<String,Object> payload)
TemplateVariationModel. This one uses the default language and channel.messageCode - the message code to choose the template variation forpayload - the optional payload containing the necessary parameters (if any needed by the template)public static String createMessage(String messageCode, String language, String channel, Map<String,Object> payload)
TemplateVariationModel.messageCode - the message code to choose the template variation forlanguage - the language (e.g. "en") for which the message should be renderedchannel - the channel (e.g. "WhatsApp") for which the message should be renderedpayload - the optional payload containing the necessary parameters (if any needed by the template)Copyright © 2019. All rights reserved.