---
title: Data and privacy
description: The customer data that Optifeed gets, which channel gets which hash, which customers go to the audiences, and how long Optifeed keeps each record.
---

## Contact data

Optifeed never gets a plain email or phone number from this API. Your system sends SHA-256 hashes of them. [Customers](/docs/api/customers#contact-hashes) gives the rule of each hash.

- A hash field with a value that is not 64 hexadecimal characters gets the warning `invalid_hash`. Optifeed drops the value and never stores it.
- The message of an error or a warning never contains the value that you sent.
- Optifeed stores only the fields of an order and of a customer. A key that is not a field, for example `email`, is not stored.

Products are catalog data. Each field and attribute of a product goes into your catalog, and your exports can send it to a channel. So do not put personal data into a product.

## Which channel gets which hash

Optifeed sends the hashes of your customers only to the audiences of your RFM segments.

| Channel | Email hash | Phone hash |
| --- | --- | --- |
| Meta | `email_normalized_sha256`, or `email_sha256` when the customer has no `email_normalized_sha256` | `phone_sha256` |
| Google | `email_normalized_sha256`, or `email_sha256` when the customer has no `email_normalized_sha256` | `phone_sha256` |
| OpenAI | `email_sha256` | `phone_e164_sha256` |
| TikTok | `email_sha256` | `phone_e164_sha256` |

## Marketing consent and the audiences

A customer goes to the audience of an RFM segment on a channel when all of these are true:

- The customer has an RFM score. So the customer has an order in the RFM window that is not cancelled and is not a test order.
- The customer is in the segment.
- The customer has an email hash or a phone hash for that channel.
- The `marketing_consent` of the customer is not `false`.
- No customer with `marketing_consent` set to `false` has one of the same hashes.

A customer with no `marketing_consent` value can go to the audiences. A customer with `false` stays in RFM, but goes to no audience. [Customers](/docs/api/customers#marketing-consent) gives the rules of the consent value.

From the next audience sync, Optifeed sends no customer whose `marketing_consent` is `false`.

## What Optifeed stores and for how long

| Data | What Optifeed keeps | How long |
| --- | --- | --- |
| Request records | One record for each request of an API user: the time, the API user, the `request_id`, the endpoint, the status, the error codes, the counts and the dry run mark. It has no body and no personal data. | 30 days. A daily job deletes the older records. |
| Stored copies of orders | The fields of each accepted order that passed the checks. | 30 days or more. A job on the first day of each month deletes the copies that are older than 30 days. |
| Orders | The orders and their line items, for the RFM calculation. | The RFM window of your company, 12 months by default. A monthly job deletes each order with an older `created_at`. |
| Products | The fields and the attributes of each product. | Until a `DELETE /v1/products/{sku}`. |
| Rejected products | The SKU, the field, the code, the message and the time of the last rejection of each SKU. | 30 days. A daily job deletes the older rows. |
| Daily request summaries | For each API user, endpoint and day: the counts of requests, records, statuses and error codes. No personal data. | 1 year. |

## Logs and error reports

- The request log of Optifeed hides the `customer` object of each order and the `customers` list.
- The error reports of Optifeed get no `orders` list and no `customers` list.
