> ## Documentation Index
> Fetch the complete documentation index at: https://docs.worldvisagroup.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WhatsApp Business Chat Integration with WorldVisa

> Connect WhatsApp Business to WorldVisa to send chat notifications through workflows. Configure phone number IDs, access tokens, and approved message templates.

## Getting Started

To integrate WhatsApp Business with WorldVisa, You will have to create a facebook developer app and obtain the necessary credentials.

**1. Create a Facebook developer app**

Visit the [Facebook Developer Portal](https://developers.facebook.com/apps/) and create a new app.

Select "Other" for "What do you want your app to do?" and select "Business" for "Select an app type".

**2. Setup WhatsApp product**

On the App Setup page, click on "Set Up" under the "WhatsApp" product. You will need to create or
add a Facebook Business Account to your app.

**3. Send a sandbox message**

Copy the following pieces and paste them in the WorldVisa WhatsApp Business integration settings:

* Temporary access token - Access API token field
* Phone Number ID - Phone number identification field

> [!WARNING]
>
> It's important to note that the test credentials for whatsapp cannot be used
> in production and will expire in 24 hours. You will need to submit your app
> for review to obtain production credentials.

**4. Add a test phone number**

You can add a test phone number to the sandbox by clicking on the **"Add Phone Number"** button.
This number can be used to test your integration with WorldVisa before submitting for a review.

**5. Send a test notification from WorldVisa**

You can now create a new workflow with a "chat" node, and add your content. Save your workflow, and click on **"Trigger Notification"** button.

In the to field, specify the phone number you added in the sandbox, and click on "Send Notification".

```json theme={null}
{
  "subscriberId": "TEST_SUBSCRIBER_ID",
  "phone": "+11111111111"
}
```

and in the `overrides` field, add the following:

```json theme={null}
{
  "chat": {
    "template": {
      "name": "hello_world",
      "language": {
        "code": "en_US"
      }
    }
  }
}
```

> [!NOTE]
>
> For test credentials you can only used the built in Whats App Template.

## Going to production

**1. Register a business phone number**

To go live you will need to add a real business phone number and submit your app for review.
Follow the [Facebook Instructions](https://developers.facebook.com/docs/whatsapp/cloud-api/get-started/add-a-phone-number) on how to proceed.

**2. Generate a permanent access token**

Follow the [Facebook
Instructions](https://developers.facebook.com/docs/whatsapp/business-management-api/get-started/)
on how to generate a permanent access token. Depending on your use case.

**3. Create a WhatsApp template**

You will need to create a WhatsApp Template to send notifications to your customers. Create a template in the [Business Manager](https://business.facebook.com/wa/manage/message-templates) and submit it for review.
After your template is approved, you can use the `template_name` to send notifications to your customers.

To send a notification with a template, you will need to add the following to the `overrides` field:

```bash theme={null}
curl --location "${WV_API_URL}/v1/events/trigger" \
--header 'Content-Type: application/json' \
--header "Authorization: ApiKey ${WV_API_KEY}" \
-d '{
    "name": "workflowId",
    "to": {
        "subscriberId": "subscriberId",
        "phone": "+11111111111"
    },
    "payload": {},
    "overrides": {
        "chat": {
            "template": {
                "name": "template_name",
                "language": {
                    "code": "en_US"
                }
            }
        }
    }
}'
```

## Configure WhatsApp overrides

Save a WhatsApp Business override on the Chat step when you need Cloud API message shapes beyond the shared Chat step content (text editor body or block/card fallback text), for example templates, interactive buttons, or media. A provider-wide override applies whenever any WhatsApp Business integration sends the step. An override saved on one integration applies only when that integration sends it. The JSON is stored on the step, so it is versioned and promoted with the workflow. See [Overrides for one integration](https://docs.worldvisagroup.com/developers/integrations/chat#overrides-for-one-integration).

> [!NOTE]
>
> Provider content overrides in the workflow editor are rolling out gradually and may not be available on your Chat step yet. Overrides passed at trigger time work regardless. See [provider content overrides](https://docs.worldvisagroup.com/developers/integrations/chat#provider-content-overrides).

**1. Open the Chat step**

In the WorldVisa Dashboard, open your workflow and select the Chat step that uses the WhatsApp Business integration.

**2. Open the WhatsApp overrides editor**

In the step editor, open the content source dropdown. It reads **Default content** until you switch it. Under **Overrides**, pick **WhatsApp Business** when it has one active integration and no integration-specific override is saved. Otherwise, WhatsApp Business is grouped: pick **All integrations** for the payload every WhatsApp Business integration shares, or pick one integration for a payload only that integration sends. If that row has no override yet, choose **Override** beside it.

**3. Write the override JSON**

Enter a JSON object of [WhatsApp Cloud API Message](https://developers.facebook.com/docs/whatsapp/cloud-api/reference/messages) fields. The editor autocompletes supported field names (`type`, `text`, `template`, `interactive`, media, `context`, and related bodies), validates the JSON, and flags unsupported fields.

**4. Save the workflow**

The override applies on the next trigger.

Override values may contain [Liquid](https://docs.worldvisagroup.com/developers/workflow/add-notification-content/personalize-content.md#apply-logic-with-liquidjs) templates, which WorldVisa compiles at send time:

```json theme={null}
{
  "type": "text",
  "text": {
    "body": "Order {{payload.orderId}} is {{payload.status}}"
  }
}
```

For text messages, `text.body` is the primary content field. If your override omits it, WorldVisa fills it with the rendered Chat step body. Recipient addressing (`to`) is resolved from the subscriber endpoint — prefer addressing a different subscriber when you want a different destination.


## Related topics

- [Discord Chat Integration with WorldVisa](https://docs.worldvisagroup.com/developers/integrations/chat/discord.md)
- [What is WorldVisa Console?](https://docs.worldvisagroup.com/developers/what-is-worldvisa-console.md)
- [How do contexts work in WorldVisa?](https://docs.worldvisagroup.com/developers/concepts/contexts.md)
- [Integrations](https://docs.worldvisagroup.com/developers/concepts/integrations.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.