Award Winning Appointment Booking Plugin
Documentation

WhatsApp Notification

WhatsApp Notification with BookingPress

WhatsApp Notification Integration:

whatsapp notificaiton addon

BookingPress provides two WhatsApp notification gateway – Twilio and WhatsApp Business(Facebook developer) through which any notification can be sent to the customer same as the Email notification via WhatsApp.

To integrate the WhatsApp Notification with the BookingPress, first, you will have to get and activate the WhatsApp Notification Addon from “BookingPress -> Addons”.

Twilio Configuration

Select “Twilio” as the WhatsApp Gateway.

If you do not have a Twilio account, then create one from here.

You can find your “Account SID” and “Auth Token” from “Twilio -> Account”, under the “Keys & Credentials section, click on “API keys & Tokens” and you will find “Account SID” and “Auth Token” under the “Auth Tokens” section from this page.

twilio_get_whatsapp_account_keys

How to Get and Add a Phone Number for sending notifications?

After signing up and creating an account, you may get your WhatsApp number for sending notifications by following the below steps:

From the left side panel, under the “Develop” section, navigate and click on “#Phone Number -> Manage -> Buy a number” and from here you can purchase the number according to your requirements.

twilio_buy_whatsapp_number

After purchasing the phone number for sending messages, you can view and copy your active numbers from “#Phone Number -> Manage -> Active numbers“.

twilio_view_active_whatsapp_number

Changes in the BookingPress Panel

Note: This following step is applicable only for old BookingPress WhatsApp add-on users(v1.8 and prior). If you are a new user, please ignore this and move forward as this won’t be visible to new users.

A new section titled Message Type has been introduced in your WhatsApp Configuration in BookingPress > Settings > Notifications, offering two options: Template & Free Form. It is recommended to use the Template option as Free Form is an older version and does not comply with the new WhatsApp standards for sending messages. When you select Template as the message type, you will need to add a Service ID. Follow the steps below to obtain your Service ID:

Fetching Service ID for Twilio and configuring it

  • Log in to the Twilio console at https://console.twilio.com
  • Navigate to Develop > Messaging > Services. If you do not see the option to create a service, click on explore product and choose Create Service.
  • The process is divided into four steps. Begin with Step 1 by entering basic details such as the Name of the Service.
  • Ensure to select Notify My users for the option Select what you want to use Messaging for.
Fetching Service ID for Twilio and configuring it
  • You will be prompted to Add Senders. Click on the Add Senders button to proceed.
Manage Service
  • In the Sender Type, choose WhatsApp Phone number exclusively.
  • Your WhatsApp numbers will be displayed; select the desired number and click on Add WhatsApp Numbers.
Add Senderas
  • If the Actions status updates to Remove, it indicates that your number has been successfully assigned to this service.
Sender Pool
  • In Step 3, ensure to select Drop the Message.
  • Click on Complete to finish the setup and return to the main page. You will be assigned a SID, which is your service ID.
Messaging Services
  • This ID must be entered in BookingPress > Settings > Notifications.

Content Template builder for Twilio

Now we will have to create a template for your WhatsApp message which will be then shared with your users. To create a template please follow the below instructions:

  • Navigate to Develop > Messaging > Content Template builder
Content Templates
  • The Template Dashboard is where you can view all the templates you’ve created, along with their status.

Please keep in mind that templates only WhatsApp business initiated in green will work properly. This indicates that it follows the updated guidelines, if it is in red then your message/template wont be forwarded.

Creating a New Template

  • Click on the Create New button to start crafting a new template.
  • Enter your desired template name and select the template language.
  • For Content Type, ensure you select Text only, then click Save.
New Content Template

Adding Message Content

  • A textbox will appear where you can type the content of your message.
  • Enter your message and click on + Add Variable wherever you wish to insert a placeholder from BookingPress.

Note: It is advisable to not end your content with a Variable as this may increase the chances of your template being rejected as it doesn’t meet the updated Facebook Policy.

Template

Submitting for WhatsApp Approval

  • After entering your content and variables, click on save and submit for WhatsApp Approval—not just save.
  • A pop-up will appear; where you have to enter your Samples of variables. After the samples are entered Save with Samples.
Add Sample to variables
  • After that make sure to select Utility under the category, not Marketing. Also, keep the Allow WhatsApp to recategorize this template checkbox checked to increase the chances of approval.
Submit for WhatsApp Review
  • Click on submit to complete the process.

Configuring BookingPress Settings

  • Navigate to BookingPress > Settings > Notifications and enter the Service ID obtained from Twilio.
  • Click on Save to apply the changes.

WhatsApp Business Configuration

Several steps need to be followed to utilize WhatsApp Business as your WhatsApp Message Gateway. It’s essential to note that these steps adhere to the official Facebook Meta guidelines for creating templates for your WhatsApp Integration. These templates are designated for notifications exclusively; they cannot be utilized for direct client communication afterward.

Getting Started
  • Firstly, Visit Facebook for Developers to access the platform for app development and integration.
  • In the upper right corner, click on “Log In” and use your existing Facebook account credentials to log into the Facebook Developer platform.
Meta login
fakebook login
  • Follow the registration process, agreeing to Facebook’s Terms and Developer Policies. This typically involves agreeing to terms of service and providing necessary personal or company information.
  • Verify your account either by adding a valid phone number (you’ll receive a verification code via SMS) or by adding a credit card to your account.
  • After that is done you will be asked to verify your email as well.
  • Once the email is verified you can move to the next step which is the last step it is advisable that you select “Developer” but that totally depends on you it can be selected as per your liking.
Developers account
App Creation
  • Within your Facebook Developer account, navigate to the dashboard or app creation section and click on “Create App”.
Apps
  • Choose the app type as “Other”.
Crate an app
  • Moving further in the next step you’ll be asked to choose an app type. Select the “Business” app type regardless of whether you’re an individual or an enterprise and hit next to move to the next step.
Business
  • Here, enter your basic information such as the display name of your app. You can change this later if needed. Other details like the email associated with your account are automatically populated.
Basic Information

Facebook imposes restrictions on the usage of certain terms, such as “WhatsApp”. Specifically, developers are prohibited from incorporating Meta’s trademarks or brand elements, which include terms like FB, Face, Book, Insta, Gram, and Rift, or any terms that may be confusingly similar to them, within their app names. This restriction applies to any term that could be perceived as referencing Facebook or its affiliated brands.

  • Once all that is done simply click on Create App. Here it will ask you to enter your password again please ensure to type in the correct password for the same.
  • The app creation process is now complete, and the next step involves adding a product to the app, specifically WhatsApp. To proceed, navigate to the bottom of the page and locate the ‘WhatsApp’ card. Click on ‘Set up’ located in the lower right corner of the card to initiate the setup process.
App mode
  • As soon as you click on Set up you will be greeted with the following screen which provides details on what’s encompassed within the Business Platform API. By proceeding, you are consenting to the Facebook Terms for WhatsApp Business and the Meta Hosting Terms for Cloud API. Simply click on ‘Continue’ to move forward with the process.
  • A quickstart section will show up where you have to click on “Start Using the API” button to move forward and your App Creation part is done.
Configuring WhatsApp Settings

Now on your Dashboard you can see that WhatsApp has been added as a Product and you are redirected to the Getting Started section which has been populated with multiple things such as a Temporary Access Token, Phone Number ID, WhatsApp Business Account ID, and a code for sending messages. Please keep in mind that even though we got the Phone Number ID and WhatsApp Business Account ID, we need Permanent Access Token and not the Temporary one as it will expire within 24 hours.

Configure WhatsApp Settings

If you wish you can test if you have been successful so far by clicking on sending Test message but prior to that you will have to List “To number”. You can add upto 5 numbers for test messages. Note that WhatsApp will send a confirmation code to verify each phone number. You can skip the steps 3, 4 and directly click on add numbers to move ahead where you will have to provide your business information such as name, email, country, and website. After that verify your business phone number for WhatsApp messaging and then you will find that your To field is populated with the newly added number you can click on “Send Message and you will receive a message for the same.

Message

Generating Permanent Access Token

This is a crucial part we are going to create a permanent access token that will never expire.

  • Navigate to the Business Settings Page within your Facebook Developer account or you can simply click the link here.
  • Here under the User section click on System Users. Where we will create an admin user and enable full control for the app.
  • This will be initially blank, simply click on “Add user”.
System users
  • Upon proceeding, you will encounter Facebook’s Non-discrimination policy, which you are required to review and accept. After carefully reviewing the policy within the modal, click on ‘I accept’ located in the bottom right corner of the pop-up to confirm your acceptance
  • On the following screen, you’ll encounter a ‘Thank you’ message from Facebook. Simply click on ‘Done’ located in the bottom right corner to proceed with creating a new user.
  • Enter the desired username and select the role ‘Admin’. Upon completion, click on ‘Create system user’ to finalize the process
System user
  • You may be prompted once again with Facebook’s Non-discrimination policy, which requires your review and acceptance.
  • After accepting the policy, you will see the newly created Admin user. In the right section of the screen, proceed by clicking on the “Add Assets” button.
Add assets
  • In the pop-up that appears, navigate to ‘Apps’ and select the app previously created for WhatsApp integration. Enable the Full Control (“Manage App”) slider, and then click on “Save Changes” to confirm.
Full Control
  • The next pop-up will notify you that a new asset has been added. Simply click on “Done” to proceed.
  • Simply click on generate token and make sure the correct app is selected.
  • Set the Token Expiration to Never because we want a permanent one.
Add Token Expiry
  • Afterward, once you confirm everything click on Generate token button to Generate the Permanent Token.
Token

Congratulations you received your Permanent Token and simply place the Phone Number ID and WhatsApp Business Account ID, and the newly acquired Permanent Access Token please ensure that it is Permanent Token and not Temporary Token. Paste the same in BookingPress > Settings > Notifications.

Creating WhatsApp Message Templates

Once the main part of getting credentials for WhatsApp business, we can head over to create Templates/Messages for your WhatsApp Notification in BookingPress.

  • To start with Navigate to WhatsApp Manager within your Facebook Developer account by clicking on the Three lines on the top and it will list shortcuts simply choose WhatsApp Manager.
Business
  • In the “Overview” section that appears next, locate the three dots on the right of the WhatsApp account you previously created. Click on these dots, and then select “Manage message templates” from the dropdown menu.
Limits
  • On the following page, you can create new templates as well as view your existing templates that will be utilized in BookingPress WhatsApp Notifications.
Message Templates
  • To get started, click on “Create Template” in the top right corner.
  • When setting up a template, make sure the category is set to “Utility”.
  • Next, provide a name for the template (you can use the same names seen in BookingPress, such as “appointment_approved”, “appointment_pending”, etc.) and select the language used in BookingPress.
  • Once configured, click “Continue” in the top right corner to proceed.
Utility

Make sure to select your WordPress Default Langauge as it is currently not possible to use Multi-language add-on to configure your WhatsApp message in other languages as well.

  • Now a template is created.
  • Here place your content inside the body only. Please make sure to keep header as none and dont add a footer or a button aswell. As this message is for a notification only.
  • Inside the body enter your message and click on + Add Variable wherever you wish to insert a placeholder from BookingPress. They will be denoted by a variable {{1}} and so on as you keep adding the variables the number inside them will increase.
  • After you are done configuring the body make sure to fill up the sample content such as what would take the variables place. Please keep in mind this is a sample only so it is easier for them to review your content.
  • Once you are done simply click on Submit Button present on the top right.
Edit Template

Note: It is advisable to not end your content with a Variable as this may increase the chances of your template being rejected as it doesn’t meet the updated Facebook Policy.

Upon creation, each template undergoes a review process by WhatsApp, which typically takes about an hour for approval. An approved template will showcase a green status, indicating it’s “Active – Quality pending”. Meanwhile, a template under review will appear gray with the status “In review”, as illustrated in the screenshot below :

Templates Status

Once review is approved you can find the templates in your BookingPress > Notifications.