Offer Products for Customers to Order
Use the communication channels on the Infobip API to offer your products and services for customers to order.
This tutorial explains how to use Product and Multi-product messages in WhatsApp to offer products that are present in your catalog. Customers can ask questions about the product, add the product to the cart, and submit the cart without leaving WhatsApp.
Process Workflow
Before Getting Started
You must have the following:
- Infobip account to use the communication channels. Log on (opens in a new tab) or register for an account
- Registered WhatsApp sender
- Facebook page for your business
- WhatsApp Business Manager account with administrator access (opens in a new tab)
- Template, which is approved by WhatsApp, for the campaign
Implementation Steps
You can implement this tutorial by using the WhatsApp Business Solution API.
Notification with promotional message from brand | Reply buttons | Menu that contains the selected product type | Product details page |
---|---|---|---|
Create Catalog
If you want to use your existing Meta catalog, ignore this step.
To create a new catalog, follow these steps:
-
Go to Facebook Commerce Manager (opens in a new tab).
-
Click Create a catalog.
-
Choose your catalog type from the options.
-
Assign a business portfolio as a catalog owner. A business portfolio offers more functionality to use catalogs and enables you to assign permission to other people to update the catalog.
NoteYou must use the same business portfolio that is connected to your WhatsApp sender*.*
-
Name your catalog.
Your catalog is now created.
For more information, refer to the Create a Catalog (opens in a new tab) documentation.
Add Infobip as Partner
- In the Facebook Business Manager account, go to Business Settings and select your business.
- Select Data Sources.
- Select Catalogs and select the name of your catalog.
- Select Assign Partner.
- Select Business ID and enter Infobip's Facebook Business Manager ID: 1654519411336220.
- Select Manage catalog.
Connect Catalog to WhatsApp Business Account
To connect your WhatsApp sender or your WhatsApp Business Account to your Meta catalog, contact your Infobip Account Manager or use the Infobip Contact Form (opens in a new tab) and contact the Support team. Share the sender number, catalog name, and catalog ID.
You can find the name and catalog ID in the Commerce Manager (opens in a new tab) >> Catalogs section >> Settings option.
Add Items to Catalog
You can add items to your catalog in one of the following ways:
- Use a manual form
- Upload a spreadsheet file to add items in bulk
- Use Facebook pixel
This tutorial shows how to add items by using the manual form. For information about the other options, refer to the Facebook documentation (opens in a new tab).
-
In the Commerce Manager (opens in a new tab), select your catalog on the left.
-
Select Add items.
-
In the Add items section, choose Manual.
-
Add the following information about your item:
- A 500px x 500px image
- Title
- Description
- Address
- Website link
- Price
You get a confirmation that the item was added to the catalog.
The item is now displayed in the Catalog section.
Click the item to view its details.
Send a Product Message through API
- Log on to the Infobip API Resource hub (opens in a new tab) and copy your BASE URL. The base URL is in the following format: https://{baseUrl}.api.infobip.com/ For more information, refer to Base URL.
- To send the product message, use an API development tool such as Postman, and choose the POST method.
- Replace the endpoint with the following: https://{baseUrl}.api.infobip.com/whatsapp/1/message/interactive/product
- Add the Authorization header. Example: Basic: Base64 encoded username and password For more information, refer to Authentication (opens in a new tab).
- Specify the following parameters:
- From – your registered WhatsApp sender number in international format
- To – destination phone number
- Content > Action > catalogId (your catalog ID) and productRetailerId (ID of the item in the catalog)
productRetailerId is displayed as Content ID in the Facebook Commerce Manager.
Request Example
{
"from": "441134960000",
"to": "441134960001",
"content": {
"action": {
"catalogId": "301165201902093",
"productRetailerId": "7340212982663140"
}
}
}
Additionally, you can add a body and a footer to your product message.
Example:
{
"from": "441134960000",
"to": "441134960001",
"content": {
"action": {
"catalogId": "1",
"productRetailerId": "2"
},
"body": {
"text": "Some text"
},
"footer": {
"text": "Footer"
}
}
}
Receive WhatsApp Order Message
- Log on to the Infobip API Resource hub (opens in a new tab) and copy your BASE URL. The base URL is in the following format: https://{baseUrl}.api.infobip.com/ For more information, refer to Base URL.
- To receive the order message, use an API development tool such as Postman, and choose the POST method.
- Replace the endpoint with the following: https://{yourDomain}/your/received/message/path
- Add the Authorization header. Example: Basic: Base64 encoded username and password For more information, refer to Authentication (opens in a new tab).
Response Example
{
"results": [
{
"from": "447860064555",
"to": "41793026731",
"integrationType": "WHATSAPP",
"receivedAt": "2018-09-10T12:10:18.379+0000",
"messageId": "ABEGOFkWA5EBAgo6B82cNiWIAMKC",
"message": {
"type": "ORDER",
"catalogId": "1",
"text": "Some text",
"productItems": [
{
"currency": "EUR",
"itemPrice": 12.5,
"productRetailerId": "2",
"quantity": 1
},
{
"currency": "EUR",
"itemPrice": 20.52,
"productRetailerId": "3",
"quantity": 2
}
]
},
"price": {
"pricePerMessage": 0,
"currency": "EUR"
}
}
],
"messageCount": 1,
"pendingMessageCount": 0
}