How to Implement WhatsApp Commerce(PLM) in the Bot
- Getting Started
- Bot Building
- Smart Agent Chat
- Conversation Design
-
Developer Guides
Code Step Integration Static Step Integration Shopify Integration SETU Integration Exotel Integration CIBIL integration Freshdesk KMS Integration PayU Integration Zendesk Guide Integration Twilio Integration Razorpay Integration LeadSquared Integration USU(Unymira) Integration Helo(VivaConnect) Integration Salesforce KMS Integration Stripe Integration PayPal Integration CleverTap Integration Fynd Integration HubSpot Integration Magento Integration WooCommerce Integration Microsoft Dynamics 365 Integration
- Deployment
- External Agent Tool Setup
- Analytics & Reporting
- Notifications
- Commerce Plus
- Troubleshooting Guides
- Release Notes
Table of Contents
This document will explain how to implement WhatsApp Commerce (PLM) in the bot.
Getting Started
- The Business needs to have an active WhatsApp business number.
- The Business needs to create a Facebook catalog in the Facebook Business Manager account. You can read more about it here.
- The Business needs to link the WhatsApp Business account with the Facebook catalog.
- Connect the business's bot with their WhatsApp business number. You can read more about this here.
- Next, you need to try triggering a test Step with a test response on WhatsApp, in order to check if step 4 has been successful or not.
- Now, you need to ask the business for the catalog ID, that was set up in step 2, along with 4-5 product retailer id.
Running PLM(Product List Message)
- You need to update the webhook URL in the WhatsApp container. You can read more about it here.
- Now you need to use the catalog ID and product-retailer-ID to test run the PLM through the below-mentioned HSLstructure using a Code Step:
hsl = { "type": "WHATSAPP_INTERACTIVE_PRODUCT_LIST", "text": "Here are the relevant products I found for you", "header": "Welcome to test", "footer": "", "catalog_id": "309168714477583", "sections": [ { "title": ‘Test_title’, "product_items":[ {"product_retailer_id": "<product_retailer_id_1>"}, {"product_retailer_id": "<product_retailer_id_2>"} ] } ] }
- You can have more titles with its product items, as the "sections" part is in the form of lists.
- If the product list is visible on WhatsApp, that means the PLM has been set up correctly and it is working fine.
- If PLM is not being displayed on WhatsApp, then you need to check the logs in Kibana(log lake or elastic search) and then move to logstash-* and type "Facebook" and "bot_business_id", after which you will be able to see the logs. For example:
- Next, check the error code and title of the error. Most of the time, the issue arises because of the compliance, if some value is missing in the data feed, or if some product might need an extra-legal clearance from Facebook. These issues need to be resolved by the business.
- Once the issues have been resolved, you can try triggering PLM again.
- Now, assuming that the PLM is working fine, we would need a list of all the product-retailer-ids from the catalog that we want to show in the PLM. We can get this from the business's API.
- The business will have to map the Product IDs of the API to the product-retailer-ids of the catalog and to make it easy, both of these values need to be the same.
- You need to pass all the IDs in the above-provided HSL in order to get all the products.
- At a given point of time, at the most 30 products can be shown in the Product List Message.
- Also, once the PLM is shown to the user, all the control(from showing the product to adding the product or changing the quantity of the product in the cart) is with WhatsApp, and Haptik does not have any control until the user clicks on the Send message button.
- Once the user clicks on the Send message button, Haptik gets the control back and all the products along with their quantity and price are made available in the user_details entity, under the key "WA_PRODUCT_CART"
- For the connection between the PLM HSL Output Step, to the next Static Step, you can use "I want to check out my WhatsApp cart" as the User Message.
Now since the PLM is working properly, you can move to the further processes as per the design.
Connecting Product Catalog to WhatsApp account
Step 1: Navigate to your Facebook Business Settings Page, and look for your WhatsApp Account and then click on “WhatsApp Manager” as shown.
Step 2: Next, you need to click on the Catalog from the left navigation bar, as shown.
Step 3: Under Catalog, you need to click on “Choose Catalog”
Step 4: Now, you need to click on Connect Catalog, as shown.
Step 5: Once the Catalog is connected, you will see the following on the screen.
That's it. You are done.