Sign in

Welcome to our Support Center

Get help with integration and live campaigns

Welcome to our Support Center. Get help with integration and live campaigns

Offline sales onboarding - API integration

Integration through Criteo's offline sales onboarding API offers an automated way to upload your offline sales data, and means sales can be ingested into Criteo’s identity graph in real-time.

The offline sales onboarding API is a writing REST API which uses a POST method with JSON Request body.  An example of the full JSON request body can be found here.

Please see below the set of transaction data parameters that must be provided in the JSON Request body in order to pass your offline sales data to the Criteo Offline API. 

To request access to the offline sales onboarding API endpoint, please get in touch with your Criteo Account Strategist.

1.1 - account data

1.1.1 ip

This field is required for all products in the transaction JSON, and cannot be empty/blank.

IP address.  Set to 127.0.0.1 if not applicable.

Value: Text.

Example: 127.0.0.1

1.1.2 account

This field is required for all products in the transaction JSON, and cannot be empty/blank.

Criteo Account ID. If you're not sure what this is, please get in touch with your Criteo Account Strategist.

Value: Integer.

Example: 11532

1.1.3 site_type

This field is required for all products in the transaction JSON, and cannot be empty/blank.

Set to 'instore' for offline data.

Value: Text.

Example: instore

2.1 - id data

Criteo uses hashed email as the identifier parameter. 

Emails will be ingested into Criteo’s identity graph as SHA256 of an MD5. If you are unable to provide emails in this format you can provide either raw or MD5 encrypted emails, which will be hashed on the fly by Criteo before being ingested. 

To find out more about server side hashing click here.

2.1.1 id.email.raw

ONE id field is required for all products in the transaction JSON, whichever field is chosen cannot be empty/blank.

Raw email of the shopper, to be double-hashed by Criteo into SHA256 of an MD5.

Value: Text

Example: john.doe@gmail.com

 2.1.2 id.email.md5

ONE id field is required for all products in the transaction JSON, whichever field is chosen cannot be empty/blank.

MD5 email of the shopper, to be hashed by Criteo into SHA256 of an MD5.

Value: Text

Example: e13743a7f1db7f4246badd6fd6ff54ff

2.1.3 id.email.sha256_md5

ONE id field is required for all products in the transaction JSON, whichever field is chosen cannot be empty/blank.

SHA256 of an MD5 email of the shopper.

Value: Text

Example: 000e3171a5110c35c69d060112bd0ba55d9631c7c2ec93f1840e4570095b263a

3.1 - events[ ] data

Please find below the event parameters that must be pushed to Criteo as an array.  Each event is a JSON object with a predefined parameter.

3.1.1 events[ ].event

This field is required for all products in the transaction JSON, and cannot be empty/blank.

The type of offline event that is being passed.

Value: Text

Example: trackTransaction

3.1.2 events[ ].item[ ]

This field is required for all products in the transaction JSON, and cannot be empty/blank.

Array of products that were purchased in the trackTransaction event.

Value: Array

Example: item:[{id:1,price:1,quantity:1},{id:2,price:2,quantity:2}]

3.1.3 events[ ].item[ ].id

This field is required for all products in the transaction JSON, and cannot be empty/blank.

The unique identifier for each product purchased. This must match with your online product feed.

Value: Text

Example: prod_1234

3.1.4 events[ ].item[ ].price

This field is required for all products in the transaction JSON, and cannot be empty/blank.

The unit price of each product purchased.

Value: Float

Example: 23.2

3.1.5 events[ ].item[ ].quantity

This field is required for all products in the transaction JSON, and cannot be empty/blank.

The number of products purchased in the transaction.

Value: Integer

Example: 2

3.1.6 events[ ].id

This field is required for all products in the transaction JSON, and cannot be empty/blank.

The transaction ID. This will be used for deduplication and debugging.

Value: Text

Example: Transaction_ID_13265

3.1.7 events[ ].timestamp

This field is required for all products in the transaction JSON, and cannot be empty/blank.

Ideally data should be passed to the API in real-time.

Where this isn’t possible please provide a UTC timestamp, using ISO 8601 standards with explicit timezone designator 'Z'.

Without a timestamp, the time of transaction will be recorded as the time of ingestion.

The timestamp must follow the ISO 8601 standards with explicit timezone designator 'Z' when in UTC time zone.

Value: Timestamp. 

UTC format: [YYYY]-[MM]-[DD]T[hh]:[mm]:[ss]Z

None UTC format: [YYYY]-[MM]-[DD]T[hh]:[mm]:[ss]±[hh:mm]

Example (in UTC+1): 2017-06-02T13:25:15+01:00

3.1.8 events[ ].store_id

This field is required for all products in the transaction JSON, and cannot be empty/blank.

The ID of the store in which the sale occurred.

We also highly recommend that you provide us with a Store Directory feed to enable us to effectively drive shoppers to your stores and improve campaign targeting.

Value: Text

Example: 1354

3.1.9 events[ ].user_segment

This field is required for all products in the transaction JSON, and cannot be empty/blank.

Hardcoded to 19 for in-store data.

Value: Integer

Example: 19

3.1.10 events[ ].currency

The currency of the transaction. This must follow the 3 letter ISO 4217 code.

If this field is left blank, the transaction amount will be considered in the currency defined at the account level within Criteo.

Value: Text

Example: EUR

3.1.11 events[ ].dd

Deduplication parameter should be set to 1 if the sale is attributed to Criteo.  This is particularly useful if you want to give the Criteo Engine a view of attributed sales.

Value: Integer

Example:

Was this article helpful?
0 out of 0 found this helpful
Powered by Zendesk