Skip to content

Whatsapp chatbot PRD

Objective -
Reduce lost orders due to restocking delay for users driving overall order growth
Make restocking easier through a interactive Whatsapp chatbot
Success metrics -
Restock rate% (TBD)
IHAO% of suppliers (TBD)
Channel adoption - #Recos interacted / # Total Recos
Problem Statement -
Understanding effectiveness of Whatsapp chatbot to support multiple supplier use cases -
Inventory recommendations (First use case)
Interacting with price / product recos
Supplier support
Scope - The goal of V1 is to allow Inventory management via Whatsapp chatbot through proactive notifications as well as supplier initiated conversations.
Bot flow -
Supplier initiated conversation -
unnamed.png
Suppliers initiating the conversation have the ability to view
Currently OOS recos
Low stock recos
The next set of actions are identical for the recommendation types and encapsulates -
Updating stock for the reco
Updating stock for other siblings / variations of the recommended PID
Reject reco
Capturing the rejection reason from supplier with vSKU details
Viewing more recommendations (Limit TBD)
Proactive notification (twice a day) -
The top OOS recos to be shared twice a day per supplier (TBD)
The notif will have the similar catalog card structure and quick action buttons as seen in the case of supplier initiated flow
Action button responses will trigger bot says directly as per bot definitions
Backend API builds -
Proactive notifications (Interakt) -
Dynamic user addition on Whatsapp business account / Interakt
Use case - Adding / Updating users through backend DB as and when new suppliers / parameters are generated
In case a user had originally been added via the interakt dashboard (and not by calling the User Track API),then, no userId would exist for that user. In that case, you could either -
Call the User Track API without specifying a “userId” (and only specify the “phoneNumber” & “countryCode”), or,
Include a userId in the API call, which will then get added for that user, and you could use that userId to reference that user in future API calls
Dynamic variable setup
Use case - Adding dynamic variables / images in the message template which is unique per supplier and keeps changing at a timely frequency
Event track APIs can be setup here with the required variables < >
We can send variables which are configured in template from request of event track API itself Eg.u can use request body like -
{
"userId": "12035448-36a0-3aa24",
"phoneNumber": "9999999999",
"countryCode": "+91",
"event": "product_out_of_stock",
"traits": {
"Catalog ID": "1",
"SKUid": 2,
"Variation": 500,
"Net order loss": "44"
},
"createdAt": "2020-11-05T13:26:52.926Z"
}
Whenever the product is out of stock for the supplier, we can simply call the event track API and pass the data, and it will trigger the notification as we have set the ongoing campaign for it with a specified event
Whatsapp consent tagging
Use the current Whatsapp consent tags to be sent to Interakt to identify the suppliers who’ve accepted receiving updates from WP
Chatbot API builds (Haptik’s conversation studio) -
Serving inventory recommendations to suppliers when they initiate conversation / try to view more through post viewing the proactive notification
Suppliers would have a toggle to view more recommendations
Introduce counters / pagination in the recommendation feed to serve out recos incrementally as per input
We can retrieve supplier’s phone number from Haptik by defining user_data in code node for configuring API calls
Updating inventory value and reflecting that to inventory service
Suppliers will have the control to directly update stock through Whatsapp
Recommendation vSKU details can be fetched across nodes by configuring conversation details in the code node
Inventory updates through chatbot need to be reflected in logs for attribution
Update source ‘Whatsapp_chatbot’ in inventory_change / inventory_product_inventory_log_v2
Capturing rejection reason and relaying it back to DB
This would help filter out the rejected recommendations from future reco feeds
Displaying live stock values for other variations of a selected recommendation
Suppliers would have the functionality to update stocks for other variations of a given recommendation
Proactive recommendation notification setup
Leverage current CRON responsible for inventory Whatsapp notifications to build the recommendation feed logic here
Backend details
Both type of recos - OOS and low stock will have separate Spark / Presto model tables with the following schema -
Supplier ID (INT) - Both recos
Product ID (INT) - Both recos
Style ID / VPID (VARCHAR) - Both recos
Variation name (VARCHAR) - Both recos
Catalog ID (INT) - Both recos
Catalog name (VARCHAR) - Both recos
Sorting score (INT) - Both recos
Current stock count (INT) - Low stock recos
Days on hand (INT) - Low stock recos
Estimated order loss (INT) - OOS recos
Frequency - Thrice a day (TBD)
Mode - Overwrite
Model to be setup on Presto and output to be dumped in S3 to take care of any scaling issues
Key callouts -
Conversation window on Haptik’s chatbot is applicable for 8 mins post which the session gets reset
Conversation window in case of proactive notification through Interakt - TBU
We’ll first test this with Haptik’s staging account on a test WP number
Tentative items to be picked up in the next version -
Introducing reminder nudges for inventory communications
Integrate price / product reco capabilities
Design a FAQ / Support section as a separate flow
Resources -
Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.