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

# Offline Sales Implementation

> How to send in-store (offline) sales to Criteo Retail Media so they can be attributed to onsite and offsite campaigns, using a flat file over SFTP or a real-time API.

Offline sales are purchases made in your physical stores that can be attributed to an ad a shopper saw or clicked online. Sending them to Criteo lets Retail Media measure the full effect of a campaign, not only the online orders.

Once offline sales reach Criteo, the platform handles attribution. The attribution windows set on each campaign also apply to offline sales, and advertisers can see online sales, offline sales, or both combined for metrics such as ROAS, sales, units, assisted sales and assisted units.

This page explains what data to send, the two ways to send it, and how to check that it works.

> [!NOTE]
>
> Offline sales can only be attributed if the shopper identifier you send matches one you already collect on your site or app. Before you start, make sure your [onsite tracking](https://developers.criteo.com/retailer-integration/docs/introduction-to-beacons.md) is live and note which identifier you send with it.

## Choose an integration method

| Method | Best for | Latency |
| - | - | - |
| **Flat file over SFTP** | Retailers that export transactions in batches (daily or hourly) | Attribution visible within about 74 hours of the sale |
| **Offline sales API** | Retailers that can push each transaction as it happens | Attribution visible within about 8 hours of the sale when sent in real time |

You can also pass offline sales through a data partner you already work with, such as a CRM, loyalty, digital receipt, integration platform or point-of-sale provider. Contact your Criteo representative to discuss this option.

Whichever method you choose, contact your Criteo representative first. They will give you your Criteo account ID and SFTP location, or the API access you need, and will agree the setup with you.

## What you need to send

Every offline sale must contain:

* **A shopper identifier** that matches your onsite integration (see [Shopper identifiers](#shopper-identifiers)).
* **A transaction ID**, shared by all the products in the same purchase.
* **A timestamp**, accurate to the minute.
* **The products purchased**, each with its product ID, unit price and quantity.
* **A currency**, unless all your sales are in the account's default currency.

Optionally, send the **store ID** where the purchase happened. It should match the store IDs you use in your onsite integration.

## Shopper identifiers

Criteo supports three identifiers. Send at least one, and use the same one you already send with your onsite tracking so offline sales can be matched to ad exposure.

| Identifier | Meaning | Delivery API parameter |
| - | - | - |
| `retailer_visitor_id` | An unauthenticated ID that persists across sessions on the same device | [`retailer-visitor-id`](https://developers.criteo.com/retailer-integration/docs/api-parameters-1#retailer-visitor-id) |
| `customer_id` | The ID of the logged-in shopper, consistent across sessions | [`customer-id`](https://developers.criteo.com/retailer-integration/docs/api-parameters-1#customer-id) |
| Email | The shopper's email, hashed | [`email`](https://developers.criteo.com/retailer-integration/docs/api-parameters-1#email) |

### Hashing emails

Criteo expects emails hashed as a SHA-256 hash of an MD5 hash. If you cannot produce that format, you can send a raw or MD5-hashed email and Criteo will hash it on ingestion. Before hashing:

1. **Trim** all spaces before and after the address.
2. **Clean** it by removing commas, semicolons, quotes and double quotes.
3. **Convert** it to lowercase.
4. **Encode** it in UTF-8.

Follow the same hashing rules for the emails you send in your onsite beacons. Matching rates depend on the two being consistent.

## Product IDs

Product IDs must match the IDs in your online product catalog. Offline sales for products that are not in the catalog cannot be attributed to the matching ads.

## Option 1: Flat file over SFTP

## File format

* Use CSV, TSV or TXT, with the header in the first row.
* Use **lowercase headers** with no spaces. If you use custom header names, they must also be lowercase. Criteo maps them to the fields below during setup.
* Send **one row per product**. Rows that belong to the same purchase must share the same `event_id`. Criteo groups the rows by `event_id` and calculates the transaction total from price and quantity.

## Fields

| Field | Required | Description | Example |
| - | - | - | - |
| `user_key` | Yes | The shopper identifier: the same value you send as [`retailer-visitor-id`](https://developers.criteo.com/retailer-integration/docs/api-parameters-1#retailer-visitor-id), [`customer-id`](https://developers.criteo.com/retailer-integration/docs/api-parameters-1#customer-id) or [`email`](https://developers.criteo.com/retailer-integration/docs/api-parameters-1#email) in your delivery API calls. | `1a2b3c4d` |
| `event_id` | Yes | The transaction ID. It must use the same format as the transaction IDs you log online. | `B1c2A3d4h6` |
| `event_time` | Yes | The time of the transaction, in UTC or with a UTC offset. | `2026-06-02T13:25:15+01:00` |
| `content_ids` | Yes | The product ID of the item purchased (one per row). | `12345` |
| `product_value` | Yes | The unit price of the item. | `1.25` |
| `product_quantity` | Yes | The number of units of the item. | `3` |
| `currency` | Yes, unless static | The [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. Retailers selling in a single currency can ask Criteo to set it once instead. | `USD` |
| `store_id` | No | The store where the purchase happened. | `987` |

### Example

```csv theme={null}
user_key,event_id,event_time,content_ids,product_value,product_quantity,currency,store_id
1a2b3c4d,B1c2A3d4h6,2026-06-02T13:25:15+01:00,12345,1.25,3,USD,987
1a2b3c4d,B1c2A3d4h6,2026-06-02T13:25:15+01:00,67890,4.50,1,USD,987
9z8y7x6w,C7d8E9f0g1,2026-06-02T14:02:44+01:00,12345,1.25,2,USD,412
```

The first two rows are one purchase with two products. The last row is a separate purchase.

## Delivery

* Upload your files to the SFTP folder Criteo gives you, or let Criteo download them from your own SFTP server.
* Send files at least once a day. Criteo can process files as often as every hour.
* Use a file name that includes the date, for example `retailername_offline_sales_2026_06_23.csv`.
* If your security policy requires the file to be encrypted before upload, tell your Criteo representative. Criteo can share a public key for you to encrypt with.

> [!WARNING]
>
> Criteo only ingests transactions that are uploaded **within 2 days of the transaction date**. A file uploaded on the 10th is processed for transactions from the 8th, 9th and 10th. Older transactions are rejected.

## Option 2: Offline sales API

The API accepts one shopper per request, with all of that shopper's transactions in an `events` array. Contact your Criteo representative to get access.

```http theme={null}
POST https://widget.criteo.com/m/event?apiKey={unique_name_logs}
Content-Type: application/json
```

`unique_name_logs` is used for logging only. Use the format `clientname_offlinesales`.

## Request body

**Account and shopper**

| Field | Required | Type | Description |
| - | - | - | - |
| `account` | Yes | integer | Your Criteo account ID. |
| `ip` | Yes | string | The shopper's IP address, or `127.0.0.1` if not applicable. |
| `site_type` | Yes | string | Always `instore`. |
| `user_segment` | Yes | integer | Always `19` for in-store data. |
| `retailer_visitor_id` | One identifier required | string | An unauthenticated ID persistent across sessions on the same device. |
| `customer_id` | One identifier required | string | The authenticated shopper ID. |
| `id.email` | One identifier required | object | The shopper's email, in one of `raw`, `md5`, `sha256_md5` or `sha256`. |

If you hold several identifiers for the same shopper, you can add them in `alternate_ids`, each with a `type`, a `value` and, for hashed values, a `hash_method`.

**Events**

| Field | Required | Type | Description |
| - | - | - | - |
| `events[].event` | Yes | string | Always `trackTransaction`. |
| `events[].id` | Yes | string | The transaction ID. Used for deduplication and debugging. |
| `events[].timestamp` | Yes | string | When the sale happened. Accepts a UNIX timestamp, or `yyyy-MM-ddTHH:mm:ssZ` (also with `z` or `zzz` for time zones). |
| `events[].store_id` | No | string | The store where the sale happened. |
| `events[].currency` | No | string | An ISO 4217 code. If empty, the account's default currency is used. |
| `events[].item[]` | Yes | array | The products purchased. |
| `events[].item[].id` | Yes | string | The product ID. It must match your online product catalog. |
| `events[].item[].price` | Yes | decimal | The unit price. |
| `events[].item[].quantity` | Yes | integer | The number of units. |

## Example

```json expandable theme={null}
{
  "id": {
    "email": {
      "sha256": "000e3171a5110c35c69d060112bd0ba55d9631c7c2ec93f1840e4570095b263a"
    }
  },
  "ip": "127.0.0.1",
  "account": 11532,
  "site_type": "instore",
  "user_segment": 19,
  "customer_id": "1a2b3c4d",
  "events": [
    {
      "event": "trackTransaction",
      "id": "tr123456",
      "timestamp": "2026-06-02T12:24:10Z",
      "store_id": "1234",
      "currency": "USD",
      "item": [
        { "id": "prod12345", "price": 23, "quantity": 1 },
        { "id": "otherprod5436", "price": 102, "quantity": 3 }
      ]
    }
  ]
}
```

## When do sales appear in reporting?

| How the sale is sent | When attribution appears in the Retail Media platform |
| - | - |
| API call as soon as the sale happens | Within 8 hours of the sale timestamp, like online orders |
| API call a few hours to about 2 days later | Within 74 hours of the sale timestamp, like SFTP files |
| SFTP file | Within 74 hours of the sale timestamp |

The maximum ingestion delay is 48 hours, so any transaction older than that is rejected.

## Test and validate

Before going live:

1. Send a small sample (a few transactions) through your chosen method and ask your Criteo representative to confirm it was received and parsed correctly.
2. Check that the shopper identifier, product IDs and transaction IDs in the sample match what your onsite integration sends.
3. Confirm the currency and timestamps are correct, including time zones.
4. Once sales are flowing, wait up to 30 days after the last data fix before judging results. Sales cannot be attributed to ad events older than 30 days.

## FAQs

**Which attribution settings apply to offline sales?**
The same settings as online sales: any combination of 7-, 14- or 30-day click and zero-, 1-, 7-, 14- or 30-day view-through windows.

**Are offline sales used for bidding or optimization?**
No. Bidding and optimizer models for Sponsored Products use online conversions and attribution only.

**Are offline sales available for offsite campaigns?**
No. Offline attribution is currently limited to onsite campaigns.

**Why do I need to send data within 2 days?**
Late data cannot be reflected in reporting on time and forces recalculations. Data older than 2 days is rejected so that reporting stays accurate and consistent.

**Who do I contact for access or help?**
Your Criteo representative or Account Strategist.
