[Heredado]{class="badge informative"}
Solicitudes de datos de contexto y decisiones de Edge edge
Esta sección le guía a través del paso de datos de contexto en solicitudes de Edge Decisioning y su uso en reglas de elegibilidad. Exploraremos un caso de uso completo que muestra cómo ofrecer ofertas personalizadas en función del tipo de dispositivo que utilizan los clientes.
Este caso de uso implica varios pasos clave:
- Configurar requisitos previos: Asegúrese de que se hayan completado todos los pasos necesarios para pasar los datos de contexto en sus solicitudes.
- Usar datos de contexto en reglas de idoneidad: cree reglas que determinen qué ofertas mostrar en función del tipo de dispositivo del usuario.
- Diseñar ofertas específicas del dispositivo: cree ofertas adaptadas para cada tipo de dispositivo y vincúlelas a las reglas correspondientes.
- Crear una colección de ofertas: Agrupe todas las ofertas en una colección estática.
- Configurar una decisión: crea una nueva decisión que aproveche el motor de decisión de ofertas para elegir la mejor oferta que se ofrezca a los usuarios según su tipo de dispositivo.
- Pasar datos de contexto en la solicitud de Edge Decisioning: pase datos de contexto a través de su solicitud de API para recuperar y presentar las ofertas adecuadas a los usuarios.
Para ir más lejos, también puede aprovechar los datos de contexto en fórmulas de clasificación o personalizar las representaciones de sus ofertas de forma dinámica. Por ejemplo, se puede crear una sola oferta y utilizar campos de personalización para adaptar su representación en función de los datos de contexto. Por ejemplo, mostrar una imagen determinada si el usuario tiene un iPhone y otra para los usuarios de iPad. Para obtener más información, consulte estas secciones:
Requisitos previos para pasar datos de contexto en solicitudes de Edge Decisioning prerequisites
A diferencia de pasar contexto en un formato libre mediante la API de decisiones, el contexto de Edge Decisioning requiere compatibilidad con XDM. La carga útil de contexto debe ser compatible con Experience Event XDM. Para ello, el contexto debe definirse como parte del “Evento de experiencia XDM” que se utiliza para la recopilación de datos.
-
Defina un esquema de evento de experiencia. Para el propósito de este caso de uso, se crea un esquema “Contexto de oferta” y los campos del contexto de oferta forman parte de un grupo de campos “Contexto de oferta”. En realidad, el grupo de campos se agregaría al esquema de evento de experiencia utilizado para la recopilación de datos asociados con el flujo de datos “Edge Collection Network”.
note NOTE El esquema del evento de experiencia del contexto de oferta debe formar parte del perfil, con un campo CUSTOMER_ID utilizado como identidad principal. En este ejemplo, el grupo de campos “Contexto de oferta” tiene dos propiedades: language y deviceType. Estas propiedades se utilizarán en la clasificación de ofertas y en las reglas de elegibilidad.
{align="center" width="60%" modal="regular"}
Aprenda a trabajar con esquemas en Adobe Experience Platform Guía del modelo de datos de experiencia (XDM)
-
Cree un conjunto de datos (aquí “Contexto de la oferta”) y asegúrese de que esté habilitado para el perfil.
-
Cree una nueva secuencia de datos a partir del menú Recopilación de datos > Secuencias de datos. Aprenda a crear y configurar una secuencia de datos en Adobe Experience Platform Guía de secuencias de datos
Aquí, hemos creado un flujo de datos de “Contexto de oferta”, con el esquema de evento “Contenido de oferta” seleccionado.
-
Edite el conjunto de datos recién creado y seleccione “Adobe Experience Platform” como servicio y “Contexto de oferta” como conjunto de datos de evento.
-
Guarde la secuencia de datos y copie su ID. Este ID se utilizará en el punto final de su solicitud de API. Aprenda a crear la llamada de API
Uso de datos de contexto en reglas de idoneidad rules
Cree reglas de aceptación que determinen qué ofertas mostrar en función del tipo de dispositivo del usuario:
-
regla de dispositivo iphone:
-
Nombre de regla: “Edge Context Rule - iphone”
-
Configuración: deviceType = ‘iphone’
-
Sintaxis de PQL:
code language-none select _Any1 from xEvent where _Any1._experienceplatform.offerContextData.deviceType.equals("iphone", false)
-
-
regla de dispositivo ipad:
-
Nombre de regla: “Edge Context Rule - ipad”
-
Configuración: deviceType = ‘ipad’
-
Sintaxis de PQL
code language-none select _Any1 from xEvent where _Any1._experienceplatform.offerContextData.deviceType.equals("ipad", false)
-
Crear ofertas offers
Cree una oferta para cada tipo de dispositivo y vincúlela a la regla de elegibilidad correspondiente creada anteriormente:
-
Oferta para usuarios de iPhone:
- Nombre de la oferta: “Edge Context - Contenido de la oferta de iPhone”
- Regla asociada: “Regla de contexto de Edge: iphone”
-
Oferta para usuarios de iPad:
- Nombre de la oferta: “Edge Context - Contenido de la oferta de iPad”
- Regla asociada: “Regla de contexto de Edge - ipad”
Además, cree una oferta de reserva (aquí “Contenido de reserva de contexto”) para que se muestre si no se cumplen criterios específicos de dispositivo.
Agregar ofertas en una colección collection
Añada las ofertas creadas anteriormente a una colección estática llamada aquí “Edge Device Context”. Esta colección es donde la decisión de oferta elegirá las ofertas elegibles para presentarlas a los clientes.
Crear decisión de oferta decision
Cree una nueva decisión que aproveche el motor de decisión de ofertas para elegir la mejor oferta que se presentará a los usuarios según su tipo de dispositivo con la oferta de “reserva de contexto” seleccionada como oferta de reserva.
Paso de datos de contexto en la solicitud de Edge Decisioning request
Punto de conexión
En el extremo, use el identificador de secuencia de datos creada anteriormente.
https://edge.adobedc.net/ee/irl1/v1/interact?configId=f3c47f2a-c484-4908-87a5-a82b55039e22
Carga útil
Este es un ejemplo de una solicitud que pasa datos de contexto.
-
Se pasa información sobre el tipo de dispositivo en el nodo
xdm:ContextData. -
En el nodo
decisionScopes, copie y pegue el ámbito de decisión de la decisión de oferta configurada anteriormente.accordion Dónde recuperar el ámbito de decisión
{
"events": [{
"xdm": {
"identityMap": {
"customerId": [{
"id": "0000158216",
"authenticatedState": "authenticated",
"primary": true
}]
},
"_experienceplatform": {
"identity": {
"core": {
"customerId": "0000158216"
}
},
"offerContextData" : {
"language" : "NL",
"deviceType" : "iphone"
}
}
}
}],
"query": {
"personalization": {
"decisionScopes": ["eyJ4ZG06YWN0aXZpdHlJZCI6Inhjb3JlOm9mZmVyLWFjdGl2aXR5OjE3M2I1MGM5Mjg0ZGQ4NzkiLCJ4ZG06cGxhY2VtZW50SWQiOiJ4Y29yZTpvZmZlci1wbGFjZW1lbnQ6MTZhMzQxZWQ4ZDYyMzc2MSJ9"]
}
}
}
Respuesta
Este es un ejemplo de respuesta:
{
"requestId": "14a2d3f5-a6fa-494e-b42c-cc65a845284a",
"handle": [
{
"payload": [
{
"id": "1eafc831-4819-4800-8e25-c9e9f0838e09",
"scope": "eyJ4ZG06YWN0aXZpdHlJZCI6Inhjb3JlOm9mZmVyLWFjdGl2aXR5OjE3M2I1MGM5Mjg0ZGQ4NzkiLCJ4ZG06cGxhY2VtZW50SWQiOiJ4Y29yZTpvZmZlci1wbGFjZW1lbnQ6MTZhMzQxZWQ4ZDYyMzc2MSJ9",
"activity": {
"id": "xcore:offer-activity:173b50c9284dd879",
"etag": "1",
"name": "Edge Device Context"
},
"placement": {
"id": "xcore:offer-placement:16a341ed8d623761",
"etag": "1",
"name": "HIB",
"channel": "https://ns.adobe.com/xdm/channel-types/mobile",
"componentType": "https://ns.adobe.com/experience/offer-management/content-component-json"
},
"items": [
{
"id": "xcore:personalized-offer:173b4e05676d87f5",
"etag": "3",
"name": "Edge Context - iPhone Offer",
"priority": 0,
"schema": "https://ns.adobe.com/experience/offer-management/content-component-json",
"data": {
"id": "xcore:personalized-offer:173b4e05676d87f5",
"format": "application/json",
"language": [
"en-gb"
],
"content": "{\n \"name\" : \"iphone offer\"\n}"
}
}
]
}
],
"type": "personalization:decisions",
"eventIndex": 0
},
{
"payload": [],
"type": "activation:pull",
"eventIndex": 0
},
{
"payload": [],
"type": "personalization:decisions",
"eventIndex": 0
},
{
"payload": [
{
"scope": "Target",
"hint": "37",
"ttlSeconds": 1800
},
{
"scope": "AAM",
"hint": "6",
"ttlSeconds": 1800
},
{
"scope": "EdgeNetwork",
"hint": "irl1",
"ttlSeconds": 1800
}
],
"type": "locationHint:result"
},
{
"payload": [
{
"key": "kndctr_907075E95BF479EC0A495C73_AdobeOrg_identity",
"value": "CiY0MDAwMDgyMjMzNTEzNzU1OTcwMjQ0NDcyNjU1MTAyMDEwNDQ3MVIRCNnE4Y6QMRABGAEqBElSTDHwAdnE4Y6QMQ==",
"maxAge": 34128000
},
{
"key": "kndctr_907075E95BF479EC0A495C73_AdobeOrg_cluster",
"value": "irl1",
"maxAge": 1800
}
],
"type": "state:store"
}
]
}
This section contains structured knowledge intended to support interpretation, retrieval, and question answering related to this topic.
For complete understanding, this information should be combined with the documentation on this page. Neither source is intended to stand alone; the page describes the feature, while this section provides additional context that helps disambiguate terminology, intent, applicability, and constraints.
- TL;DR: For the legacy Decision Management capability, this page shows how to pass context data in Edge Decisioning requests and use it in eligibility rules, through a use case that delivers offers based on the device type of customers.
Intents:
- Set up an experience event schema, a dataset and a datastream to pass context data in Edge Decisioning requests.
- Create eligibility rules that use the context data deviceType to determine which offers to show.
- Create an offer for each device type, link each offer to its eligibility rule and create a fallback offer.
- Add the offers to a static collection and create a decision that picks the best offer based on the device type.
- Build the Edge Decisioning request with the datastream ID in the endpoint, the context data in the payload and the decision scope of the offer decision.
Glossary:
- Edge Decisioning context (product-specific): The context data passed in Edge Decisioning requests.
- Fallback offer (product-specific): In this use case, the offer (“Context Fallback Content”) to display if no specific device criteria are met.
- Static collection (product-specific): In this use case, the collection (“Edge Device Context”) that groups the device-specific offers and where the offer decision picks eligible offers to present to customers.
- Offer decision (product-specific): In this use case, a decision that leverages the Offer Decision Engine to pick the best offer to present to users based on their device type.
Guardrails:
- The Edge Decisioning context payload needs to be XDM Experience Event compliant: the context needs to be defined as part of the XDM Experience Event that is used for data collection.
Prerequisites and permissions:
- An experience event schema that contains the context fields. The offer context experience event schema needs to be part of profile, with a CUSTOMER_ID field used as the primary identity.
- A dataset for the context data. Make sure it is enabled for profile.
- A datastream created from the Data Collection > Datastreams menu, with “Adobe Experience Platform” selected as the service and the context dataset as the event dataset. Its ID is used in the API request endpoint.
Terminology:
- Canonical name: Experience Data Model — Acronym: XDM
- Do not confuse: “Decision Management” (the legacy capability covered by this page) ≠ “Decisioning” (the new capability)
- Do not confuse: Edge Decisioning context ≠ context passed in a free format using the Decisioning API
FAQ:
- What format does context data need in Edge Decisioning requests? The context payload needs to be XDM Experience Event compliant, unlike the free format used with the Decisioning API.
- Which identity does the offer context experience event schema need? The schema needs to be part of profile, with a CUSTOMER_ID field used as the primary identity.
- Where is the datastream ID used? In the endpoint of the Edge Decisioning request, as the
configIdvalue. - What goes in the
decisionScopesnode of the request? The decision scope of the offer decision configured previously, copied and pasted from the offer decision. - What happens if no specific device criteria are met in this use case? The fallback offer (“Context Fallback Content”) is displayed.
Examples:
- Experience event schema: an “Offer Context” field group with two properties, language and deviceType, used in offer ranking and eligibility rules.
- Eligibility rule “Edge Context Rule - iphone” (deviceType = ‘iphone’), PQL syntax:
select _Any1 from xEvent where _Any1._experienceplatform.offerContextData.deviceType.equals("iphone", false). The “Edge Context Rule - ipad” rule uses the same syntax with “ipad”. - Offers: “Edge Context - iPhone Offer Content” linked to “Edge Context Rule - iphone”, and “Edge Context - iPad Offer Content” linked to “Edge Context Rule - ipad”.
- Endpoint:
https://edge.adobedc.net/ee/irl1/v1/interact?configId=f3c47f2a-c484-4908-87a5-a82b55039e22 - Payload: the sample request passes
"offerContextData" : { "language" : "NL", "deviceType" : "iphone" }under_experienceplatformin the eventxdmobject, and the decision scope inquery.personalization.decisionScopes. - Context data can also be leveraged in ranking formulas, or to personalize offer representations dynamically: for example, a single offer that displays a given image if the user has an iPhone, and another one for iPad users.
Related pages:
- If you are using the new Decisioning capability: Leverage context data in Decisioning
- To find out which capability you are using: Learn about Decisioning
- To leverage context data in ranking formulas: Ranking formulas - Boost offers based on context data
- To personalize offer representations based on context data: Personalize representations based on context data
Personas:
- developer: Can pass context data in Edge Decisioning requests, using the ID of the datastream created previously as the configId value in the endpoint. Can pass the language and deviceType context fields in the offerContextData node under _experienceplatform in the event xdm object. Can copy-paste the decision scope of the offer decision into the decisionScopes node of the payload. The page states that the context payload needs to be XDM Experience Event compliant. Where: “Pass context data in the edge decisioning request”.
Onboarding:
- Level: Experienced
- First minimal step: Define an experience event schema that contains the offer context fields.