# How to trigger a WhatsApp automation - WAX

You will create one API-triggered flow in WAX, add your WAX API key into Batch, and finally configure a Universal step that sends the request.

{% hint style="info" %}
**Note:** If you have an existing WAX connection, you can skip step 2. This step must be done only once.
{% endhint %}

{% stepper %}
{% step %}

## **Step 1 — Create an API-triggered automation in WAX**

Start in WAX.\
You need a WhatsApp automation that begins when it receives an API request — this is what Batch will trigger.

#### **What to do**

1. Open **Automations** in WAX
2. Create a new automation
3. Choose "**Incoming Webhook"** as the trigger
4. You can add the WhatsApp template now or add it later

<figure><img src="/files/0WmcE3iw0JUx9okfViV5" alt="Select “Incoming Webhook” mode as the trigger."><figcaption><p>Select “Incoming Webhook” mode as the trigger.</p></figcaption></figure>

This panel also displays the destination URL, API key name, and JSON example you will use later.
{% endstep %}

{% step %}

## **Step 2 — Add your WAX API key into Batch**

Batch needs your WAX API key to authenticate each time it sends a trigger request.

#### **In WAX**

Copy the hidden Value (the "Bearer Token" value) from the Trigger panel, just next the `Authorization` field.

<figure><img src="/files/HBOA8Z1plSdR2eTkstHe" alt="Retrieve your Bearer token"><figcaption><p>Retrieve your Bearer token</p></figcaption></figure>

**In Batch**

1. Go to **Settings → Channels → Universal**
2. Click **New Credential Headers**
3. Choose a name (e.g., “WAX”)
4. Key → `Authorization`
5. Value → paste the key from WAX
6. Save

<figure><img src="/files/h3WXseRWmTv9Gq6YRZf3" alt="Add the information in the Universal channel settings"><figcaption><p>Add the information in the Universal channel settings</p></figcaption></figure>

> **Note:**\
> If you create multiple automations in WAX, they will all use the same API key.\
> You only need to add the credential once in Batch.
> {% endstep %}

{% step %}

## **Step 3 — Configure the Universal step in Batch**

In this step, you will add the Universal step in your Batch automation and configure it to trigger the WAX automation you created in Step 1.

#### **Add the Universal Step**

1. Open the Batch automation where you want to trigger WhatsApp
2. Click the **+** button
3. Select **Universal**

This opens the Universal step configuration screen.

<div data-full-width="false"><figure><img src="/files/qheoMB6JfCL6kHV4bSzW" alt="" width="314"><figcaption><p>Select "Universal"</p></figcaption></figure></div>

***

#### **Configure the WAX request**

Fill in the fields using the information from WAX:

**1. Destination URL**

Paste the URL shown in WAX’s API trigger (example: `https://api.getwax.io/v1/hooks/0ab31563-9c59-4e87-b112-2a7b582491d4` )

**3. Headers**

* Choose the credential header you created earlier (e.g., **WAX**)
* Add another header :&#x20;
  * "Key" : `Accept`
  * "Value" : `application/json`<br>

**4. JSON Body**

Start with the phone number:

```json
{
  "phone": "{{b.phone_number}}"
}
```

<figure><img src="/files/0Z7MCpJfmoKQBKVZcCbr" alt="Configure the step"><figcaption><p>Configure the universal channel step</p></figcaption></figure>
{% endstep %}

{% step %}

## **Step 4 — Test the connection**

Once your Universal Step is configured, you can test it directly from Batch to make sure everything is working properly.

#### **How to test**

1. In the Universal Step, click **Test API**.
2. If your JSON body includes personalization (e.g., `{{b.phone_number}}`), choose a **test profile** so Batch can fill in real data.
3. Click to send the test request.

<figure><img src="/files/JazxLt0F5bCJryOYVrET" alt="Test your configuration"><figcaption><p>Use the "Test API" button in order to make sure everything is working properly</p></figcaption></figure>

#### **What the test does**

* Batch performs the exact same API call it will make when the automation is live.
* WAX receives the request and triggers the corresponding WhatsApp automation for the selected profile.

#### **What Batch validates**

Batch will display whether the request was **successfully delivered** to WAX or if something needs fixing (e.g., wrong URL, missing key, invalid JSON).

> **Note:** Batch can only confirm that the trigger was correctly called. It does not have visibility on what happens inside WAX afterward (e.g., whether the message was sent or failed).
> {% endstep %}

{% step %}

## **Step 5 — Activate your Batch automation**

When the test is successful, you can turn your Batch automation live.

#### **To activate**

1. Review your workflow, including the Universal step.
2. Run your automation

#### **Once live**

* Every time a profile moves through this step in your automation, Batch will send the API request to WAX.
* WAX will then run the WhatsApp automation linked to the URL you configured.
  {% endstep %}
  {% endstepper %}

#### **Additional Universal steps**

If you want to trigger multiple WhatsApp scenarios (e.g., a follow-up message, or different WAX automations), you can add more Universal Steps within the same Batch automation or in a new one by following these steps again (Step 2 can be skipped).&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.batch.com/integrations/universal-channel/how-to-trigger-a-whatsapp-automation-wax.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
