/
Whatsapp Integration Technical Frontend Document

Whatsapp Integration Technical Frontend Document

What is the purpose of this article?

The purpose of this article is to make WhatsApp integration on the workspace

Figma link: https://www.figma.com/proto/WXkyWQOy3Gf2KmwpkMjEix/WIP-%7C-WhatsApp-Integration?page-id=0%3A1&type=design&node-id=2-364&viewport=75%2C528%2C0.02&scaling=min-zoom

How would it be implemented in the frontend?

Creating the Whatsapp app in our code

src\app\apps-automation\app-detail-page\apps-integration

WhatsApp-integration.html

WhatsApp-integration.ts

Configure Whatsapp by frontend

Create Payload

  {     userId : '42572891962',     password: "123456",     apikey: 'pkl11vwzgs3vzokmpi7yqsliaurr5eln',     businessNumber:'8467019711'   }

when API getting success response WhatsApp app shows connected.

Eshopbox Customer Portal setting for WhatsApp Setting

Manage customer Whatsapp Notification

We need to backend response from poe-notifications API and add key iswhatsappEnabled

"notificationOptions": [ { "resource": "shipment", "eventSubType": "created", "isEmailEnabled": "0", "isSmsEnabled": "0", "iswhatsappEnabled":"0" }, { "resource": "shipment", "eventSubType": "packed", "isEmailEnabled": "0", "isSmsEnabled": "0", "iswhatsappEnabled":"0" }, ]

iswhatsappEnabled key based on the show Whatsapp checkbox.

 

When we click on the Whatsapp checkbox open the popup and configure the template ID.

Frontend will create a post request for the backend after when getting the backend response for the frontend showing the green tick and template set from the frontend.

{ "templateID":344565657765 "eventType":"created" }

Provide template id when the courier partner failed to deliver the order

When the order is failed to be delivered frontend will create a request

[ { "templateID":344565657765, "customerReason":"addressIssue", "eventType":"failedtoDeliver" }, "templateID":344565657765, "customerReason":"customerUnavailable", "eventType":"failedtoDeliver" }, "templateID":344565657765, "customerReason":"customerUnreachable", "eventType":"failedtoDeliver" }, "templateID":344565657765, "customerReason":"customerOpenDelivery", "eventType":"failedtoDeliver" }, ]

 

Whatsapp Pricing calculation

Screenshot:

create a separate component for WhatsApp pricing and a single WhatsApp notification costs 40 Paise

Customer Notification Activity logs order page

 

Add label

Related content