# Integrating Applications Manager with WhatsApp Messenger WhatsApp by Meta is a popular instant messaging and VoIP platform that allows users to seamlessly communicate with each other. By integrating Applications Manager with WhatsApp, users can now easily receive Applications Manager alerts as messages via WhatsApp. This helps them stay aware of their network faults on-the-go and initiate fault remediation measures that ultimately enhance the network uptime. To integrate Applications Manager with WhatsApp messenger, you need: - Facebook account - WhatsApp business account - Meta business account with business profile - Meta developer account Carry out the following steps to integrate Applications Manager with WhatsApp: - [Configuring Meta for Business](#configuring-meta-for-business) 1. [Create an app with Meta developer account and set up WhatsApp](#i-create-an-app-with-meta-developer-account-and-set-up-whatsapp) 2. [Create webhook URL](#ii-create-webhook-url) 3. [Create an user and assign the app as an asset](#iii-create-an-user-and-assign-the-app-as-asset) 4. [Generate the app token from Meta business account](#iv-generate-the-app-token-from-meta-business-account) 5. [Creating a message template](#v-creating-a-message-template) - [Configuring Applications Manager](#configuring-applications-manager) > **Note:** This feature is only supported for **Applications Manager versions \177200 and above**. ## Configuring Meta for Business Now, from Meta's console, carry out the following steps. ### I. Create an app with Meta developer account and set up WhatsApp - Login to your Meta developer account and go to "**My Apps**". ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-01.png) - Click on the "**Create App**" button. ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-01.png) - Select "**Other**" as the use case, and click on **Next**. ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-03.png) - Select the app type as "**Business**", and click on **Next**. ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-04.png) - Enter the name for the app, and select the corresponding business account. - Click on the "**Create App**" button. ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-05.png) - Re-enter your password and click on "**Submit**". ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-06.png) - In the subsequent screen, click on the "**Set Up**" option that appears at the bottom-right of the WhatsApp section. ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-07.png) - Select a business account and click on "**Continue**". ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-08.png) - You will now be redirected to the WhatsApp quickstart screen. ### II. Create webhook URL - Click on the "**Start using the API**" option found in the WhatsApp quickstart screen. ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-09.png) - Under the "**Send and receive messages**" section, select the "**Add phone number**" option from the "**From**" dropdown box. - Enter the WhatsApp business profile details, and enter the name as "Applications Manager". ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-10.png) - Choose the business category as "**Other**", and click on "**Next**". ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-11.png) - Enter your WhatsApp business number, and choose the mode of verification. ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-12.png) - Once the number has been verified, it can be used to send messages. - Copy the URL found in the terminal below. ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-13.png) ### III. Create an user and assign the app as asset - Open the Meta business account, and go to the "**Business settings**" page. - Under the "**Users**" section, go to the "**System Users**" tab, and click on the "**Add**" button. - Provide the name of the user as "Applications Manager" and grant them "Employee" access. - After the user has been created, assign the app as an asset. - Click on the "**Assign Assets**" option, then click on "**Apps**". Choose the app that you created (i.e. Applications Manager), and enable "**Full Control**". ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-14.png) ### IV. Generate the app token from Meta business account - Go to the "**Users**" option under the "**System Users**" section, and select the created user. - Click on the "**Generate New token**" option. ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-15.png) - Select the app from the drop-down, and choose the expiry time for your token. - Enable the following two permissions: - **WhatsApp_business_management** - **WhatsApp_business_messaging** - Click on "**Generate Token**". ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-16.png) - Copy and save the token. ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-17.png) ### V. Creating a Message Template - Open WhatsApp Manager from your Meta business account. ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-18.png) - Click on the "**Account Tools**" tab on the left side, and select "**Message Templates**". - Click on the "**Create Template**" option. ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-19.png) - Under category, choose "**Marketing**", and select the sub-category as "**Custom**". - Give a name for your template, and choose the desired languages. Click on "**Continue**". ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-20.png) - Under the "**Body**" section, enter the message content that has to be sent via WhatsApp. - Mention the first field name (Name of the device), and then add the variable. - Add the second field name (Issue with the device), and then add the next variable. > **Note:** You can also add more than two variables along with the desired information that you need to be alerted about. - You can preview the message from the Message preview window available in the top-right corner. ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-21.png) - Click on "**Submit**". - Meta will approve the template after verification. ## Configuring Applications Manager ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-22.png) Follow the below steps to integrate WhatsApp from the Applications Manager console: 1. Go to **Settings -> Product Settings -> Integrations (Add-on Settings) -> New Custom Integration.** 2. Under the **General Specification** section, provide a name and description for this integration profile. 3. Select the **Integration type** as **Chat**. 4. Under the **Create Incident** section, choose the **POST** method, and enter the integration URL obtained earlier. 5. Choose the **Request Body Type** as **raw**, and the **PayLoad Type** as **JSON**. 6. Under **Request Headers**, declare the value of **Content-type** as *application/json*. 7. Add another request header called **Authorization**. In its value field, enter the following: *Bearer \ \*. 8. Under **Request Body**, define the input variables that were defined under the body content of Message templates in the Meta Business page using the following body content: ```json { "messaging_product":"whatsapp", "recipient_type":"individual", "to":"", "type":"template", "template": { "name":"apm_alerts", "language": { "code":"en_US" }, "components": [{ "type":"body", "parameters": [{ "type":"text", "text":"$displayName" }, { "type":"text", "text":"$message" } ] } ] } } ``` Where: - **recepient_type:** Must be **individual**. - **to:** Enter the phone number to which the alerts from Applications Manager should be forwarded as WhatsApp messages. - **type:** Must be **template**. - **name:** Must be the name of the message template created with the Meta business account (**opm_alerts** in the example used). - **code:** Enter the language code in which you want to receive alerts (**en_US** in the example used). - **type (Under components):** Must be **body**. - **type (Under Parameters):** Enter the **text** that needs to be sent along with the alerts. - **Text 1:** Enter the first variable of the parameter to be sent as WhatsApp messages (**$displayName** in the example used). - **Text 2:** Enter the second variable of the parameter to be sent as WhatsApp messages (**$message** in the example used). > **Note:** Apart from the above variables, you can also send other variables via WhatsApp with the help of Replaceable Tags. [Click here](https://www.manageengine.com/products/applications_manager/help/replaceable-tags.html) to know about the list of supported replaceable tags in Applications Manager. 9. Expand **Advanced Configuration** and specify the timeout value. 10. Use the **Test Configuration** button to verify the connection. 11. Once the test action is successful, select the checkbox stating that you have read and comply with the terms and conditions of WhatsApp. 12. Click on **Save**. Now that Applications Manager has been integrated with WhatsApp, associate actions for the same. [Learn how to associate Custom integration actions](https://www.manageengine.com/products/applications_manager/help/custom-integrations.html#apm-action) ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-23.png) ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-25.png) Applications Manager has now been successfully integrated with WhatsApp, and you can receive Applications Manager alerts via WhatsApp messages. ![ ](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/integrate-whatsapp-24.png) [Click here](https://developers.facebook.com/docs/whatsapp/pricing/) to know about WhatsApp's pricing, and for information regarding messaging limits, [click here](https://developers.facebook.com/docs/whatsapp/messaging-limits/).