WABA Intro
Here is some explanation of the WhatsApp Business Platform API usage.
Usage Flow
- Register Whatsapp Official Account.
- Request for message template and wait the template status to be approved.
- Use any pre-approved template to send broadcast message (see Message Template section below).
- To send Reply and Interactive message, a conversation room between your Gateway and your recipient.
Message Types
Broadcast
Send message using approved template.
Reply
Send free text, media or document message. This message type requires an active converstation room to be able to send this type of message.
Interactive
This message type is kind of similar to Reply message, that is require an active converstation room to be able to send this type of message.
There are 3 types of interactive message:
- Button List: message with a list of options
- Button Reply: message with up to three predefined replies for users to choose from.
- Button URL: send an interactive call-to-action (CTA) URL button
Message Template
WhatsApp message templates allow businesses to use pre-approved templates to send structured messages to customers who have opted in to receive notifications.
Templates are made up of four primary components which you define when you create a template: header, body, footer, and buttons. The components you choose for each of your templates should be based on your business needs. The only required component is the body component.
Header (Optional)
Text
Text headers are optional elements that can be added to the top of template messages. Each template may include only one text header.
Upon creation, TEXT header might have a single parameter (optional)`.
Text formating using special characters such as *, _, etc are not supported in this component.
Media
Media headers can be an image, video, gif, or a document such as a PDF. Here the media types:
- DOCUMENT:
doc,docx,pdf,ppt,pptx,txt,xlx, andxlsx
Max: 50 MB - IMAGE:
jpegandpng
Max: 5 MB - VIDEO:
mp4
Max: 15 MB - TEXT:
txt
Body (Required)
The body component represents the core text of your message template and is a text-only template component. You can user text formats, add emojis.
The message text in the body component accepts multiple parameters. This text parameter help to include unique information for each message.
Footer (Optional)
Add a short line of text to the bottom of your message template.
Buttons (Optional)
Buttons are optional interactive components that perform specific actions when tapped.
Templates can have a combination of up to 10 button components in total, although there are limits to individual buttons of the same type as well as combination limits, which are you see when you create a template on our website.
Message Status
Message status for message is
sent: message is going to be sent to the recipientdelivered: message has been sent to the recipientread: the message recipient has read the messagefailed: message failed to be sent
The ideal message status flow once it sent via API or Web Interface
sent: indicates that the Whatsapp Server (Meta) trying to send the message to the recipientdelivered: the recipient WhatsApp aplication (phone or web) got the message.read: the message is read by the recipient (if the the read receipt is active)
But somehow, after sent status can be updated to read, then delivered. This is because of delivered and read status sent the our sistem almost simultaneously.
In some reason, the message status might be failed.
Terminology
Converstation Room
Converstation room starts when someone send a message to your gateway. This converstation will be open for 24 hours. In this time only, you can send free text and interactive message using Reply and Interactive endpoints.
Gateway
Gateway is your Official Whatsapp Business account, that is integrated to NusaSMS.
Template Status
Templates must have a status of APPROVED before they can be sent in template messages. The initial template status is PENDING and the rejected ones is REJECTED.