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

# Facebook Offline Events

> Syncing Omneo in-store transactions to a Meta (Facebook) offline event dataset.

The Facebook Offline Events integration forwards in-store transaction data from Omneo to a Meta Conversions API offline event dataset. This lets you attribute offline purchases to your Meta ad campaigns.

## How it works

When a `transaction.created` event fires in Omneo, the offline event extension receives the webhook and forwards the purchase data to Meta's Conversions API. Meta matches the transaction against its user data and attributes the purchase to the relevant ad campaigns.

## Prerequisites

You need:

* A Meta Business account
* A Meta Events Manager dataset configured for offline purchases
* A Conversions API token (generated from your dataset settings)
* Your Omneo tenant credentials (domain, token, shared secret)

## Step 1: Create an offline event dataset in Meta

1. Open [Meta Events Manager](https://business.facebook.com/events_manager2/list)
2. Select **Connect Data Sources → Offline → Get started**
3. Name your dataset (e.g., "Omneo Offline Purchases")
4. Select **Set Up Conversions API**, then select **Purchase** as the event type
5. Follow the setup wizard and select **Open Implementation Guide** on the final screen
6. Generate a Conversions API token and copy it
7. Go to your dataset's **Settings** tab and copy the **Dataset ID**

## Step 2: Provide credentials to Omneo

Send the following to your Omneo implementation team to enable the plugin:

* Conversions API token (from step 6 above)
* Dataset ID (from step 7 above)
* Mapping of your Omneo location types to Meta offline event source types (e.g., `{"store": "physical_store"}`)

## Step 3: Omneo configuration

Your Omneo implementation team will:

1. Configure the `fb-offline-event` plugin settings with your credentials
2. Create a `transaction.created` webhook pointing to the offline event extension

## Data sent to Meta

For each transaction, the integration sends:

| Field          | Source                                          |
| -------------- | ----------------------------------------------- |
| Event type     | `Purchase` (fixed)                              |
| Value          | Transaction `total`                             |
| Currency       | Profile currency                                |
| Event time     | `transacted_at`                                 |
| Email (hashed) | Profile `email`                                 |
| Phone (hashed) | Profile `mobile_phone`                          |
| Location       | Transaction `location_id` mapped to source type |

<Note>Content needed: event matching rate optimisation, PII handling details, and supported Meta SDK versions.</Note>
