> For the complete documentation index, see [llms.txt](https://docs.patagon.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.patagon.ai/en/marketing-and-attribution/meta-ads/meta-conversions-api/business-messaging-dataset.md).

# How Patagon AI creates your business messaging dataset

To send Click-to-WhatsApp (CTWA) conversions to Meta, Patagon AI needs a **business messaging dataset** — see [The dataset your CTWA conversions need](/en/marketing-and-attribution/meta-ads/meta-conversions-api.md#the-dataset-your-ctwa-conversions-need). This page explains how Patagon AI provisions that dataset, where it lives, and what to do when the business running the ads isn't the one that owns your WhatsApp account (the typical agency setup).

## How the dataset is set up

When you connect your Meta account to Patagon AI, we look for a business messaging dataset tied to the **WhatsApp Business Account (WABA)** you've connected in Patagon AI:

* **If one already exists**, Patagon AI uses it.
* **If there isn't one**, Patagon AI **creates it for you** — in the **business portfolio (Business Manager) that owns the WABA**, meaning the portfolio where your WhatsApp Business Account was created. It's named **`<Your Company> - Patagon Event Data`**.

Either way, you don't build the dataset by hand. You do still connect it to your ad account once — see [Connect the dataset to your ad account](/en/marketing-and-attribution/meta-ads/meta-conversions-api.md#connect-the-dataset-to-your-ad-account).

## When the ads and the WhatsApp account live in different portfolios

The dataset always belongs to the portfolio that owns the WABA. That's simple when the **same business portfolio owns both your WhatsApp account and your ad account** — the dataset and the ads are in the same place, and there's nothing extra to do.

It's different when they're **split across two portfolios**, which is most common when a **marketing agency runs ads for a client**:

* The **agency's** business portfolio connected Meta and owns the **ad account**.
* The **client's** business portfolio owns the **WABA** — so the business messaging dataset is created there.

Because the dataset lives in the client's portfolio, the portfolio that connected Meta can't use it until the WABA owner **shares it as a partner**.

{% hint style="warning" %}
This only matters if you want to **map conversions from Patagon AI to Meta**. If the portfolio that owns the WABA doesn't grant access to the portfolio that connected Meta, those conversions **won't be sent** — they fail with a permissions error, and show up as **Failed** in **Leads → Attribution → Settings → Events**.
{% endhint %}

## How the WABA owner shares the dataset

These steps are done by someone in the **business portfolio that owns the WABA** (usually the client).

First, get the **partner business ID** you'll enter: it's the **business ID of the portfolio that connected Meta and owns the ad account** (the agency's) — **not** the ad account ID. That portfolio can find it in its own **Business settings → Business info**.

Then, in the WABA owner's **Business settings**:

1. Open **Data sources → Datasets and pixels**.
2. Select the dataset Patagon AI created (**`<Your Company> - Patagon Event Data`**).
3. Open the **Partners** tab and click **Assign partner**.

![Datasets and pixels → your dataset → Partners → Assign partner](/files/6vOPiKzPTLIsA0SKvhKp)

4. Enter the **Partner business ID** (the ID of the portfolio that connected Meta and owns the ad account).
5. Under **Full access**, turn on **Manage events dataset**.
6. Click **Assign**.

![Enter the partner business ID and grant Manage events dataset](/files/EfBIMNsEvJhPUpCbyJW7)

With that permission in place, the portfolio running the ads can map conversions from Patagon AI to Meta with no permissions issues.

## Related

* [The dataset your CTWA conversions need](/en/marketing-and-attribution/meta-ads/meta-conversions-api.md#the-dataset-your-ctwa-conversions-need) — the two ways to end up with a messaging-capable dataset.
* [How to add business messaging events to your website dataset](/en/marketing-and-attribution/meta-ads/meta-conversions-api/ctwa-offline-conversions.md) — the alternative, when you'd rather reuse an existing website dataset.
* [How to create Click-to-WhatsApp campaigns](/en/marketing-and-attribution/meta-ads/meta-campaigns/click-to-whatsapp.md) — where you select this dataset when building the campaign.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.patagon.ai/en/marketing-and-attribution/meta-ads/meta-conversions-api/business-messaging-dataset.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
