Version 2 (new method)
Features
Open tickets directly from WhatsApp
Simplify your exchanges and track your tickets directly from the app or a web browser
Requirements (self-hosted)
≥ 11.0.3
8.2
8.4
12.0.X
8.3
8.5
Must have an active WhatsApp Business account (Meta) with a valid phone number
Must have a GLPI instance accessible via the internet and HTTPS
Install the plugin

The plugin settings will then be configured in Setup > General > Whatsapp.
Create and configure the Meta (WhatsApp) application
Create an application with the Meta account
From the Meta Developer account: https://developers.facebook.com/apps/creation/
Click on Create an Application ID
Select the business account that will be linked to the application
Click Next, then validate your application by clicking on Go to dashboard

Select the business account that will be linked to the application

Click on
Next,then validate your application by clicking onGo to dahboard

Setup the application
Once created, you will be taken to your application's dashboard.
From this page, click on
Use cases>Customize


Click on Configure API in the left menu and make sure the phone number is correctly registered.

If this is not the case, click on Add a phone number and follow the steps.

Setup the Webhook
From the Configuration tab, copy/paste the URL and the token (available from GLPI
Setup>General>Whatsapp).Click on Verify and save.

Once the callback URL and token are validated, a list of fields will appear. Find the
messagesfield and check it.

Manage users
It is preferable to create a dedicated user who will have specific permissions to be authorized to use WhatsApp webhooks.
Create a user
From your Meta account (https://business.facebook.com/), go to
Settings>People.Click on
+ Invite people.Enter the requested information:
Email address
Assign access: select Full control
Assign an asset: select the desired WhatsApp account and ensure that
Messages,Message templates, andPhone numbers (view only)are checked.

Confirm to save the account and send the invitation.
Assign the application
Once the invitation has been accepted, go to your Meta account, then
Accounts>Apps.Select the application you created earlier, then
Assign people.Check the desired user and assign the necessary permissions.


Creating a System User Account
The system user account allows generating a token that must be entered in GLPI to validate the configuration between WhatsApp and GLPI. This user will be used as the bot for the application.
In your Meta account, go to
Users>System users, click on+ Add.Enter a name for the account.
Select
Employee.Confirm to create the account.
After creating the system user:
Click the menu on the right, then
Assign assets.

Select the created application and then
Full control.In the
WhatsApp Accountssection, selectMessages templates (view only)andMessages.Click on
Assign assets.

Generating the token
From system users, click on
Generate token.

Select the desired application.
Select the token expiration time (60 days or never).
Assign the following 3 permissions:
whatsapp_business_manage_eventswhatsapp_business_managementwhatsapp_business_messaging

Then click on Generate token.
GLPI Configuration
From your GLPI instance, go to
Setup>General>WhatsApp.In WhatsApp Business Account ID, enter the WhatsApp account ID (available in your account settings on Meta then
Accounts>WhatsApp Accounts: https://business.facebook.com/latest/settings/whatsapp_account).

In Access Token, enter the previously generated token.
Save your entry.
If everything is OK, a message will appear informing you that your configuration is valid.

Configuring Notification Templates
You don't need to do anything special regarding the templates. They are generated directly by the plugin and are visible in the Message Templates section of the WhatsApp plugin configuration on GLPI.

The refresh button allows you to resynchronize the templates with WhatsApp if they are not APPROVED (or when adding new languages via the plugin).
Before activating your application
Privacy Policy and Logo
Before activating your application, you will need to provide a URL for the privacy policy.
From
Application Setup>Basic, enter the appropriate URL.Also add a logo (the one that will appear publicly on the WhatsApp contact).

Payment Method
A payment method must be enabled, otherwise message templates cannot be sent.
From your Meta account, go to
Accounts>WhatsApp accounts.Select the desired account.
Click on
Payment settingsand follow the steps.

Publish your application
You can now publish your application.

Ticket configuration
Anonymous access
You can allow or deny access to anonymous users (those not present in the database).

Ticket title template
You can add variables and/or text that will be transcribed into the ticket title.

Business Rules
To customize the plugin's behavior, you can add business rules. The engine works like the GLPI rules engine.
Rules management is located in Administration > Rules > WhatsApp - Ticket Rules.

The criteria relate to either anonymous users or WhatsApp numbers and will trigger actions such as sending a message upon receipt of a ticket, updating the entity, category, urgency, etc.
Current Limitations
Only ticket follow-up updates and solutions are sent to the user. Tasks and satisfaction surveys are not compatible.
Last updated
