WhatsApp Business integration

Content


To connect WhatsApp Business to Usedesk, you need to go through verification with Facebook by filling in all the necessary documents. We will help you in this matter! Please e-mail us for support.

Attention! Due to the restrictions of WhatsApp Business app does not work with the following numbers:

  • Crimea (+7978)
  • Cuba (+53)
  • Iran (+98)
  • North Korea (+850)
  • Syria (+963)
  • DPR (+7949)
  • LPR (+7959)
  • Turkey (+90)
This applies to both companies and clients — they cannot send or receive messages via WhatsApp Business. The restriction is based only on the number of the user and not on his/her current location.


WhatsApp Business connection

As soon as Facebook has verified you, you can start creating a channel.

To connect WhatsApp to Usedesk:

1. Open the «Extensions» section and check if the integration («ON» for WhatsApp Business (pact)) is enabled.


2. Go to the «Channels» section and click «Add Channel».


3. Click on WhatsApp Business.



4. Fill in the fields that appear.


  • Name of channel — any name of the channel that is convenient for you, which will be displayed in the list of channels in Usedesk;
  • Phone number — the phone number to which your WhatsApp Business account is linked;
  • Token Whatsapp — you can get it in the account settings 360 dialog (section «WhatsApp Accounts» in the menu on the left → blue button «Generate API Key»).


Then click «Create».


Done, the channel is connected!


Connection via 360dialog authorization in Usedesk

To make the process of connecting WhatsApp Business easier, you can log in to 360dialog directly in Usedesk — then you won't have to enter your phone number and WhatsApp token.

This function can be enabled on request — to do this, you need to contact us at support@usedesk.com.

The connection process with this feature will be the following:

1. The first three steps of the instruction remain identical to the instruction above: check if the WhatsApp Business extension (pact) is enabled: go to "Extensions" → "Channels" → click "Add Channel" and select WhatsApp Business.

2. Next, the 360dialog authorization window will open. Enter your username and password and click "Login":



3. Think of a name for the channel and click the "Create" button:



That's it, the integration is connected!


Integration principle

When working with WhatsApp Business, you will encounter restrictions such as a 24-hour window for standard correspondence. You are given 24 hours to respond to a message sent by a customer. The 24-hour countdown starts over every time a customer sends you a message.

After this time has elapsed, only a template previously agreed with Facebook can be sent.

The integration cost includes 1 000 correspondences per month. A correspondence is a conversation within a 24-hour interval. So, you can have 1 000 correspondences with 1 000 clients, if you had a chat with each client within 24 hours, or 1 000 correspondences with 500 clients, if you had a chat with each client within 48 hours.

A correspondence (24-hour countdown) begins when the first company message is delivered. The first company message can be any, if it was sent in reply to the first user message, or a previously agreed macros, if a correspondence was initiated by you.

If the limit of 1 000 correspondences per month is reached, there will be a correspondence fee until the next month. A correspondence fee started by a user is different from a correspondence fee started by a company using a macros.

If a client initiated a dialogue, but you didn't reply to a message, that dialogue is not considered as a correspondence, and you don't have to pay for it.


In Usedesk to work with the WhatsApp Business channel and its nuances, we have implemented:
  • incoming requests and responses to them within 24 hours;
  • Hints about the 24-limitation. You can find it in the error's form in the request card with a link to the current article;
  • Work with pre-agreed templates, which you can send either manually or automatically using a trigger;
  • Initialization of the dialogue with the client.

Work with templates

Templates are pre-built formats for standard messages that you plan to send to clients. Templates can be used to respond to a request after 24 hours and to initiate a chat.
The templates that you plan to use must be coordinated with Facebook. To do this, write to us in support, and we will help you do everything right. Approximately, template approval takes 2–3 weeks.

In the list of templates in Usedesk for convenience, the names of templates are displayed, not their id — so it is more convenient to immediately find the right one, without checking the id.

The template that you will send for approval must contain the message text (no more than 1024 characters) and its name. If necessary, specify the place for numbers in the text.

The template can also contain buttons — no more than three in one template. One button can contain no more than 20 characters.

To respond to the client after 24 hours, you can configure sending templates via rules or via templates in Usedesk:


If you use variables in templates:
  • If your consistent template implies variables that can be pulled from Usedesk, use Usedesk variables;
  • If there are no such variables, then after 24 hours, initialize the message yourself using any variables.


When a macros is sent, there are no notes in a chat/a ticket about sending it – for example, an outgoing message text with a macros or logs about an executed action.

At the same time macros are sent, and variables work correctly. There are no complaints from clients about this function.

If this nuance is inconvenient to work with, at this moment there is a following decision: to create a trigger with an additional action «Create comment», which will repeat a macros text. If necessary, one can specify that a macros was sent to a client.


Sending a template via the button «Send template»

The «Send template» button appears in an existing chat after 24 hours.


When you click on the «Send template» button, a list of available templates will be displayed. Select from the drop-down list the name of the template that you will use to send the message. You have coordinated the names of the templates with Facebook.

As soon as you select a template, additional fields will become available to you:
  • Template text – when selecting a template, we immediately add the template text and variables. The template text cannot be edited – it is an information field;
  • Variables — required field. The field will be displayed if you have variables in the template. Each variable has its own field;
  • The «Save variables» button — when clicking for the current agent and the currently selected template, the system remembers what the variable fields are filled with. The next time you select this template, the system will automatically fill them in.

After filling in the required fields, click the «Create» button, and the message will go to the client.


Sending a template via triggers

In Usedesk, in the «Automation» → «Triggers» section, configure a rule to send such a template to the client:
  • select the appropriate conditions in the «What» and «When» blocks under the template submission and add the «Submit trigger» action;
  • in the «Submit trigger» action, specify the template id. From the «trigger example» this is the value of the «Trigger_name» column;
  • If your template contains variables, then list them in the rule separated by semicolons.

Example:


Sending a template via Usedesk macroses

In Usedesk in the section «Automation» → «Macroses» set up a macros:
  • add the «Submit template» action;
  • in the «Submit template» action, specify the template id. From the example, this is the value of the «Template_name» column;
  • if your template contains variables, then list them in the rule separated by semicolons.

Example of a macros in Usedesk:



Important!
When using a template after 24 hours, the template text will not reach the client and be marked with an internal comment.


Dialogue initialization

In the «Chat» section, you can display the button for creating a dialogue in Whatsapp Business «Create chat», which will allow you to initiate a conversation with your customers independently.


This requires:
  • Connect the WhatsApp Business channel;
  • Configure access rights for the agent to work with this channel, which has WhatsApp Business enabled. If the agent does not have access rights to such a channel, this button will be absent, including assigning a chat to it or having administrator rights.
If you have several channels with WhatsApp, then when using the «Create chat» button, you can choose from which channel, and to whom you will write first. Chat initiation forms via WhatsApp and WhatsApp Business are different.
Email the customer by filling in the fields:
  • Channels — select a channel from Whatsapp Business;
  • Client — enter the client's name and from the drop-down list select who you will write to If you need to create a new customer, then write the name. If the search did not return any results — click «New client»;
  • Phone — enter the phone number in the international format (without indicating +) XXXXXXXXXX (for example, for the Russian Federation the number will look like this 79254321098, and for the Republic of Belarus - 375296787656), or select a client from your database and the number will be set automatically;
  • Template name — enter the name of the template that you will use to send the message. You have coordinated the template names with Facebook;
  • Template text — when selecting a template, we immediately add the template text and variables. The template text cannot be edited – it is an information field;
  • Variables — required to fill in. The field will be displayed if you have variables in the template. Each variable has its own field;
  • The button «Save variables» — when you click for the current agent and the currently selected template, the system remembers what the variable fields are filled with. The next time you select this template, the system will automatically fill them in.
After filling in the required fields, click the «Create» button, and the message will go to the client.


Errors

If an error occurs when sending a message, the system will display a notification in the upper right corner «Failed to send a message. Please write to us at support@usedesk.com».

Our support will tell you what to do.



If you use services such as Infobip or Landbot and are already paying them to connect WhatsApp Business, follow these links and get acquainted with how these services are integrated with Usedesk.