This article will guide you through the steps of installing the WhatsApp Integration with ServiceDesk Plus plugin.
Pre-Requisites :
Once the pre-requisites are sorted out, we can proceed with the configuration. We'll start with a Meta business account creation, if not one available already.
(business account landing page)
10. In the next page, enter the app name as "ServiceDesk Plus". The app contact email is the mail address to which all communications regarding this app will arrive. Please enter the address accordingly.
11. Once all the details are entered, click on Create app. Once created, we'll be redirected to the app's configuration page where we'll be asked to choose the product to be added to the app. Click on Set Up under the WhatsApp product.
12. we'll be redirected to the WhatsApp product configuration page where at the beginning we'll be asked to create a WhatsApp business account. Follow the on-screen instructions to create one.
(In case there's an error saying that the business account has been restricted, please check your mail for any intimations from Meta regarding the same. The mail will have an option to appeal the restriction. You'll be asked to submit a valid ID proof for the appealing process)
13. The WhatsApp product has been successfully added to the app. Now onto the next step in the configuration.
14. Click on API setup under WhatsApp in the left pane. Under the Send and Receive messages section, click on the From number drop-down and choose Add a new number.
15. We'll be asked to enter the details of the WhatsApp business profile. Enter the name as ServiceDesk Plus and choose the business category as Other. Click on Next.
16. In the next step, enter the business number. Choose how to verify the number and click on Next to initiate the verification process.
17. After the number has been verified, it'll get added to the app and we can use it now to send and receive messages.
18. Now, on the API setup page, copy both Phone Number ID and Business account ID and keep it saved. They'll be required further down the process.
19. Now click on App settings in the left pane and choose Basic. In the settings page, copy the App secret and keep it stored somewhere as it'll be required later.
20. Now head to business.facebook.com and click on Business settings in the bottom-left corner. We'll be redirected to the business settings page.
21. Now inside business settings, under Users, click on System users and click on Add.
22. Provide the name of the user as "ServiceDesk Plus" and system user role as "employee".
23. Now click on Assign assets and choose Apps. Choose the ServiceDesk Plus app and enable Full control.
24. Now click on Generate New Token and under the App drop-down, select the ServiceDesk Plus app.
25. Under Expiry, choose Never and under Permissions, select"whatsapp_business_management and "whatsapp_business_messaging" permissions. Click on Generate Token.
26. Once the token has generated, copy and keep it stored somewhere.
We have completed configuring the Meta app for our integration. Now onto configuring the ServiceDesk Plus plugin.
Configuring ServiceDesk Plus :
.
Feature Configurations:
Within the AppIntegrations_Handler_Custom.xml file, there exist two default parameters: OTPLogin and notification.
1. OTPLogin enables user authorization via One Time Password, requiring an user's email address to be filled.
2. The notification parameter triggers alerts for technicians when requests are assigned or when an approval is needed.
If both features are necessary, maintain their default values; otherwise, adjust the parameters to false.
Once all configurations are completed and transferred, restart the ServiceDesk Plus server to complete the successful installation of the WhatsApp Plugin.
Before proceeding with integration, ensure that user profiles in ServiceDesk Plus contain valid entries for mobile numbers and primary email addresses. For the mobile number, enter it with the country code but without the plus sign (e.g., 91xxxxxxxxxx, where 91 represents the country code).
To finalise, send a message from your WhatsApp to the Business phone number to initiate the authorization process.
Security Notes:
1. The appSecret and accessToken are stored plainly within the whatsapp.json file. Ensure restricted access to this file and consider enabling password protection for added security.
2. /revoke command will revoke the user authorisation.
To get an idea of what is available with this integration, check out this article.
References/FAQ :
1. Getting started with Business APIs :
https://developers.facebook.com/docs/whatsapp/cloud-api/get-started
2. Meta developer account creation :
https://developers.facebook.com/docs/development/register
3. Business App creation :
https://developers.facebook.com/docs/development/create-an-app/
4. Access tokens and System users :
https://developers.facebook.com/docs/whatsapp/business-management-api/get-started#system-users
5. Business App Webhooks :
https://developers.facebook.com/docs/whatsapp/business-management-api/guides/set-up-webhooks
5. Business Management APIs all references :
https://developers.facebook.com/docs/whatsapp/business-management-api/reference