WhatsApp Notification Addon

Important Note: This Addon will only work if the ARMember plugin is installed with version 5.5.1 or higher

It will allow you to send WhatsApp notifications to users and admin for various events using the ARMember membership plugin.


Steps For Installation And Activation

You can install the plugin in the following two ways. And ARMember – WhatsApp Notification Addon requires ARMember Plugin installed and active.

New installation via FTP

  1. Download the plugin and extract it. You will find a directory armemberwhatsapp.
  2. In your WordPress installation directory, upload armemberwhatsapp to wp-content/plugins/
  3. Activate the ARMember - WhatsApp Notification Addon plugin through the Plugins menu from the WordPress admin panel.

New installation via the WordPress Uploader

  1. Download the plugin.
  2. Log in to your WordPress admin panel
  3. Go to Plugins -> Add New -> Upload
  4. Click on “choose file” and browse the download package. When the plugin uploads successfully, click on Activate Plugin.

Steps to Set up WhatsApp Notification Addon For Your Website

Let’s setup ARMember – WhatsApp Notification for your website :

  1. After activating the addon, WhatsApp Notification section will be displayed in ARMember -> General Settings -> WhatsApp Notification section.

    Please see below screen,

  2. To start sending WhatsApp Notifications to users, you have to select a predefined configured WhatsApp gateway from the list.

    Below are the predefined WhatsApp notification Gateway:

    • Twilio
    • Parameters:
      SID Account SID
      Token Auth Token
      From From Number

      2.Whatsapp Business(Facebook Business)

      Parameters:
      from Phone Number ID
      whatsapp_business_id Business Account ID
      token Permenent Access Token

Twilio Configuration

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 API 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.

Please see below screen,

Twilio Details

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 number

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

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:

  1. Navigate to Develop -> Messaging -> Content Template builder
  2. Twilio Content Message Builder

  3. The Template Dashboard is where you can view all the templates you’ve created, along with their status.
  4. Please keep in mind that templates only WhatsApp business initiated in green only 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
  1. Click on the Create New button to start crafting a new template.

  2. Enter your desired template name and select the template language.

  3. For Content Type, ensure you select Text only, then click Save.

Twilio Create new Content Message Builder

Adding Message Content
  1. A textbox will appear where you can type the content of your message.

  2. Enter your message and click on + Add Variable wherever you wish to insert a placeholder from ARMember.

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.

Twilio Create new Content Message Builder

Submitting for WhatsApp Approval
  1. After entering your content and variables, click on save and submit for WhatsApp Approval not just save.

  2. A pop-up will appear; where you have to enter your Samples of variables. After the samples are entered Save with Samples.

  3. Twilio Content template submission

  4. 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.

  5. Twilio Content template submission

  6. Click on submit to complete the process.

WhatsApp Business (Facebook 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
  1. Firstly, Visit Facebook for Developers to access the platform for app development and integration.</p

  2. In the upper right corner, click on Log In and use your existing Facebook account credentials to log into the Facebook Developer platform.

  3. Twilio Content template submission

    Twilio Content template submission

  4. 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.

  5. 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.

  6. After that is done you will be asked to verify your email as well.

  7. 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.

Whatsapp Business Create account

App Creation
  1. Within your Facebook Developer account, navigate to the dashboard or app creation section and click on Create App.

  2. Whatsapp Business Create new app

  3. Choose the app type as Other.

  4. Whatsapp Business Create new app

  5. 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.
  6. Whatsapp Business Create new app

  7. 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.

  8. Whatsapp Business Create new app

    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.

  9. 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.

  10. 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.

  11. Whatsapp Business Create new app

  12. 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.

  13. 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.

Whatsapp Send test message

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.

Whatsapp test message Sample

Generating Permanent Access Token For Whatsapp Business (Facebook Business) API

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

  1. Navigate to the Business Settings Page within your Facebook Developer account or you can simply click the link here.

  2. Here under the User section click on System Users. Where we will create an admin user and enable full control for the app.

  3. This will be initially blank, simply click on Add user.

  4. Whatsapp System users

  5. 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

  6. 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.

  7. Enter the desired username and select the role Admin. Upon completion, click on Create system user to finalize the process

  8. Whatsapp System users

  9. You may be prompted once again with Facebook’s Non-discrimination policy, which requires your review and acceptance.

  10. 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.

  11. Whatsapp System users Page

  12. 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.

  13. Whatsapp System users Page

  14. The next pop-up will notify you that a new asset has been added. Simply click on Done to proceed.

  15. Simply click on generate token and make sure the correct app is selected.

  16. Set the Token Expiration to Never because we want a permanent one.

  17. Whatsapp System users Parmenent token setup

  18. Afterward, once you confirm everything click on Generate token button to Generate the Permanent Token.
  19. Whatsapp System users Parmenent token setup

  20. Congratulations you have created your Permanent Token and simply place the Phone Number ID and WhatsApp Business Account ID, and the newly generated Permanent Access Token please ensure that it is Permanent Token and not Temporary Token. Paste the same in ARMember -> General Settings -> Whatsapp Notification.

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 ARMember.

  1. 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.

  2. Whatsapp Business Whatsapp Manager app

  3. 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.

  4. Whatsapp Message Templates

  5. On the following page, you can create new templates as well as view your existing templates that will be utilized in ARMember WhatsApp Notifications.

  6. Whatsapp Manage Message Templates

  7. To get started, click on Create Template in the top right corner.

  8. When setting up a template, make sure the category is set to Utility.

  9. Next, provide a name for the template (you can use the same names seen in ARMember, such as On Purchase Planโ€, โ€œOn Password Changeโ€, etc.) and select the language used in ARMember.

  10. Once configured, click Continue in the top right corner to proceed.

  11. Whatsapp Manage Message Templates 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.

  12. Now a template is created.

  13. Here place your content inside the body only. Please make sure to keep header as none and don’t add a footer or a button aswell. As this message is for a notification only.

  14. Inside the body enter your message and click on + Add Variable wherever you wish to insert a placeholder from ARMember. They will be denoted by a variable {{1}} and so on as you keep adding the variables the number inside them will increase.

  15. 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.

  16. Once you are done simply click on Submit Button present on the top right.

  17. Whatsapp Manage Message Templates Sample

    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.

  18. 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 :

  19. Whatsapp Manage Message Templates Sample

Whatsapp Addon Settings configuration

  1. After selecting WhatsApp gateway you have to select Mobile Number Field. If your registration form don’t have mobile number field than please create that from ARMember -> Manage Forms -> Registration/Sign up forms.

    Important Note:If your form don’t have Mobile Number field than this addon will not work.

  2. “Send WhatsApp Notification Field” label. It allows to set checkbox label which will be displayed below mobile number field in plan purchase form.

    Please below screen,

    ARMember will send WhatsApp Notification when “Send WhatsApp Notification Field” is checked.

    Members can also enable or disable receving WhatsApp notification from Edit Profile form. By setting “Send WhatsApp Notification Field”.

  3. Select Default Country Code either Fixed or Dynamic. If you choose “Dynamic” then the “country” field must exist in your signup form and it’s meta key must be “country”.

    Please see below screen,

  4. You can check WhatsApp gateway configuration is correct or not by using Send Test WhatsApp.

    Important Note:Mobile number must be start with country code.

  5. Enable Debug Mode, enable it to write notification status into a log file.

  6. Enable “Notification on User sign up” to send notification when user sign up at your site.

    You need to select a template which is done from twilio or whatsapp Business.

    Notification_on_user_signup

    You need to set a parameters data if you have added variables in twilio or whatsapp business message templates.

  7. Enable “Notification on purchase membership plan” to send a notification when the user purchases any Membership plan.

    Enter message content which will be used to send to user as message content.

  8. Enable “Notification on Password Change” to notify user when their account’s password is changed.

    Enter message content which will be used to send to user as message content.

  9. Enable “Cancel Membership Plan” to notify user when their membership plan is canceled by the admin or user.

    Enter message content which will be used to send to user as message content.

  10. Enable “Before Expire Membership Plan” to notify user when their membership plan will going to expire.

    Enter message content which will be used to send to user as message content.

  11. Enable “Before Recurring Payments due (auto & manual payment)” to notify users when their Recurring payment will going to expire.

    Enter message content which will be used to send to user as message content.

  12. Enable “Send WhatsApp notification to Admin?” to send all above enabled notifications to admin also when any of the events are executed from them.

    Enter the admin mobile number on which all notifications will be executed.

    Important Note:Mobile number must be start with country code.

  13. Click Save Button. Now All is Set.