Class DeskMessageUtil

java.lang.Object
com.flowable.engage.engine.impl.desk.DeskMessageUtil

public class DeskMessageUtil extends Object
This utility helps creating template based messages used within desk and ticket conversations. You can then use createMessage(String, String, Map) or createMessage(String, 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.
Author:
Micha Kiener
  • Field Details

  • Method Details

    • createMessage

      public static String createMessage(String messageCode, String tenantId, Map<String,Object> payload)
      Creates a standard message based on the provided message code and payload. The payload must at least contain the necessary parameters as being defined within the TemplateVariationModel. This one uses the default language and channel.
      Parameters:
      messageCode - the message code to choose the template variation for
      tenantId - the id of the tenant
      payload - the optional payload containing the necessary parameters (if any needed by the template)
      Returns:
      the rendered standard message
    • createMessage

      public static String createMessage(String messageCode, String language, String channel, String tenantId, Map<String,Object> payload)
      Creates a standard message based on the provided message code and payload. The payload must at least contain the necessary parameters as being defined within the TemplateVariationModel.
      Parameters:
      messageCode - the message code to choose the template variation for
      language - the language (e.g. "en") for which the message should be rendered
      channel - the channel (e.g. "WhatsApp") for which the message should be rendered
      tenantId - the id of the tenant
      payload - the optional payload containing the necessary parameters (if any needed by the template)
      Returns:
      the rendered standard message