Instant - Meta Connector Provider Setup

Instant - Meta Connector Provider Setup

 Overview

This guide outlines how to integrate the WhatsApp Channel using the Meta Connector as the provider for managing both inbound and outbound interactions within your XCALLY environment.

Requirements

Before starting the integration, ensure the following prerequisites are met:

  • Public HTTPS Endpoint: Your Motion instance must be publicly accessible via HTTPS. For security reasons, using a reverse proxy is highly recommended. Learn more → find out more

  • Meta for Developers Account: You must be registered on Meta for Developers to configure your app

  • Meta Business Suite Account: Required to manage WhatsApp Business accounts and settings.

  • Check Meta's pricing documentation to understand costs associated with message templates and campaigns.: find out Meta's documentation here (and pricing updates here)

Video Tutorial

Create a Meta App for WhatsApp

 

image-20250507-123309.png
image-20250507-123334.png

 

  1. Log in to Meta for Developers → http://developers.facebook.com

  2. Navigate to My AppsCreate App.

image-20250507-123505.png

 

  1. Define the App name that will show on your My Apps page and associated with your app ID. You can change the name later in Settings.

  2. Indicate the App contact email.
    Then click on Next

 

 

image-20250507-123825.png

 

 

  1. Select Other as use case.

  1. Choose Business as app type.

image-20250507-124020.png

 

  1. Enter:

  • Display Name of the app (modifiable later) and App Contact Email.

  • Connect the app with your Account Business Manager (optional)

  • Click Create App.

  1. In the app dashboard, select Add a Product → choose WhatsApp to configure integration → click Set Up.
    (Find our Meta documentation here)

  1. Click “Start using the API” to proceed with API Configuration

image-20250507-124542.png

 

  1. You will view this visualisation:

  • Generate an Access Token.This token is required to authenticate your API requests. The default access token is temporary and expires after 24 hours. For production use, it is strongly recommended to generate a Permanent Access Token.

  • To verify the integration is correctly configured, you can perform a test API request directly from the WhatsApp Developer Console. Follow these steps:

    1. In the From field, select the WhatsApp Business number created during app setup.

    2. In the To field, enter the recipient phone number that will receive the template message hello_world.

    3. Click Send message.

 

If you’re using a test number, you can define up to five recipient phone numbers

After sending your first message, verify that the recipient receives it successfully. This verification step ensures that your setup and authentication are correctly configured.

 

image-20241111-144943.png

Alternatively, you can use a curl request with the WhatsApp API and the generated access token to test and confirm the setup.

 

  1. At Step 5 of the setup process, you will be able to select "Add a phone number".

     

 

 

Fill in the following details:

  • WhatsApp Business display name

  • Time zone

  • Business category

 

Next, provide your WhatsApp phone number. Select the appropriate country prefix. Based on your selection, you will receive either a pin code via SMS or a verification phone call.

Refer to Meta's official documentation for more information on registering a business phone number

⚠️ A valid payment method must be configured before proceeding.

After you complete the verification and payment setup, you’ll see a confirmation message like this in the Meta console:

Congratulations! Your display name XcallyTest was approved. Download and connect your phone number certificate to send messages to your customers.

For certificate management of WhatsApp Cloud API solution (which does not require an on-premise installation), it is NOT necessary to upload a certificate manually. In fact, Meta handles all authentication and security directly in the cloud platform.
To link the phone number, simply send a test message using the default “hello_world” template.

Once this message is sent, you’ll receive an email similar to:

image-20241111-145200.png

The phone number +39 *** *** from your WhatsApp business account can now send messages to 1.000 customers per day

Configure a WhatsApp Account on XCALLY

By entering in your XCALLY environment, go to WhatsApp Channel → WhatsApp Accounts to create a new account for outbound campaign

 

Click on Add button and enter:

  • Account Name

  • Key: identification code (max 5 characters)

  • List: A Contact Manager list used to associate customer contacts. All campaign contacts will be stored in this Master List, enabling a unified customer journey across campaigns.

Ensure that contacts in the Master List include a valid WhatsApp number in the Phone Field

  • Proxy or Motion Domain: your server address

  • Type: select Meta

     

image-20240502-152300.png

 

Retrieve the following values from your Meta Business Account:

  • Account SID = WhatsApp Business Account ID

  • Auth Token = Access Token ( you need to create a Permanent Access Token to use WhatsApp correctly because access token expires after 24 hours. Follow these guidelines)

  • AppId = App ID

  • Phone number Id = phone number ID

  • Phone number with prefix (with +)

Click Add to complete the account setup.

 

How to generate a permanent access token

To generate a Permanent Access Token, follow these steps using your Meta Developer Account to create a System User with specific permissions.

image-20250507-132211.png
  1. Open your Business Settings and select the desired business manager

 

image-20250507-132409.png

 

  1. Go to Users System users and click on Add.

 

image-20240228-142250.png

 

  1. Set a System Username and select Admin as User Role

Screenshot 2025-03-05 093531-20250305-083531.png
  1. Click on Assign Assets and under Select asset type, choose Apps

image-20250305-085342.png
  1. Select your WhatsApp created app and enable full control (Manage app)

You can create only one system user per Business account.
If you have multiple WhatsApp Apps, when generating a new token, select the appropriate app for which you want the permanent token.

Screenshot 2025-03-05 093727-20250305-083727.png
  1. Click on Generate Token, by selecting your App

Screenshot 2025-03-05 093736-20250305-083736.png
  1. Set “Never” as token expiration

image-20250513-074148.png

 

 

  1. Add the following required permissions when generating the token:

  • WhatsApp_business_messaging

  • business_management

  • pages_show_list

  • pages_messaging

  • WhatsApp_business_management

  • pages_manage_metadata

  1. Click on "Generate Token" to obtain a permanent token to paste on Auth Token section

Configuration of created account

After creating a WhatsApp Business account in XCALLY, you can access and edit its configuration:

  • Navigate to the Settings tab to view and update previously inserted details.

  • You will also see the Receive URL—an auto-generated API endpoint used to receive incoming messages from the WhatsApp Channel provider.
    📋Click the clipboard icon to copy this URL. You will need to paste it into your Meta Business Account during webhook configuration.

Configure the Webhook in Meta

To complete the webhook setup:

  1. Go to your Meta Developer Dashboard.

  2. Click Configure Webhook.

  3. In the Callback URL field, paste the copied Receive URL.

  4. In the Verify Token field, enter the token found under the Advanced tab of your XCALLY WhatsApp account

Your server must have a valid HTTPS certificate to use the callback URL.
Occasionally, Meta may block certain domains (blacklisted). If this occurs, contact Meta Support for assistance.

 

image-20250513-090142.png
image-20250513-090333.png
image-20250513-090400.png

 

To ensure full functionality, subscribe to the following webhook events, by clicking on Manage to insert these fields:

  • account_alerts

  • account_update

  • message_template_status_update

  • messages

  • template_category_update

Under the Advanced tab, you can:

  • View your Proxy and Token Number

  • Enable Mandatory Disposition

  • Select Recontact Template

 

In the Dispositions and Canned Answers section, you can define specific dispositions/canned answers for this account.

 

To handle incoming WhatsApp interactions:

  1. Go to the Actions tab.

  2. Create a dialplan that routes incoming interactions to the appropriate queue.

Ensure that agents are assigned to the relevant queues and associated with the corresponding WhatsApp accounts. Otherwise, they will not be able to manage interactions.

In the Interactions tab, you can:

  • View Campaign Interactions

  • Check the Status of each interaction

 

Upgrade WhatsApp API version

Starting from version 3.53.0, API version v23 is supported.
To upgrade your WhatsApp Meta API to the latest version (v23), follow the steps below:

  • Open your app in the Meta Developer Dashboard.

  • In the sidebar, navigate to App settings → Advanced → View Upgrade API version.

  • From the dropdown menu, select v23 as the API version for your app.

image-20250625-082526.png
  • click Save Changes to apply the upgrade. This change will apply to all users of the app.

Use WhatsApp Channel with Meta for Agents

Agents can access WhatsApp via the WhatsApp Channel section in XCALLY.
Agents need to be associated to the created Meta account to receive new interactions

When a new inbound message is received, the agent will see a popup with WhatsApp account name, associated queue and sender’s phone number

Agents manage conversations via the Omnidesktop Interface.

Managing Contact Fields: Phone & Mobile

To ensure optimal performance, we recommend inserting the same number in both the Phone and Mobile fields for each contact

Remember that:

  • outbound Meta campaigns send message to phone field

  • single messages sent by agent consider mobile field

Starting from version 3.50.0, if either field is missing, the system automatically fills the other with the available number.

In the Contact Finder modal, search functionality supports both the Phone Number and Mobile fields.

image-20250424-150251.png

Scenarios:

  • Contact has only Phone field → Chat is created; same number is auto-filled into Mobile field

  • Contact has only Mobile field → Chat is created; same number is auto-filled into Phone field

  • Contact has same number in both fields → Chat is created and message sent

  • Contact has different numbers in Phone and Mobile → Toast alert is shown. If it is a single message sent by agent, the number considered is the mobile one

  • New number typed into the message bar → Chat is created; number is set to both Phone and Mobile