Interface WhatsAppTemplateMessageBuilder
- All Known Implementing Classes:
WhatsAppTemplateMessageBuilderImpl
public interface WhatsAppTemplateMessageBuilder
- Author:
- Filip Hrisafov, Anatolii Balakiriev
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptionaddTemplateTextParameter
(String parameter) Add a positional text parameter to the body.addTemplateTextParameters
(Collection<String> parameters) Add positional text parameters to the body.body()
Initiates creation of the body.businessAccountId
(String businessAccountId) The id of the business account that should be used when sending out the message.button()
Initiates creation of the button.externalUserId
(String externalUserId) The id of the recipient of the message.footer()
Initiates creation of the footer.header()
Initiates creation of the header.The language of the template that should be used.mediaHeader
(String mediaId) The content item ID for the media header.The id of the reference message within the Engage system.void
send()
Perform the send of the template message.templateId
(String templateId) The id of the template that is registered on the WhatsApp sidetimeToLive
(Duration timeToLive) Time To Live (TTL) duration.
-
Method Details
-
timeToLive
Time To Live (TTL) duration. -
templateId
The id of the template that is registered on the WhatsApp side -
language
The language of the template that should be used. -
addTemplateTextParameter
Add a positional text parameter to the body.Short circuit for calling
body()
, thenWhatsAppTemplateMessageBuilder.ComponentBuilder.addTextParameter(String)
and thenWhatsAppTemplateMessageBuilder.ComponentBuilder.buildComponent()
Note: The parameter must be added in the correct order according to the template message.
-
addTemplateTextParameters
Add positional text parameters to the body.Short circuit for calling
body()
, thenWhatsAppTemplateMessageBuilder.ComponentBuilder.addTextParameter(String)
and thenWhatsAppTemplateMessageBuilder.ComponentBuilder.buildComponent()
Note: The parameters must be added in the correct order according to the template message.
-
externalUserId
The id of the recipient of the message. This is the id of the user within the WhatsApp system. -
businessAccountId
The id of the business account that should be used when sending out the message. -
messageId
The id of the reference message within the Engage system. It is used in order to correlate the WhatsApp message and the Engage message. -
send
void send()Perform the send of the template message. -
header
Initiates creation of the header. After you are done building this component - callWhatsAppTemplateMessageBuilder.ComponentBuilder.buildComponent()
method to build and add it to the parent builder.- Returns:
- header-specific builder.
-
mediaHeader
The content item ID for the media header.- Parameters:
mediaId
- the media header
-
body
Initiates creation of the body. After you are done building this component - callWhatsAppTemplateMessageBuilder.ComponentBuilder.buildComponent()
method to build and add it to the parent builder.- Returns:
- body-specific builder.
-
button
Initiates creation of the button. After you are done building this component - callWhatsAppTemplateMessageBuilder.ComponentBuilder.buildComponent()
method to build and add it to the parent builder.- Returns:
- button-specific builder.
-