Class Action
-
button - Required for List Messages - It cannot be an empty string and must be unique within the message. Emojis are supported, markdown is not. Maximum length: 20 characters
-
buttons - Required for Reply Buttons - A button object can contain the following parameters:
type: only supported type is reply (for Reply Button)
title: Button title. It cannot be an empty string and must be unique within the message. Emojis are supported, markdown is not. Maximum length: 20 characters.
id: Unique identifier for your button. This ID is returned in the webhook when the button is clicked by the user. Maximum length: 256 characters.
You can have up to 3 buttons. You cannot have leading or trailing spaces when setting the ID.
- catalog_id - Required for Single Product Messages and Multi-Product Messages - Unique identifier of the Facebook catalog linked to your WhatsApp Business Account. This ID can be retrieved via the Meta Commerce Manager.
- product_retailer_id - Required for Single Product Messages and Multi-Product Messages - Unique identifier of the product in a catalog.
To get this ID go to Meta Commerce Manager and select your Meta Business account. You will see a list of shops connected to your account. Click the shop you want to use. On the left-side panel, click Catalog > Items, and find the item you want to mention. The ID for that item is displayed under the item's name.
- sections - Required for List Messages and Multi-Product Messages - Array of section objects. Minimum of 1, maximum of 10. See section object.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd button action.addSection
(Section section) Add section action.Gets buttons.Gets button text.Gets catalog id.Gets product retailer id.Gets sections.setButtons
(List<Button> buttons) Sets buttons.setButtonText
(String buttonText) Sets button text.setCatalogId
(String catalogId) Sets catalog id.setProductRetailerId
(String productRetailerId) Sets product retailer id.setSections
(List<Section> sections) Sets sections.
-
Constructor Details
-
Action
public Action()
-
-
Method Details
-
getCatalogId
Gets catalog id.- Returns:
- the catalog id
-
setCatalogId
Sets catalog id.- Parameters:
catalogId
- Required for Single Product Messages and Multi-Product Messages - Unique identifier of the Facebook catalog linked to your WhatsApp Business Account. This ID can be retrieved via the Meta Commerce Manager.- Returns:
- the catalog id
-
getProductRetailerId
Gets product retailer id.- Returns:
- the product retailer id
-
setProductRetailerId
Sets product retailer id.- Parameters:
productRetailerId
- the product retailer id- Returns:
- the product retailer id
-
getButtonText
Gets button text.- Returns:
- the button text
-
setButtonText
Sets button text.- Parameters:
buttonText
- the button text- Returns:
- the button text
-
getButtons
Gets buttons.- Returns:
- the buttons
-
setButtons
Sets buttons.- Parameters:
buttons
- the buttons- Returns:
- the buttons
-
addButton
Add button action.- Parameters:
button
- the typeButton
- Returns:
- the action
-
getSections
Gets sections.- Returns:
- the sections
-
setSections
Sets sections.- Parameters:
sections
- List of @Section
- Returns:
- the sections
-
addSection
Add section action.- Parameters:
section
- the section- Returns:
- the action
-