> For the complete documentation index, see [llms.txt](https://help.citrusad.com/retail-media-interface/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.citrusad.com/retail-media-interface/integration/es/feature-integrations/pagination.md).

# Paginación

<figure><img src="/files/TCtaGm1HsKvoj1aiNFz0" alt="" width="100%"><figcaption></figcaption></figure>

Mejora la experiencia de tus clientes al navegar por varias páginas. Al generar anuncios de productos, recibirás un `memoryToken` que se puede enviar en solicitudes posteriores para excluir los anuncios mostrados anteriormente.

{% hint style="warning" %}
¡Solo anuncios de productos!

Esta función solo es compatible actualmente con Epsilon Retail Mediade anuncios de productos.
{% endhint %}

## ¿Cómo implementar la paginación en tu sitio?

Al generar anuncios de productos, en la respuesta recibirás un `memoryToken`.

```http
{
    "ads": [
        {
            "id": "display_3rGiryPskhQusmsf43nghbQwnqo3NzMzNjU3",
            "gtin": "7733657",
            "discount": {
                "amount": 0,
                "minPrice": 0,
                "maxPerCustomer": 0
            },
            "expiry": "2021-05-12T04:17:50.400917769Z",
            "position": 1
        }
    ],
    "banners": [],
    "products": [],
    "memoryToken":"85ykKVv-luDHMWLZx2d6xcPq6sF7CgkJCSJDb3VudGVyIjogIjIiLAoJCQkiQWRzIjogWwoJCQkJImRpc3BsYXlfV05VV0NwQkRKMUpKNm5wdVZSVExvOU40TUxzNE1UWTBOemt5TWc9PSIsCgkJCQkiZGlzcGxheV9MME5NUHRxNmdCcVFvREJOd3J0dE9UTGJoWk0xTVRFeU9UYzRPUT09IiwKCQkJCSJkaXNwbGF5XzlCcEpmdUpaWk9VXzgyaWpFM3VCczgxd3VVczRNekkwTnpVeE5nPT0iLAoJCQkJImRpc3BsYXlfcW1VU1p4TkpMQ0lqeWQwdTFJRDk0RmxVZ0pnNE16STBOelV4Tnc9PSIsCgkJCQkiZGlzcGxheV9oeHlFZktCUnRrNWlxMThMQzE1SDJHcEN3QjgxTVRFeU9UYzVNQT09IiwKCQkJCSJkaXNwbGF5X1NkcjFEcU5aUEFtcGh0Q1FIUndoYUxFT1B0RXhNamsxT1RJNE5BPT0iLAoJCQkJImRpc3BsYXlfeVlSai1qV2Ntc2ozNzhrel9PMm0yOVlwTjhJeE5EazNPRE00TXc9PSIsCgkJCQkiZGlzcGxheV9Xbm9NZGZuLTRTVmhxcF9xQzVvLWxoT0paNm8xTkRJeE1UUTROdz09IgoJCQldLAoJCQkiVFRMIjogMTYyODk4NTYwMAoJCX0="
}
```

Cuando un cliente navega a la siguiente página, debes enviar este token en tu próxima solicitud de anuncios.

```http
POST $BASE_URL/v1/ads/generate HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>
{
    "customerId": "wertg5432a",
    "sessionId": "ec9-4e07-881d-3e9",
    "placement": "search",
    "catalogId": "628dbe95-2ec9-4e07-881d-3e9f92ab2e0b",
    "searchTerm": "chocolate",
    "memoryToken":"85ykKVv-luDHMWLZx2d6xcPq6sF7CgkJCSJDb3VudGVyIjogIjIiLAoJCQkiQWRzIjogWwoJCQkJImRpc3BsYXlfV05VV0NwQkRKMUpKNm5wdVZSVExvOU40TUxzNE1UWTBOemt5TWc9PSIsCgkJCQkiZGlzcGxheV9MME5NUHRxNmdCcVFvREJOd3J0dE9UTGJoWk0xTVRFeU9UYzRPUT09IiwKCQkJCSJkaXNwbGF5XzlCcEpmdUpaWk9VXzgyaWpFM3VCczgxd3VVczRNekkwTnpVeE5nPT0iLAoJCQkJImRpc3BsYXlfcW1VU1p4TkpMQ0lqeWQwdTFJRDk0RmxVZ0pnNE16STBOelV4Tnc9PSIsCgkJCQkiZGlzcGxheV9oeHlFZktCUnRrNWlxMThMQzE1SDJHcEN3QjgxTVRFeU9UYzVNQT09IiwKCQkJCSJkaXNwbGF5X1NkcjFEcU5aUEFtcGh0Q1FIUndoYUxFT1B0RXhNamsxT1RJNE5BPT0iLAoJCQkJImRpc3BsYXlfeVlSai1qV2Ntc2ozNzhrel9PMm0yOVlwTjhJeE5EazNPRE00TXc9PSIsCgkJCQkiZGlzcGxheV9Xbm9NZGZuLTRTVmhxcF9xQzVvLWxoT0paNm8xTkRJeE1UUTROdz09IgoJCQldLAoJCQkiVFRMIjogMTYyODk4NTYwMAoJCX0=",
    "options": {
                         "filterMode": "AndOr"
                             },
    "maxNumberOfAds": 3
}

```

Al usar este token, Epsilon Retail Media excluirá cualquier anuncio mostrado anteriormente al cliente si el **sessionId** es idéntico al de la solicitud del token.

{% hint style="warning" %}
¡Integración estándar!

Esta función solo es compatible actualmente con Epsilon Retail Mediade anuncios de productos.
{% endhint %}

## ¿Cómo funciona?

Cuando Epsilon Retail Media recibe un `memoryToken` en la solicitud de anuncios, cualquier anuncio mostrado anteriormente para el **sessionId** se excluirá de la respuesta del anuncio. Esto garantiza una mayor variedad de anuncios mostrados a tu cliente en un recorrido de varias páginas.

Cuando este token no existe en la solicitud, la generación de anuncios se realizará según el proceso actual sin aplicar exclusiones. Siempre se proporcionará un token después de la generación de anuncios para que el minorista elija utilizarlo.

El memory token contiene información codificada que permite a Epsilon Retail Media determinar los anuncios que se han mostrado anteriormente (ya sea en una sola solicitud o a lo largo de un período de varias solicitudes encadenadas).

En caso de que se envíe un token irrelevante a Epsilon Retail Media (como un contexto diferente), los anuncios se devuelven como si no se hubiera proporcionado ningún token en la solicitud de anuncios.

{% hint style="warning" %}
️ ¿Solicitas más anuncios de los que se muestran en tu sitio web?

Si eres un minorista que solicita más anuncios a Epsilon Retail Media de los que se muestran a tu cliente, es posible que no recibas muchos anuncios en las páginas posteriores. Si solicitas 15 anuncios y solo muestras 4 a tu cliente, al recibir el `memoryToken`, Epsilon Retail Media excluirá los 15-20 anuncios mostrados anteriormente en la respuesta de anuncios posterior.
{% endhint %}

### Flujo de solicitud de ejemplo

<figure><img src="/files/Malr66yjb1OalqqqSNhs" alt="" width="100%"><figcaption></figcaption></figure>

## Preguntas frecuentes

**¿Puedo usar este token en múltiples búsquedas de clientes para excluir productos en el recorrido más amplio del cliente?**

No, si Epsilon Retail Media recibe una solicitud de anuncio que no coincide con la solicitud de anuncio del token, se ignora y los anuncios se generan como si no se hubiera proporcionado ningún token.

**¿Qué pasa si envío un memoryToken y está mal formado?**

Epsilon Retail Media ignorará el token y procesará la solicitud como si fuera una solicitud normal.

**¿Para cuántas páginas puedo paginar?**

Por defecto, son 5; este es el mejor equilibrio entre rendimiento y saturación que Epsilon Retail Media ha visto en varios clientes.

A partir de la versión 39.0 de Epsilon Retail Media, esto se puede configurar a través de tu Technical Account Manager.

**¿Qué sucede cuando te quedas sin anuncios para mostrar, como en las páginas 5-10 con la configuración predeterminada?**

El memoryToken está configurado en el lado de Epsilon Retail Mediapara almacenar anuncios del número de páginas de la configuración. Por ejemplo, si la configuración es la predeterminada de 5 páginas, Epsilon Retail Media comenzará a volver a mostrar anuncios a partir de la página 7.

Solicitud de paginación 6 (página 6): el memoryToken contiene información sobre los anuncios de las 5 páginas anteriores, por lo que no se mostrará ningún anuncio de las 5 páginas anteriores.

Solicitud de paginación 7 (página 7): los anuncios de la página 1 son elegibles para ser mostrados.

**¿Qué sucede si me quedo sin anuncios antes de la página 5 con la configuración predeterminada?**

Si, por ejemplo, en la página 3 te quedas sin anuncios, comenzaremos a mostrar anuncios en la página 7, ya que almacenamos el número total de páginas en la configuración como los anuncios mostrados anteriormente que no se deberían volver a mostrar.


---

# 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://help.citrusad.com/retail-media-interface/integration/es/feature-integrations/pagination.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.
