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

Prerequisites

GLPI
PHP minimum
PHP recommanded

≥ 11.0.3

8.2

8.4

circle-info

A GLPI Network BASICarrow-up-right subscription (or higher) is required. This plugin is also available for all GLPI Network Cloud instancesarrow-up-right.

  • Must have an active WhatsApp Business account (Meta) with a valid phone number

  • Must have a GLPI instance accessible via the internet and HTTPS

circle-check

Install the plugin

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

Create an application
  • Select the business account that will be linked to the application

Select business account
  • Click on Next,then validate your application by clicking on Go to dahboard

Go to dashboard

Setup the application

  • Once created, you will be taken to your application's dashboard.

  • From this page, click on Use cases > Customize

Use cases - Customize
Use cases - Customize
  • Click on Configure API in the left menu and make sure the phone number is correctly registered.

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

Add a number

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.

Callback URL and GLPI token
  • Once the callback URL and token are validated, a list of fields will appear. Find the messages field and check it.

Activate messages

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, and Phone numbers (view only) are checked.

Invite people / assign assets
circle-info

Before the user can manage the application, they will need to accept the invitation to join the WhatsApp account. Once the invitation is accepted, there may be a delay before they can be granted permissions on the application.

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

Assign people to app
Assign 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.

Assign assets to system user
  • Select the created application and then Full control.

  • In the WhatsApp Accounts section, select Messages templates (view only) and Messages.

  • Click on Assign assets.

Assign WhatsApp assets

Generating the token

  • From system users, click on Generate token.

Generate token
  • Select the desired application.

  • Select the token expiration time (60 days or never).

triangle-exclamation
  • Assign the following 3 permissions:

    • whatsapp_business_manage_events

    • whatsapp_business_management

    • whatsapp_business_messaging

Select permissions for token
  • Then click on Generate token.

circle-info

Keep this token, which must be entered in GLPI.


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

GLPI WhatsApp account ID
  • 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.

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

Message templates in 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

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

App basic settings - privacy and logo

Payment Method

A payment method must be enabled, otherwise message templates cannot be sent.

  • From your Meta accountarrow-up-right, go to Accounts > WhatsApp accounts.

  • Select the desired account.

  • Click on Payment settings and follow the steps.

Payment settings

Publish your application

You can now publish your application.

Publish application

Ticket configuration

Anonymous access

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

Anonymous access setting

Ticket title template

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

Ticket title template

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.

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