Campo de inicio1/8
Start dateFecha de inicioFecha de inicio
Campo de fin1/8
Due dateduedate (sistema)
Estado actual
Tareas activas por estado del workflow
Por hacer
6- Por hacer6(1📅)
📅 = con fechas (visibles en Gantt)
En progreso
2- En curso2(0📅)
📅 = con fechas (visibles en Gantt)
Debug — campos raw del primer issue
Buscá los campos que tengan valor de fecha y avisame el ID.
{
"statuscategorychangedate": "2026-07-16T06:11:34.706-0600",
"issuetype": {
"self": "https://albatrosservices.atlassian.net/rest/api/3/issuetype/11562",
"id": "11562",
"description": "",
"iconUrl": "https://albatrosservices.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10318?size=medium",
"name": "Tarea",
"subtask": false,
"avatarId": 10318,
"entityId": "101e0eb4-8de9-42e6-90be-e6b28eb253c9",
"hierarchyLevel": 0
},
"parent": {
"id": "59359",
"key": "RISE-3",
"self": "https://albatrosservices.atlassian.net/rest/api/3/issue/59359",
"fields": {
"summary": "Configuracion y Desarrollo SPRINT 02",
"status": {
"self": "https://albatrosservices.atlassian.net/rest/api/3/status/12020",
"description": "",
"iconUrl": "https://albatrosservices.atlassian.net/images/icons/statuses/generic.png",
"name": "Por hacer",
"id": "12020",
"statusCategory": {
"self": "https://albatrosservices.atlassian.net/rest/api/3/statuscategory/2",
"id": 2,
"key": "new",
"colorName": "blue-gray",
"name": "To Do"
}
},
"priority": {
"self": "https://albatrosservices.atlassian.net/rest/api/3/priority/3",
"iconUrl": "https://albatrosservices.atlassian.net/images/icons/priorities/medium_new.svg",
"name": "Medium",
"id": "3"
},
"issuetype": {
"self": "https://albatrosservices.atlassian.net/rest/api/3/issuetype/11560",
"id": "11560",
"description": "A collection of related bugs, stories, and tasks.",
"iconUrl": "https://albatrosservices.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10307?size=medium",
"name": "Epic",
"subtask": false,
"avatarId": 10307,
"entityId": "38eaa321-8f90-4578-bdd8-437959df9e57",
"hierarchyLevel": 1
}
}
},
"timespent": null,
"project": {
"self": "https://albatrosservices.atlassian.net/rest/api/3/project/11679",
"id": "11679",
"key": "RISE",
"name": "RISE",
"projectTypeKey": "software",
"simplified": true,
"avatarUrls": {
"48x48": "https://albatrosservices.atlassian.net/rest/api/3/universal_avatar/view/type/project/avatar/10413",
"24x24": "https://albatrosservices.atlassian.net/rest/api/3/universal_avatar/view/type/project/avatar/10413?size=small",
"16x16": "https://albatrosservices.atlassian.net/rest/api/3/universal_avatar/view/type/project/avatar/10413?size=xsmall",
"32x32": "https://albatrosservices.atlassian.net/rest/api/3/universal_avatar/view/type/project/avatar/10413?size=medium"
}
},
"fixVersions": [],
"aggregatetimespent": null,
"statusCategory": {
"self": "https://albatrosservices.atlassian.net/rest/api/3/statuscategory/4",
"id": 4,
"key": "indeterminate",
"colorName": "yellow",
"name": "In Progress"
},
"resolution": null,
"resolutiondate": null,
"workratio": -1,
"issuerestriction": {
"issuerestrictions": {},
"shouldDisplay": true
},
"watches": {
"self": "https://albatrosservices.atlassian.net/rest/api/3/issue/RISE-29/watchers",
"watchCount": 1,
"isWatching": false
},
"lastViewed": null,
"created": "2026-07-14T09:59:44.078-0600",
"priority": {
"self": "https://albatrosservices.atlassian.net/rest/api/3/priority/3",
"iconUrl": "https://albatrosservices.atlassian.net/images/icons/priorities/medium_new.svg",
"name": "Medium",
"id": "3"
},
"labels": [],
"customfield_11226": null,
"customfield_11227": null,
"customfield_10018": null,
"timeestimate": null,
"aggregatetimeoriginalestimate": null,
"versions": [],
"issuelinks": [],
"assignee": {
"self": "https://albatrosservices.atlassian.net/rest/api/3/user?accountId=712020%3A65a796f0-a362-4aea-8067-452fe9e9103d",
"accountId": "712020:65a796f0-a362-4aea-8067-452fe9e9103d",
"avatarUrls": {
"48x48": "https://secure.gravatar.com/avatar/5fb879c8221b2bc5f726c87df7450503?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FDA-6.png",
"24x24": "https://secure.gravatar.com/avatar/5fb879c8221b2bc5f726c87df7450503?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FDA-6.png",
"16x16": "https://secure.gravatar.com/avatar/5fb879c8221b2bc5f726c87df7450503?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FDA-6.png",
"32x32": "https://secure.gravatar.com/avatar/5fb879c8221b2bc5f726c87df7450503?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FDA-6.png"
},
"displayName": "Derlis Aguilar",
"active": true,
"timeZone": "America/Guatemala",
"accountType": "atlassian"
},
"updated": "2026-07-21T07:43:04.955-0600",
"status": {
"self": "https://albatrosservices.atlassian.net/rest/api/3/status/12021",
"description": "",
"iconUrl": "https://albatrosservices.atlassian.net/images/icons/statuses/generic.png",
"name": "En curso",
"id": "12021",
"statusCategory": {
"self": "https://albatrosservices.atlassian.net/rest/api/3/statuscategory/4",
"id": 4,
"key": "indeterminate",
"colorName": "yellow",
"name": "In Progress"
}
},
"components": [],
"timeoriginalestimate": null,
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "heading",
"attrs": {
"level": 1,
"localId": "ebaaa7b1513e"
},
"content": [
{
"type": "text",
"text": "Integración del motor de promociones — App Móvil"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Alcance de esta fase:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " producto de regalo ("
},
{
"type": "text",
"text": "GIFT_PRODUCT",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ") y descuento total de la orden ("
},
{
"type": "text",
"text": "DISCOUNT_ORDER",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ")."
}
],
"attrs": {
"localId": "0ad47ff86e1e"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "818ce69256aa"
},
"content": [
{
"type": "text",
"text": "Resumen"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El servidor resuelve "
},
{
"type": "text",
"text": "toda",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " la lógica de promociones: decide qué recompensa corresponde, inyecta el regalo en el carrito, calcula el descuento, valida y registra el canje."
}
],
"attrs": {
"localId": "b5b97bb82a60"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "La app "
},
{
"type": "text",
"text": "no calcula, no decide y no valida",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " promociones. Solo tiene que:"
}
],
"attrs": {
"localId": "937279c720e2"
}
},
{
"type": "orderedList",
"attrs": {
"order": 1,
"localId": "ba1d80eef953"
},
"content": [
{
"type": "listItem",
"attrs": {
"localId": "ebca5d8b5727"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Mostrar el banner de recompensas (campos nuevos en un endpoint que ya consume)."
}
],
"attrs": {
"localId": "9b240d587732"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "845ed8418c94"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Renderizar la línea de regalo que ya viene en el carrito."
}
],
"attrs": {
"localId": "79b3f68e01da"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "83ee6b09155f"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Pedir y mostrar el descuento (un endpoint nuevo)."
}
],
"attrs": {
"localId": "d1220715bca3"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "16d3804d9c8e"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Reenviar correctamente el regalo y el descuento al confirmar la orden",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " ← lo único que requiere desarrollo real."
}
],
"attrs": {
"localId": "9aa250c202b4"
}
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Salvo el endpoint del descuento (punto 3), todos los cambios son "
},
{
"type": "text",
"text": "campos nuevos en endpoints existentes",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "6b3ab35a7d33"
}
},
{
"type": "blockquote",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Regla general:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " si un campo llega vacío o nulo, la app se comporta "
},
{
"type": "text",
"text": "exactamente como hoy",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " (sin banner, sin regalo, sin descuento). Nunca asumir que están presentes."
}
],
"attrs": {
"localId": "f57bcceaaf5f"
}
}
],
"attrs": {
"localId": "c5696fc91c10"
}
},
{
"type": "rule",
"attrs": {
"localId": "706ee0b7ff85"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "638b9a0140a6"
},
"content": [
{
"type": "text",
"text": "1. Banner de recompensas"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Endpoint (ya lo consumen para los puntos):",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "GET api/em/fidelization/get_points",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "89a5214822dd"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El response ahora incluye "
},
{
"type": "text",
"text": "dos",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " campos nuevos:"
}
],
"attrs": {
"localId": "a3926c7cb04a"
}
},
{
"type": "codeBlock",
"attrs": {
"localId": "8e6dc434-523d-4a1d-ab0d-4282c5c2484a",
"wrap": true
},
"content": [
{
"type": "text",
"text": "{\n \"response\": \"success\",\n \"data\": 23076,\n \"dataExchange\": { \"amount\": \"...\", \"value\": 0 },\n\n \"availablePromotions\": [\n {\n \"id\": 1,\n \"name\": \"Regalo de bienvenida\",\n \"rewards\": [\n {\n \"rewardType\": \"GIFT_PRODUCT\",\n \"materialCode\": \"0001-000000005000001\",\n \"quantity\": 1,\n \"amountType\": null,\n \"amount\": null\n }\n ]\n }\n ],\n\n \"potentialPromotions\": [\n {\n \"id\": 2,\n \"name\": \"Regalo por compra\",\n \"rewards\": [\n {\n \"rewardType\": \"GIFT_PRODUCT\",\n \"materialCode\": \"...\",\n \"quantity\": 1,\n \"amountType\": null,\n \"amount\": null\n }\n ],\n \"missing\": [ { \"attribute\": \"cart.total\", \"operator\": \"gte\", \"value\": \"130\" } ]\n }\n ]\n}\n"
}
]
},
{
"type": "table",
"attrs": {
"isNumberColumnEnabled": false,
"layout": "center",
"localId": "a1971466-4683-445c-ba0c-ae2d652e9a74"
},
"content": [
{
"type": "tableRow",
"attrs": {
"localId": "52a026c38516"
},
"content": [
{
"type": "tableHeader",
"attrs": {
"localId": "dc92d2e5c732"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Campo"
}
],
"attrs": {
"localId": "a00ff3336c00"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "41451a3b90a3"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Significado"
}
],
"attrs": {
"localId": "7b00645d25d2"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "7fd7ea1e2913"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "abfa13402ee6"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "availablePromotions",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "88d8b8d7580a"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "ba074a43dfda"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El cliente "
},
{
"type": "text",
"text": "ya tiene",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " la recompensa"
}
],
"attrs": {
"localId": "caf9fd5fa99b"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "76fc146bb3da"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "c5060773b032"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "potentialPromotions",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "7b0c7317d949"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "70f46d94f9ab"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Aún no",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " la tiene: le falta cumplir algo ("
},
{
"type": "text",
"text": "missing",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ")"
}
],
"attrs": {
"localId": "4a8fd8b8412c"
}
}
]
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si ambos arrays vienen vacíos → no mostrar banner."
}
],
"attrs": {
"localId": "0dba26a8cb3e"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El mensaje depende del ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "rewardType",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", no todas las recompensas son un regalo:",
"marks": [
{
"type": "strong"
}
]
}
],
"attrs": {
"localId": "fe61b7fc178b"
}
},
{
"type": "table",
"attrs": {
"isNumberColumnEnabled": false,
"layout": "center",
"localId": "2b8af256-9210-4bf1-9dce-8dc7901eaed2"
},
"content": [
{
"type": "tableRow",
"attrs": {
"localId": "cf23f585f45f"
},
"content": [
{
"type": "tableHeader",
"attrs": {
"localId": "c4f86c688fb9"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "rewardType",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "b624ca1f0d7c"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "8dc6badeca4f"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Campos relevantes"
}
],
"attrs": {
"localId": "c3246a0014e7"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "ea6073f0a698"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Mensaje"
}
],
"attrs": {
"localId": "daa635fd4ea7"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "90c85fbf4df8"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "2ba02e896f48"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "GIFT_PRODUCT",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "5b1bbf12f07e"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "2cc10e8d5d89"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "materialCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "quantity",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "a7a8acaa914f"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "f4648cba68a3"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "\"¡Tienes recompensas esperándote!\"",
"marks": [
{
"type": "em"
}
]
},
{
"type": "text",
"text": " / "
},
{
"type": "text",
"text": "\"…y llévate: {name}\"",
"marks": [
{
"type": "em"
}
]
}
],
"attrs": {
"localId": "d25fda19fa6e"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "6c09528c0e84"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "d5f732c62692"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "DISCOUNT_ORDER",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "b5646829808b"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "35ac68f4fb1c"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "amountType",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "amount",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "39039f62a2dd"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "5a0ba0448bb8"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "\"…y obtén {amount}% de descuento\"",
"marks": [
{
"type": "em"
}
]
},
{
"type": "text",
"text": " (si "
},
{
"type": "text",
"text": "amountType === \"P\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ") o "
},
{
"type": "text",
"text": "\"C$ {amount} de descuento\"",
"marks": [
{
"type": "em"
}
]
},
{
"type": "text",
"text": " (si "
},
{
"type": "text",
"text": "amountType === \"F\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ")"
}
],
"attrs": {
"localId": "b185ea6a41f3"
}
}
]
}
]
}
]
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "c99fed8cfd98"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "amountType",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ": "
},
{
"type": "text",
"text": "\"P\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " = porcentaje, "
},
{
"type": "text",
"text": "\"F\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " = monto fijo. Viene "
},
{
"type": "text",
"text": "null",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " cuando la recompensa es un regalo."
}
],
"attrs": {
"localId": "baf15ee9adfc"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "82c731487c35"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si el "
},
{
"type": "text",
"text": "rewardType",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " no es ninguno de esos dos, "
},
{
"type": "text",
"text": "ignorar ese elemento",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " (aún no se aplican, ver alcance)."
}
],
"attrs": {
"localId": "57a3f0b1c429"
}
}
]
}
],
"attrs": {
"localId": "27a9d1ce0c23"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sobre ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "potentialPromotions",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ":",
"marks": [
{
"type": "strong"
}
]
}
],
"attrs": {
"localId": "a11b5f9e7eed"
}
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "ce32a7bba56c"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Cada elemento trae "
},
{
"type": "text",
"text": "missing",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ": "
},
{
"type": "text",
"text": "qué le falta",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " al cliente para ganar esa recompensa."
}
],
"attrs": {
"localId": "8f0878d56675"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "670c1432df5e"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Hoy solo hay que interpretar "
},
{
"type": "text",
"text": "missing.attribute === \"cart.total\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (monto mínimo de compra). El "
},
{
"type": "text",
"text": "value",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " es el monto."
}
],
"attrs": {
"localId": "2285013aa156"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "66c879425328"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si el "
},
{
"type": "text",
"text": "missing",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " es de otro atributo que no se sabe interpretar, "
},
{
"type": "text",
"text": "ignorar ese elemento",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "615c75f5b649"
}
}
]
}
],
"attrs": {
"localId": "168ca2264192"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "No requiere llamadas nuevas.",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " Los dos campos viajan en la misma respuesta de puntos."
}
],
"attrs": {
"localId": "7b1c167dfc5e"
}
},
{
"type": "rule",
"attrs": {
"localId": "f120a6911f96"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "db402fcb2dde"
},
"content": [
{
"type": "text",
"text": "2. Línea de regalo en el carrito"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Endpoint (ya lo consumen):",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "POST api/em/shopping_bag/get",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "6f4e1a9b849a"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "La línea del regalo "
},
{
"type": "text",
"text": "viene incluida automáticamente",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " en la respuesta cuando corresponde, con la misma estructura que un ítem normal. Se identifica por su "
},
{
"type": "text",
"text": "material_json",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ":"
}
],
"attrs": {
"localId": "bb59f0b2799f"
}
},
{
"type": "codeBlock",
"attrs": {
"localId": "64637547-d89c-42c5-b91b-46817750523c",
"wrap": true
},
"content": [
{
"type": "text",
"text": "{\n \"id\": -1,\n \"quantity\": 1,\n \"price\": 0,\n \"material_code\": \"0001-000000005000001\",\n \"material_json\": \"{ \\\"code\\\": \\\"...\\\", \\\"name\\\": \\\"Whopper Combo Pequeño\\\", \\\"images\\\": [...], \\\"newPrice\\\": 0, \\\"oldPrice\\\": 130, \\\"tax\\\": 15, \\\"isPromotion\\\": true, \\\"typePromotion\\\": 3, \\\"promotionId\\\": 1, \\\"promotionName\\\": \\\"Regalo de bienvenida\\\" }\"\n}\n"
}
]
},
{
"type": "blockquote",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "material_json",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " viaja como "
},
{
"type": "text",
"text": "string JSON",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ": hay que parsearlo (igual que con los ítems normales)."
}
],
"attrs": {
"localId": "fb146a3a358c"
}
}
],
"attrs": {
"localId": "1e00f59c5560"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Cómo identificar el regalo:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "material_json.isPromotion === true",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "y",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "material_json.typePromotion === 3",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "1bb6d1bfcfd9"
}
},
{
"type": "blockquote",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "typePromotion",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ": "
},
{
"type": "text",
"text": "1",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " = recompensa por puntos (sistema anterior), "
},
{
"type": "text",
"text": "2",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " = oferta (sistema anterior), "
},
{
"type": "text",
"text": "3",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " = regalo del motor de promociones (nuevo)",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "862e0b8163b4"
}
}
],
"attrs": {
"localId": "5b52e5ac42f7"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Qué hacer:",
"marks": [
{
"type": "strong"
}
]
}
],
"attrs": {
"localId": "bb6b2b3e8adc"
}
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "e4099a2076cd"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Renderizarla como bloque de promoción: precio "
},
{
"type": "text",
"text": "C$ 0.00",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ", con "
},
{
"type": "text",
"text": "promotionName",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " como subtítulo."
}
],
"attrs": {
"localId": "188897b9559b"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "2d12af5cf539"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Cantidad bloqueada",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " (no editable) y no eliminable individualmente."
}
],
"attrs": {
"localId": "99c825ac5450"
}
}
]
}
],
"attrs": {
"localId": "47fed22dab1e"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Importante:",
"marks": [
{
"type": "strong"
}
]
}
],
"attrs": {
"localId": "29f8f2584681"
}
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "5682d0d4069b"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "La app "
},
{
"type": "text",
"text": "NO debe agregar el regalo por su cuenta",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ". Ya viene incluido."
}
],
"attrs": {
"localId": "d8bde5299d05"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "880d7144038e"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El "
},
{
"type": "text",
"text": "id",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " es "
},
{
"type": "text",
"text": "negativo",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " ("
},
{
"type": "text",
"text": "-1",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "-2",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", …): es una línea "
},
{
"type": "text",
"text": "virtual",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ", no existe como registro. "
},
{
"type": "text",
"text": "No llamar a ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "DELETE shopping_bag/delete/:id",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " sobre ella."
}
],
"attrs": {
"localId": "f78a0197d98c"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "fd43e3782ed9"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "oldPrice",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " puede venir "
},
{
"type": "text",
"text": "null",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (cuando el material no tiene precio de lista activo). Si se muestra tachado, contemplar ese caso. "
},
{
"type": "text",
"text": "newPrice",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " siempre es "
},
{
"type": "text",
"text": "0",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "d5e1b7429b11"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "0f34e8b30485"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si el cliente no cumple las condiciones (ej. no alcanza la compra mínima), la línea "
},
{
"type": "text",
"text": "no llega",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ". No asumir que siempre está."
}
],
"attrs": {
"localId": "15b3fbcde6e0"
}
}
]
}
],
"attrs": {
"localId": "19b42aec3359"
}
},
{
"type": "rule",
"attrs": {
"localId": "aa37249733a0"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "f6a93ab92805"
},
"content": [
{
"type": "text",
"text": "3. Descuento en el carrito"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Endpoint NUEVO:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "POST api/em/shopping_bag/promotion_preview",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "454be7907243"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Mismo payload que "
},
{
"type": "text",
"text": "shopping_bag/get",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ":"
}
],
"attrs": {
"localId": "3f0907f0e9d0"
}
},
{
"type": "codeBlock",
"attrs": {
"localId": "7404df4a-c78e-4aa0-9fa2-e9bb7a5f7f17",
"wrap": true
},
"content": [
{
"type": "text",
"text": "{ \"userid\": 55, \"providerid\": 1, \"pickup\": \"PD\", \"storeId\": 12 }\n"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "storeId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " es "
},
{
"type": "text",
"text": "opcional",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " (mandarlo si la modalidad es retiro en tienda; hay promociones acotadas por tienda)."
}
],
"attrs": {
"localId": "9b70e6c4ede5"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Respuesta:"
}
],
"attrs": {
"localId": "d3a1c8bcd353"
}
},
{
"type": "codeBlock",
"attrs": {
"localId": "be146ef4-16cc-4854-83c1-6bc1e7f103b6",
"wrap": true
},
"content": [
{
"type": "text",
"text": "{ \"discount\": { \"amount\": 26.00, \"promotionId\": 3, \"promotionName\": \"Descuento de cumpleaños\" } }\n"
}
]
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "ba7afd0aecfe"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "La respuesta "
},
{
"type": "text",
"text": "no viene envuelta",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " en el sobre "
},
{
"type": "text",
"text": "{response, data}",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " de los otros endpoints: es el objeto tal cual."
}
],
"attrs": {
"localId": "9e6fdbd0df46"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "7d5e0aac4f16"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si no aplica ningún descuento → "
},
{
"type": "text",
"text": "{ \"discount\": null }",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ". También devuelve "
},
{
"type": "text",
"text": "{ \"discount\": null }",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " ante cualquier error interno (nunca rompe el carrito)."
}
],
"attrs": {
"localId": "eff68d5fb81e"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "78fee962ce56"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El "
},
{
"type": "text",
"text": "amount",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "ya viene calculado y en moneda",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " (si era porcentaje o monto fijo ya está resuelto, y topeado al total del carrito). La app "
},
{
"type": "text",
"text": "no calcula nada",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "f70a63312f9e"
}
}
]
}
],
"attrs": {
"localId": "540a06a45588"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Cuándo llamarlo:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " al cargar/refrescar el carrito (después de "
},
{
"type": "text",
"text": "shopping_bag/get",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "). Es no bloqueante: si falla, mostrar el carrito sin descuento."
}
],
"attrs": {
"localId": "9e17170e653c"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Regla de negocio (importante):",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " el descuento del motor "
},
{
"type": "text",
"text": "NO se acumula",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " con el del cupón. "
},
{
"type": "text",
"text": "Gana el mayor",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " de los dos:"
}
],
"attrs": {
"localId": "163ae3c3d924"
}
},
{
"type": "codeBlock",
"attrs": {
"localId": "f2919530-f6c0-4ccd-a340-55d7ff352253",
"wrap": true
},
"content": [
{
"type": "text",
"text": "descuentoFinal = max(descuentoDelCupon, discount.amount)\n"
}
]
},
{
"type": "blockquote",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "⚠️ "
},
{
"type": "text",
"text": "Esta regla es responsabilidad de la app.",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " El servidor "
},
{
"type": "text",
"text": "no",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " la verifica cuando la orden lleva cupón o puntos: en ese caso no compara contra el motor y acepta el "
},
{
"type": "text",
"text": "discount",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " que se le mande. Si la app suma los dos descuentos, la orden "
},
{
"type": "text",
"text": "se crea igual",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " y la diferencia la paga el negocio. El único caso en que el servidor topea el descuento es cuando "
},
{
"type": "text",
"text": "no",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " hay cupón ni puntos (ver 4.3)."
}
],
"attrs": {
"localId": "7f0b05913923"
}
}
],
"attrs": {
"localId": "5cf5b8337131"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Qué hacer:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " mostrar el descuento en el resumen ("
},
{
"type": "text",
"text": "- C$ 26.00",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ") y restarlo del total."
}
],
"attrs": {
"localId": "770561bcdb79"
}
},
{
"type": "rule",
"attrs": {
"localId": "a4b14aaf413b"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "0b6638730aed"
},
"content": [
{
"type": "text",
"text": "4. Confirmar la orden"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Endpoint (ya lo consumen):",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "POST api/em/order/set",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "7593c92deb66"
}
},
{
"type": "heading",
"attrs": {
"level": 3,
"localId": "212376c67e0e"
},
"content": [
{
"type": "text",
"text": "4.1 La línea de regalo en "
},
{
"type": "text",
"text": "detail[]",
"marks": [
{
"type": "code"
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Debe incluir "
},
{
"type": "text",
"text": "estos campos",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ":"
}
],
"attrs": {
"localId": "f76f438e194b"
}
},
{
"type": "codeBlock",
"attrs": {
"localId": "67a10078-c0fe-426b-9dc1-5c32c23325ee",
"wrap": true
},
"content": [
{
"type": "text",
"text": "{\n \"material\": \"0001-000000005000001\",\n \"quantity\": 1,\n \"price\": 0,\n \"subTotal\": 0,\n \"isPromotion\": \"3\",\n \"typePromotion\": 3,\n \"promotionId\": 1\n}\n"
}
]
},
{
"type": "table",
"attrs": {
"isNumberColumnEnabled": false,
"layout": "center",
"localId": "965302db-127f-4462-9582-4f6bdc306d9b"
},
"content": [
{
"type": "tableRow",
"attrs": {
"localId": "b4259358e365"
},
"content": [
{
"type": "tableHeader",
"attrs": {
"localId": "040e0d8bec35"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Campo"
}
],
"attrs": {
"localId": "de941aa3e36e"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "070a37d0041a"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Valor"
}
],
"attrs": {
"localId": "eaaa1e739873"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "eebbb2c77b1b"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Obligatorio"
}
],
"attrs": {
"localId": "dcee05890707"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "5c94e67a318d"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "611da758d0f1"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "isPromotion",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "23370fe9e516"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "d79d8e013b93"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "\"3\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (string)"
}
],
"attrs": {
"localId": "9756d91d0c17"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "457b5bce1662"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sí"
}
],
"attrs": {
"localId": "8b63a18eacc0"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "083c24ffba1d"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "be1c52b64c52"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "typePromotion",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "3ffdf393e66d"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "b54e29c8c910"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "3",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (number)"
}
],
"attrs": {
"localId": "0f13e46fba11"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "37e2b912ceb1"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sí"
}
],
"attrs": {
"localId": "e19375e0155b"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "e878ada86db6"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "aa1d29c72ef1"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "promotionId",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "021f1c8f2038"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "8017e79a52c0"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "el "
},
{
"type": "text",
"text": "promotionId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " del "
},
{
"type": "text",
"text": "material_json",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "3fa42377d765"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "f49791328aee"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sí"
}
],
"attrs": {
"localId": "8cff344bd747"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "59d3329350f7"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "2f1929bfbcff"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "price",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " / "
},
{
"type": "text",
"text": "subTotal",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "37332421e3f4"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "0ec1cd78519a"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "0",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "58855c20498e"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "f21ca9774469"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sí"
}
],
"attrs": {
"localId": "c822c2fc73e6"
}
}
]
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Las líneas normales no cambian (siguen con "
},
{
"type": "text",
"text": "isPromotion: \"0\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ")."
}
],
"attrs": {
"localId": "bf843247629c"
}
},
{
"type": "heading",
"attrs": {
"level": 3,
"localId": "c66628c8551e"
},
"content": [
{
"type": "text",
"text": "4.2 El descuento"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Va en el campo "
},
{
"type": "text",
"text": "discount",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " del payload de la orden (el mismo que ya se usa para cupones), con el monto final aplicado."
}
],
"attrs": {
"localId": "f2235777cecc"
}
},
{
"type": "heading",
"attrs": {
"level": 3,
"localId": "69177910c51a"
},
"content": [
{
"type": "text",
"text": "4.3 Por qué hay que enviarlo exacto"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Al confirmar, el servidor "
},
{
"type": "text",
"text": "vuelve a validar",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " el regalo y el descuento contra los datos reales del pedido (cliente, modalidad, tienda, total) y "
},
{
"type": "text",
"text": "solo acepta lo que realmente corresponde",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ":"
}
],
"attrs": {
"localId": "81c51d141642"
}
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "002dca1fdafe"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si la línea de regalo no corresponde (campos incorrectos, cantidad mayor a la otorgada, precio ≠ 0, o el cliente ya no califica) → "
},
{
"type": "text",
"text": "se rechaza la orden completa",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " con "
},
{
"type": "text",
"text": "ORDER_GIFT_NOT_APPLICABLE",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "3f3ccfefd9ea"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "a5fc2bf21a6c"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si el "
},
{
"type": "text",
"text": "discount",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " enviado supera el autorizado (y no hay cupón/puntos que lo justifiquen) → "
},
{
"type": "text",
"text": "se rechaza",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " con "
},
{
"type": "text",
"text": "ORDER_DISCOUNT_NOT_APPLICABLE",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "5d16e9a50749"
}
}
]
}
],
"attrs": {
"localId": "95280a0253e8"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Por eso los campos deben viajar tal cual llegaron: cualquier alteración hace fallar la orden."
}
],
"attrs": {
"localId": "543ed4b15b77"
}
},
{
"type": "rule",
"attrs": {
"localId": "e86e689b6ea6"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "8ea5fe691d3e"
},
"content": [
{
"type": "text",
"text": "Lo que la app NO debe hacer"
}
]
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "59d2c111b759"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ Calcular o decidir qué promoción aplica."
}
],
"attrs": {
"localId": "ac3827b76d8a"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "9d3c66c8ed96"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ Agregar el regalo al carrito por su cuenta."
}
],
"attrs": {
"localId": "a82872ffa194"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "10ff63cfb1ec"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ Calcular el monto del descuento (viene calculado)."
}
],
"attrs": {
"localId": "871a2dacdb19"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "afde0ca88b24"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ Acumular el descuento con el del cupón (gana el mayor)."
}
],
"attrs": {
"localId": "6bb4c8a9dc50"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "140619c0f09e"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ Modificar precio/cantidad del regalo."
}
],
"attrs": {
"localId": "deca48497c43"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "526553560218"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ Asumir que el regalo o el descuento siempre están."
}
],
"attrs": {
"localId": "a9165bd85093"
}
}
]
}
],
"attrs": {
"localId": "cb09315ef463"
}
},
{
"type": "rule",
"attrs": {
"localId": "3de4adfab90b"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "45f8e0b0f611"
},
"content": [
{
"type": "text",
"text": "Criterios de aceptación"
}
]
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "425b5c943ffb"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Con "
},
{
"type": "text",
"text": "availablePromotions",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " no vacío, se muestra el banner con el nombre de la recompensa."
}
],
"attrs": {
"localId": "4c92cea6287c"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "6505d8cce873"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Con "
},
{
"type": "text",
"text": "potentialPromotions",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (missing "
},
{
"type": "text",
"text": "cart.total",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "), el banner muestra el monto que falta: "
},
{
"type": "text",
"text": "\"Compra C$ X o más y llévate: {name}\"",
"marks": [
{
"type": "em"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "902daf37058a"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "1e5321705eb9"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Con ambos arrays vacíos, no se muestra banner."
}
],
"attrs": {
"localId": "61560f6d9ea8"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "c04ccc51ba2d"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "La línea de regalo se muestra a C$ 0.00, con su nombre de promoción, cantidad bloqueada y no eliminable."
}
],
"attrs": {
"localId": "851fe771c5cf"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "5ef26151ab2c"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El descuento del preview se muestra en el resumen y se resta del total."
}
],
"attrs": {
"localId": "85bf99015f99"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "2dc1bfd0139b"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Con cupón "
},
{
"type": "text",
"text": "y",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " descuento, se aplica "
},
{
"type": "text",
"text": "solo el mayor",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " (no se suman)."
}
],
"attrs": {
"localId": "9aac7e125f41"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "41173531d9fd"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Al confirmar, la línea de regalo viaja con "
},
{
"type": "text",
"text": "isPromotion: \"3\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "typePromotion: 3",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "promotionId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "price: 0",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "subTotal: 0",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "5dcea1ada890"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "428468198382"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "La orden se crea correctamente con producto normal + regalo + descuento."
}
],
"attrs": {
"localId": "0e65084c619c"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "9ce31c8410bb"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si se quita el producto pagado y no se alcanza la compra mínima, el regalo/descuento desaparecen del carrito."
}
],
"attrs": {
"localId": "1559d06a9f76"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "dda3a8b1c13a"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si los campos nuevos llegan vacíos/nulos, la app funciona exactamente como hoy."
}
],
"attrs": {
"localId": "cd89de3232f3"
}
}
]
}
],
"attrs": {
"localId": "24d209389b01"
}
}
]
},
"customfield_10010": null,
"customfield_10011": "0|i02w9o:4",
"customfield_10057": null,
"customfield_10058": null,
"timetracking": {},
"security": null,
"attachment": [],
"aggregatetimeestimate": null,
"customfield_11817": null,
"summary": "Regalar Producto - App movil",
"creator": {
"self": "https://albatrosservices.atlassian.net/rest/api/3/user?accountId=712020%3A343b485c-be6f-43cb-9cf3-7ff3ed3cbc7b",
"accountId": "712020:343b485c-be6f-43cb-9cf3-7ff3ed3cbc7b",
"avatarUrls": {
"48x48": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png",
"24x24": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png",
"16x16": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png",
"32x32": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png"
},
"displayName": "Xavier Alexander Chávez Saraguro",
"active": true,
"timeZone": "America/Guatemala",
"accountType": "atlassian"
},
"subtasks": [],
"reporter": {
"self": "https://albatrosservices.atlassian.net/rest/api/3/user?accountId=712020%3A343b485c-be6f-43cb-9cf3-7ff3ed3cbc7b",
"accountId": "712020:343b485c-be6f-43cb-9cf3-7ff3ed3cbc7b",
"avatarUrls": {
"48x48": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png",
"24x24": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png",
"16x16": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png",
"32x32": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png"
},
"displayName": "Xavier Alexander Chávez Saraguro",
"active": true,
"timeZone": "America/Guatemala",
"accountType": "atlassian"
},
"customfield_10000": "{}",
"aggregateprogress": {
"progress": 0,
"total": 0
},
"customfield_10001": null,
"environment": null,
"duedate": null,
"progress": {
"progress": 0,
"total": 0
},
"votes": {
"self": "https://albatrosservices.atlassian.net/rest/api/3/issue/RISE-29/votes",
"votes": 0,
"hasVoted": false
},
"comment": {
"comments": [
{
"self": "https://albatrosservices.atlassian.net/rest/api/3/issue/65228/comment/73650",
"id": "73650",
"author": {
"self": "https://albatrosservices.atlassian.net/rest/api/3/user?accountId=712020%3A343b485c-be6f-43cb-9cf3-7ff3ed3cbc7b",
"accountId": "712020:343b485c-be6f-43cb-9cf3-7ff3ed3cbc7b",
"avatarUrls": {
"48x48": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png",
"24x24": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png",
"16x16": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png",
"32x32": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png"
},
"displayName": "Xavier Alexander Chávez Saraguro",
"active": true,
"timeZone": "America/Guatemala",
"accountType": "atlassian"
},
"body": {
"type": "doc",
"version": 1,
"content": [
{
"type": "heading",
"attrs": {
"level": 1,
"localId": "5b7010ee9c0e"
},
"content": [
{
"type": "text",
"text": "Integración del motor de promociones — App Móvil"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Alcance de esta fase:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " producto de regalo ("
},
{
"type": "text",
"text": "GIFT_PRODUCT",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ") y descuento total de la orden ("
},
{
"type": "text",
"text": "DISCOUNT_ORDER",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ")."
}
],
"attrs": {
"localId": "386e116457f0"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "1078a4e00f80"
},
"content": [
{
"type": "text",
"text": "Resumen"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El servidor resuelve "
},
{
"type": "text",
"text": "toda",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " la lógica de promociones: decide qué recompensa corresponde, inyecta el regalo en el carrito, calcula el descuento, valida y registra el canje."
}
],
"attrs": {
"localId": "042e098e0dea"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "La app "
},
{
"type": "text",
"text": "no calcula, no decide y no valida",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " promociones. Solo tiene que:"
}
],
"attrs": {
"localId": "b7428484f1e5"
}
},
{
"type": "orderedList",
"attrs": {
"order": 1,
"localId": "c92a25bcb4e7"
},
"content": [
{
"type": "listItem",
"attrs": {
"localId": "7c11878da8af"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Mostrar el banner de recompensas (campos nuevos en un endpoint que ya consume)."
}
],
"attrs": {
"localId": "f58acd4f28b9"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "e3662198c7fc"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Renderizar la línea de regalo que ya viene en el carrito."
}
],
"attrs": {
"localId": "e618a321b7e2"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "892bbec009d1"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Pedir y mostrar el descuento (un endpoint nuevo)."
}
],
"attrs": {
"localId": "edb458acab7d"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "0415f3e47bad"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Reenviar correctamente el regalo y el descuento al confirmar la orden",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " ← lo único que requiere desarrollo real."
}
],
"attrs": {
"localId": "32f63a3ce3e7"
}
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Salvo el endpoint del descuento (punto 3), todos los cambios son "
},
{
"type": "text",
"text": "campos nuevos en endpoints existentes",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "a1a229f379bd"
}
},
{
"type": "blockquote",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Regla general:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " si un campo llega vacío o nulo, la app se comporta "
},
{
"type": "text",
"text": "exactamente como hoy",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " (sin banner, sin regalo, sin descuento). Nunca asumir que están presentes."
}
],
"attrs": {
"localId": "bc63c82f545a"
}
}
],
"attrs": {
"localId": "41d813fe482f"
}
},
{
"type": "rule",
"attrs": {
"localId": "e095b182c49c"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "f5ccbf7cf19f"
},
"content": [
{
"type": "text",
"text": "1. Banner de recompensas"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Endpoint (ya lo consumen para los puntos):",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "GET api/em/fidelization/get_points",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "ea11fb5846ff"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El response ahora incluye "
},
{
"type": "text",
"text": "dos",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " campos nuevos:"
}
],
"attrs": {
"localId": "60e09d5ddccc"
}
},
{
"type": "codeBlock",
"attrs": {
"localId": "86660b3d-eefe-4d62-81e8-3d79b52527b1",
"wrap": true
},
"content": [
{
"type": "text",
"text": "{\n \"response\": \"success\",\n \"data\": 23076,\n \"dataExchange\": { \"amount\": \"...\", \"value\": 0 },\n\n \"availablePromotions\": [\n {\n \"id\": 1,\n \"name\": \"Regalo de bienvenida\",\n \"rewards\": [\n {\n \"rewardType\": \"GIFT_PRODUCT\",\n \"materialCode\": \"0001-000000005000001\",\n \"quantity\": 1,\n \"amountType\": null,\n \"amount\": null\n }\n ]\n }\n ],\n\n \"potentialPromotions\": [\n {\n \"id\": 2,\n \"name\": \"Regalo por compra\",\n \"rewards\": [\n {\n \"rewardType\": \"GIFT_PRODUCT\",\n \"materialCode\": \"...\",\n \"quantity\": 1,\n \"amountType\": null,\n \"amount\": null\n }\n ],\n \"missing\": [ { \"attribute\": \"cart.total\", \"operator\": \"gte\", \"value\": \"130\" } ]\n }\n ]\n}\n"
}
]
},
{
"type": "table",
"attrs": {
"isNumberColumnEnabled": false,
"layout": "center",
"localId": "f7ba3ea3-da6b-42ac-bdb0-6fca7d7529a7"
},
"content": [
{
"type": "tableRow",
"attrs": {
"localId": "5eed4c8899d6"
},
"content": [
{
"type": "tableHeader",
"attrs": {
"localId": "4eb55493a013"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Campo"
}
],
"attrs": {
"localId": "163e7d75193d"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "5b79d4ffb500"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Significado"
}
],
"attrs": {
"localId": "f1e94aae0c0f"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "1589ff292bd2"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "f756242200a1"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "availablePromotions",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "e552366d5baf"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "bab87759cfee"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El cliente "
},
{
"type": "text",
"text": "ya tiene",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " la recompensa"
}
],
"attrs": {
"localId": "937ee34092bd"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "1d90d019492a"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "301cb2769d08"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "potentialPromotions",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "2b2b001fbf5f"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "68dfe0b8e6b3"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Aún no",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " la tiene: le falta cumplir algo ("
},
{
"type": "text",
"text": "missing",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ")"
}
],
"attrs": {
"localId": "f8315974d23e"
}
}
]
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si ambos arrays vienen vacíos → no mostrar banner."
}
],
"attrs": {
"localId": "dc1897bbb059"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El mensaje depende del ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "rewardType",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", no todas las recompensas son un regalo:",
"marks": [
{
"type": "strong"
}
]
}
],
"attrs": {
"localId": "bbfcab100743"
}
},
{
"type": "table",
"attrs": {
"isNumberColumnEnabled": false,
"layout": "center",
"localId": "575696fa-26eb-4525-9c26-2b615d665b58"
},
"content": [
{
"type": "tableRow",
"attrs": {
"localId": "182ecbf3b56d"
},
"content": [
{
"type": "tableHeader",
"attrs": {
"localId": "5ed826bd8c0b"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "rewardType",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "b452ba9b8c58"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "2fd9c2535709"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Campos relevantes"
}
],
"attrs": {
"localId": "235f6066ab6e"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "caf727037f37"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Mensaje"
}
],
"attrs": {
"localId": "07c51aa758d6"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "4d1365a4fc34"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "ccae7513390b"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "GIFT_PRODUCT",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "ed50fdc53a16"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "d2a942a1cf6d"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "materialCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "quantity",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "260ef9eb828e"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "eec05be644ac"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "\"¡Tienes recompensas esperándote!\"",
"marks": [
{
"type": "em"
}
]
},
{
"type": "text",
"text": " / "
},
{
"type": "text",
"text": "\"…y llévate: {name}\"",
"marks": [
{
"type": "em"
}
]
}
],
"attrs": {
"localId": "8fc29d001caf"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "f2708f9a12f4"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "92a0e60e656b"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "DISCOUNT_ORDER",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "7850d2c26f92"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "0415d608be4a"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "amountType",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "amount",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "624252de9881"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "a3c0fbc4e155"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "\"…y obtén {amount}% de descuento\"",
"marks": [
{
"type": "em"
}
]
},
{
"type": "text",
"text": " (si "
},
{
"type": "text",
"text": "amountType === \"P\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ") o "
},
{
"type": "text",
"text": "\"C$ {amount} de descuento\"",
"marks": [
{
"type": "em"
}
]
},
{
"type": "text",
"text": " (si "
},
{
"type": "text",
"text": "amountType === \"A\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ")"
}
],
"attrs": {
"localId": "805734b8a8e3"
}
}
]
}
]
}
]
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "db5677688ad7"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "amountType",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ": "
},
{
"type": "text",
"text": "\"P\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " = porcentaje, ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "\"A\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " = monto fijo",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " ("
},
{
"type": "text",
"text": "A",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " de "
},
{
"type": "text",
"text": "amount",
"marks": [
{
"type": "em"
}
]
},
{
"type": "text",
"text": "). Viene "
},
{
"type": "text",
"text": "null",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " cuando la recompensa es un regalo. No hay otros valores."
}
],
"attrs": {
"localId": "8bdb240dbc87"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "758d886001b7"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si el "
},
{
"type": "text",
"text": "rewardType",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " no es ninguno de esos dos, "
},
{
"type": "text",
"text": "ignorar ese elemento",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " (aún no se aplican, ver alcance)."
}
],
"attrs": {
"localId": "712d19082d44"
}
}
]
}
],
"attrs": {
"localId": "53cb75c298fe"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sobre ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "potentialPromotions",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ":",
"marks": [
{
"type": "strong"
}
]
}
],
"attrs": {
"localId": "62090c480ce3"
}
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "693734eda9e9"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Cada elemento trae "
},
{
"type": "text",
"text": "missing",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ": "
},
{
"type": "text",
"text": "qué le falta",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " al cliente para ganar esa recompensa."
}
],
"attrs": {
"localId": "d5ad1953e785"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "7382437262d8"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Hoy solo hay que interpretar "
},
{
"type": "text",
"text": "missing.attribute === \"cart.total\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (monto mínimo de compra). El "
},
{
"type": "text",
"text": "value",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " es el monto."
}
],
"attrs": {
"localId": "8f18615b0a32"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "a3807efe1e72"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si el "
},
{
"type": "text",
"text": "missing",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " es de otro atributo que no se sabe interpretar, "
},
{
"type": "text",
"text": "ignorar ese elemento",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "e1eb7af03644"
}
}
]
}
],
"attrs": {
"localId": "d3c979be4870"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "No requiere llamadas nuevas.",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " Los dos campos viajan en la misma respuesta de puntos."
}
],
"attrs": {
"localId": "d6ab0a007e04"
}
},
{
"type": "rule",
"attrs": {
"localId": "c49c4dae5425"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "8673b04cdfc3"
},
"content": [
{
"type": "text",
"text": "2. Línea de regalo en el carrito"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Endpoint (ya lo consumen):",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "POST api/em/shopping_bag/get",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "8c8699398266"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "La línea del regalo "
},
{
"type": "text",
"text": "viene incluida automáticamente",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " en la respuesta cuando corresponde, con la misma estructura que un ítem normal. Se identifica por su "
},
{
"type": "text",
"text": "material_json",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ":"
}
],
"attrs": {
"localId": "bbb0aac3ebba"
}
},
{
"type": "codeBlock",
"attrs": {
"localId": "b9388904-3b0b-46f3-a5cd-57d58fa333ad",
"wrap": true
},
"content": [
{
"type": "text",
"text": "{\n \"id\": -1,\n \"quantity\": 1,\n \"price\": 0,\n \"material_code\": \"0001-000000005000001\",\n \"material_json\": \"{ \\\"code\\\": \\\"...\\\", \\\"name\\\": \\\"Whopper Combo Pequeño\\\", \\\"images\\\": [...], \\\"newPrice\\\": 0, \\\"oldPrice\\\": 130, \\\"tax\\\": 15, \\\"isPromotion\\\": true, \\\"typePromotion\\\": 3, \\\"promotionId\\\": 1, \\\"promotionName\\\": \\\"Regalo de bienvenida\\\" }\"\n}\n"
}
]
},
{
"type": "blockquote",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "material_json",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " viaja como "
},
{
"type": "text",
"text": "string JSON",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ": hay que parsearlo (igual que con los ítems normales)."
}
],
"attrs": {
"localId": "ddb2d9727c88"
}
}
],
"attrs": {
"localId": "88dcd680b5fc"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Cómo identificar el regalo:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "material_json.isPromotion === true",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "y",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "material_json.typePromotion === 3",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "18783cc23191"
}
},
{
"type": "blockquote",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "typePromotion",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ": "
},
{
"type": "text",
"text": "1",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " = recompensa por puntos (sistema anterior), "
},
{
"type": "text",
"text": "2",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " = oferta (sistema anterior), "
},
{
"type": "text",
"text": "3",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " = regalo del motor de promociones (nuevo)",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "dcc139efdf25"
}
}
],
"attrs": {
"localId": "ac89d5aa0b4a"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Qué hacer:",
"marks": [
{
"type": "strong"
}
]
}
],
"attrs": {
"localId": "285426c57f68"
}
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "fb2b609f68f5"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Renderizarla como bloque de promoción: precio "
},
{
"type": "text",
"text": "C$ 0.00",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ", con "
},
{
"type": "text",
"text": "promotionName",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " como subtítulo."
}
],
"attrs": {
"localId": "6094bec13c45"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "93771b232a56"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Cantidad bloqueada",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " (no editable) y no eliminable individualmente."
}
],
"attrs": {
"localId": "b53b9e44b7b8"
}
}
]
}
],
"attrs": {
"localId": "e535d28b3e3c"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Importante:",
"marks": [
{
"type": "strong"
}
]
}
],
"attrs": {
"localId": "c4a36f03968f"
}
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "170a056e7f06"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "La app "
},
{
"type": "text",
"text": "NO debe agregar el regalo por su cuenta",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ". Ya viene incluido."
}
],
"attrs": {
"localId": "10a07faeff6c"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "5f85bfd23bfe"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El "
},
{
"type": "text",
"text": "id",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " es "
},
{
"type": "text",
"text": "negativo",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " ("
},
{
"type": "text",
"text": "-1",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "-2",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", …): es una línea "
},
{
"type": "text",
"text": "virtual",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ", no existe como registro. "
},
{
"type": "text",
"text": "No llamar a ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "DELETE shopping_bag/delete/:id",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " sobre ella."
}
],
"attrs": {
"localId": "9c8525d1ba6c"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "fd9a134a32af"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "oldPrice",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " puede venir "
},
{
"type": "text",
"text": "null",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (cuando el material no tiene precio de lista activo). Si se muestra tachado, contemplar ese caso. "
},
{
"type": "text",
"text": "newPrice",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " siempre es "
},
{
"type": "text",
"text": "0",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "c0be981145a4"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "07f19b54f878"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si el cliente no cumple las condiciones (ej. no alcanza la compra mínima), la línea "
},
{
"type": "text",
"text": "no llega",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ". No asumir que siempre está."
}
],
"attrs": {
"localId": "a43b6b06fa4e"
}
}
]
}
],
"attrs": {
"localId": "e750b2c489c0"
}
},
{
"type": "rule",
"attrs": {
"localId": "6892dcbb8ac7"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "c38832a39c3b"
},
"content": [
{
"type": "text",
"text": "3. Descuento en el carrito"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Endpoint NUEVO:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "POST api/em/shopping_bag/promotion_preview",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "73b3fd2fd538"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Mismo payload que "
},
{
"type": "text",
"text": "shopping_bag/get",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ":"
}
],
"attrs": {
"localId": "272bec29c800"
}
},
{
"type": "codeBlock",
"attrs": {
"localId": "f10e70c9-15ca-41a7-9f40-940691dd6392",
"wrap": true
},
"content": [
{
"type": "text",
"text": "{ \"userid\": 55, \"providerid\": 1, \"pickup\": \"PD\", \"storeId\": 12 }\n"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "storeId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " es "
},
{
"type": "text",
"text": "opcional",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " (mandarlo si la modalidad es retiro en tienda; hay promociones acotadas por tienda)."
}
],
"attrs": {
"localId": "6b9b7de49181"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Respuesta:"
}
],
"attrs": {
"localId": "c71b5b2dfeaa"
}
},
{
"type": "codeBlock",
"attrs": {
"localId": "9974ebc4-4a85-4ba6-97e9-ed2eec462e27",
"wrap": true
},
"content": [
{
"type": "text",
"text": "{ \"discount\": { \"amount\": 26.00, \"promotionId\": 3, \"promotionName\": \"Descuento de cumpleaños\" } }\n"
}
]
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "39672d7d087e"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "La respuesta "
},
{
"type": "text",
"text": "no viene envuelta",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " en el sobre "
},
{
"type": "text",
"text": "{response, data}",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " de los otros endpoints: es el objeto tal cual."
}
],
"attrs": {
"localId": "442f30a52f5e"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "e8aed6b52617"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si no aplica ningún descuento → "
},
{
"type": "text",
"text": "{ \"discount\": null }",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ". También devuelve "
},
{
"type": "text",
"text": "{ \"discount\": null }",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " ante cualquier error interno (nunca rompe el carrito)."
}
],
"attrs": {
"localId": "8053cc2e1baf"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "147217fb84f5"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El "
},
{
"type": "text",
"text": "amount",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "ya viene calculado y en moneda",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " (si era porcentaje o monto fijo ya está resuelto, y topeado al total del carrito). La app "
},
{
"type": "text",
"text": "no calcula nada",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "0abff799f33a"
}
}
]
}
],
"attrs": {
"localId": "7bf81157fc18"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Cuándo llamarlo:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " al cargar/refrescar el carrito (después de "
},
{
"type": "text",
"text": "shopping_bag/get",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "). Es no bloqueante: si falla, mostrar el carrito sin descuento."
}
],
"attrs": {
"localId": "27d455922f8f"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Regla de negocio (importante):",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " el descuento del motor "
},
{
"type": "text",
"text": "NO se acumula",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " con el del cupón. "
},
{
"type": "text",
"text": "Gana el mayor",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " de los dos:"
}
],
"attrs": {
"localId": "3ca1fc0c144e"
}
},
{
"type": "codeBlock",
"attrs": {
"localId": "36d0fc99-c87e-4077-9231-2ac94639d67b",
"wrap": true
},
"content": [
{
"type": "text",
"text": "descuentoFinal = max(descuentoDelCupon, discount.amount)\n"
}
]
},
{
"type": "blockquote",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "⚠️ "
},
{
"type": "text",
"text": "Esta regla es responsabilidad de la app.",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " El servidor "
},
{
"type": "text",
"text": "no",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " la verifica cuando la orden lleva cupón o puntos: en ese caso no compara contra el motor y acepta el "
},
{
"type": "text",
"text": "discount",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " que se le mande. Si la app suma los dos descuentos, la orden "
},
{
"type": "text",
"text": "se crea igual",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " y la diferencia la paga el negocio. El único caso en que el servidor topea el descuento es cuando "
},
{
"type": "text",
"text": "no",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " hay cupón ni puntos (ver 4.3)."
}
],
"attrs": {
"localId": "57fdc0072d55"
}
}
],
"attrs": {
"localId": "30fbd4d18dff"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Qué hacer:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " mostrar el descuento en el resumen ("
},
{
"type": "text",
"text": "- C$ 26.00",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ") y restarlo del total."
}
],
"attrs": {
"localId": "403c1766f1ea"
}
},
{
"type": "rule",
"attrs": {
"localId": "7d31d10154eb"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "d62dfa24a60d"
},
"content": [
{
"type": "text",
"text": "4. Confirmar la orden ← desarrollo real"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Endpoint (ya lo consumen):",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "POST api/em/order/set",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "9e2c3524f8b4"
}
},
{
"type": "heading",
"attrs": {
"level": 3,
"localId": "2d76289d49aa"
},
"content": [
{
"type": "text",
"text": "4.1 La línea de regalo en "
},
{
"type": "text",
"text": "detail[]",
"marks": [
{
"type": "code"
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Debe incluir "
},
{
"type": "text",
"text": "estos campos",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ":"
}
],
"attrs": {
"localId": "3068e28d759b"
}
},
{
"type": "codeBlock",
"attrs": {
"localId": "b3da25c7-fb99-4f7a-aa31-93e77fe5cda6",
"wrap": true
},
"content": [
{
"type": "text",
"text": "{\n \"material\": \"0001-000000005000001\",\n \"quantity\": 1,\n \"price\": 0,\n \"subTotal\": 0,\n \"isPromotion\": \"3\",\n \"typePromotion\": 3,\n \"promotionId\": 1\n}\n"
}
]
},
{
"type": "table",
"attrs": {
"isNumberColumnEnabled": false,
"layout": "center",
"localId": "554b1d06-45ba-4e96-a603-d39412ffad26"
},
"content": [
{
"type": "tableRow",
"attrs": {
"localId": "0259f519d7aa"
},
"content": [
{
"type": "tableHeader",
"attrs": {
"localId": "81b110c5a770"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Campo"
}
],
"attrs": {
"localId": "eb93dd9f7188"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "ddeba29b4dd1"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Valor"
}
],
"attrs": {
"localId": "fed92cfe5917"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "5110950b2f11"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Obligatorio"
}
],
"attrs": {
"localId": "2d5ead88fdbd"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "8fd4603c4100"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "9619abd4dc87"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "isPromotion",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "a54245dbe092"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "e3b863090960"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "\"3\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (string)"
}
],
"attrs": {
"localId": "3b6fd9a109eb"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "7bbfea432a15"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sí"
}
],
"attrs": {
"localId": "b343caf02f2a"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "1fbf73bdde39"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "0c4fc8216c24"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "typePromotion",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "480a1bba0495"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "f2361fb2c635"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "3",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (number)"
}
],
"attrs": {
"localId": "2b3f554e6076"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "6802c974a1be"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sí"
}
],
"attrs": {
"localId": "4dffd5e8db14"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "3d9c43fc636f"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "0ba9b33d1ae6"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "promotionId",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "88a998d9b7c8"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "8f321254bb62"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "el "
},
{
"type": "text",
"text": "promotionId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " del "
},
{
"type": "text",
"text": "material_json",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "0cfe8514e178"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "9cb68d9a3591"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sí"
}
],
"attrs": {
"localId": "134b6e5387cf"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "418ebd67cf9d"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "555964d79e2f"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "price",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " / "
},
{
"type": "text",
"text": "subTotal",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "49852605a400"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "f22449fa8741"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "0",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "996a9b2c7a5d"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "9aa65076b006"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sí"
}
],
"attrs": {
"localId": "587f5c8c8304"
}
}
]
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Las líneas normales no cambian (siguen con "
},
{
"type": "text",
"text": "isPromotion: \"0\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ")."
}
],
"attrs": {
"localId": "dc2dd7bc113e"
}
},
{
"type": "blockquote",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Los "
},
{
"type": "text",
"text": "dos",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " campos ("
},
{
"type": "text",
"text": "isPromotion",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " y "
},
{
"type": "text",
"text": "typePromotion",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ") deben ir juntos. Si falta "
},
{
"type": "text",
"text": "isPromotion: \"3\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", el servidor puede tratar la línea como producto normal y rechazarla con "
},
{
"type": "text",
"text": "ORDER_PRODUCT_NO_PRICE",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (por venir en 0) en vez de con el error de regalo."
}
],
"attrs": {
"localId": "9b666cf5d242"
}
}
],
"attrs": {
"localId": "da6c2e6e18b7"
}
},
{
"type": "heading",
"attrs": {
"level": 3,
"localId": "b25cd6f5243b"
},
"content": [
{
"type": "text",
"text": "4.2 El descuento"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Va en el campo "
},
{
"type": "text",
"text": "discount",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " del payload de la orden (el mismo que ya se usa para cupones), con el monto final aplicado."
}
],
"attrs": {
"localId": "d021d11bfe11"
}
},
{
"type": "heading",
"attrs": {
"level": 3,
"localId": "9ef3240aaf43"
},
"content": [
{
"type": "text",
"text": "4.3 Por qué hay que enviarlo exacto"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Al confirmar, el servidor "
},
{
"type": "text",
"text": "vuelve a validar",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " el regalo y el descuento contra los datos reales del pedido (cliente, modalidad, tienda, total) y "
},
{
"type": "text",
"text": "solo acepta lo que realmente corresponde",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ":"
}
],
"attrs": {
"localId": "8ac7a2a173ae"
}
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "0450f884bbda"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Regalo:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " si la línea no corresponde (campos incorrectos, cantidad mayor a la otorgada, precio o subtotal ≠ 0, o el cliente ya no califica) → "
},
{
"type": "text",
"text": "se rechaza la orden completa",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " con "
},
{
"type": "text",
"text": "ORDER_GIFT_NOT_APPLICABLE",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ". Se valida "
},
{
"type": "text",
"text": "siempre",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "98e683d1f67f"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "194ad59f2942"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Descuento:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " solo se valida cuando la orden "
},
{
"type": "text",
"text": "no",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " lleva cupón, ni puntos, ni promociones del sistema anterior ("
},
{
"type": "text",
"text": "isPromotion",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " 1 o 2). En ese caso, si el "
},
{
"type": "text",
"text": "discount",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " enviado supera el autorizado por el motor → "
},
{
"type": "text",
"text": "se rechaza",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " con "
},
{
"type": "text",
"text": "ORDER_DISCOUNT_NOT_APPLICABLE",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ". Si la orden lleva cupón o puntos, el servidor "
},
{
"type": "text",
"text": "no",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " topea el descuento (ver la advertencia de la sección 3)."
}
],
"attrs": {
"localId": "bea3ba6bc96c"
}
}
]
}
],
"attrs": {
"localId": "1d93fc4018f6"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Por eso los campos deben viajar tal cual llegaron: cualquier alteración hace fallar la orden."
}
],
"attrs": {
"localId": "0e65718e3a14"
}
},
{
"type": "rule",
"attrs": {
"localId": "73a2e9fb450f"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "7041661bc645"
},
"content": [
{
"type": "text",
"text": "Lo que la app NO debe hacer"
}
]
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "e0e596856108"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ Calcular o decidir qué promoción aplica."
}
],
"attrs": {
"localId": "357ad4afb40f"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "68d6cf25662a"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ Agregar el regalo al carrito por su cuenta."
}
],
"attrs": {
"localId": "52de5392ef94"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "2a9bd65d1aa4"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ Calcular el monto del descuento (viene calculado)."
}
],
"attrs": {
"localId": "694122a03f11"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "93644bc4cf3b"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ Acumular el descuento con el del cupón (gana el mayor)."
}
],
"attrs": {
"localId": "a5f761b1e453"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "f3a89069e614"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ Modificar precio/cantidad del regalo."
}
],
"attrs": {
"localId": "7e5a0e690b06"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "88fc259dd9f1"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ Asumir que el regalo o el descuento siempre están."
}
],
"attrs": {
"localId": "72d6c98f9dac"
}
}
]
}
],
"attrs": {
"localId": "db6460ec2fc5"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si la app \"ayuda\", la orden se rechaza."
}
],
"attrs": {
"localId": "6746792a8d94"
}
},
{
"type": "rule",
"attrs": {
"localId": "4b7b9e846b0a"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "1e53c512d3a5"
},
"content": [
{
"type": "text",
"text": "Criterios de aceptación"
}
]
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "03a96ea3caad"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Con "
},
{
"type": "text",
"text": "availablePromotions",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " no vacío, se muestra el banner con el nombre de la recompensa."
}
],
"attrs": {
"localId": "9bdd8f95f1b1"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "409f4c215098"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Con "
},
{
"type": "text",
"text": "potentialPromotions",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (missing "
},
{
"type": "text",
"text": "cart.total",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "), el banner muestra el monto que falta: "
},
{
"type": "text",
"text": "\"Compra C$ X o más y llévate: {name}\"",
"marks": [
{
"type": "em"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "d6ea0fc24f73"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "e055f0e15986"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Con una recompensa "
},
{
"type": "text",
"text": "DISCOUNT_ORDER",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", el banner habla de "
},
{
"type": "text",
"text": "descuento",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " ("
},
{
"type": "text",
"text": "amount",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "/"
},
{
"type": "text",
"text": "amountType",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "), no de \"llévate\"."
}
],
"attrs": {
"localId": "1e8b2f247991"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "730091d9152a"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Con ambos arrays vacíos, no se muestra banner."
}
],
"attrs": {
"localId": "918902431cdb"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "a9d952771e1b"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "La línea de regalo se muestra a C$ 0.00, con su nombre de promoción, cantidad bloqueada y no eliminable."
}
],
"attrs": {
"localId": "4715df9aa6a3"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "a1b03fcc84b0"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Un regalo sin precio de lista ("
},
{
"type": "text",
"text": "oldPrice: null",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ") se renderiza sin romper."
}
],
"attrs": {
"localId": "a3392d4aa7cd"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "adf4e5bda456"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El descuento del preview se muestra en el resumen y se resta del total."
}
],
"attrs": {
"localId": "f18522623d47"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "a9505da349f7"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Con cupón "
},
{
"type": "text",
"text": "y",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " descuento, se aplica "
},
{
"type": "text",
"text": "solo el mayor",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " (no se suman)."
}
],
"attrs": {
"localId": "a8293bf7306c"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "5ece906b1f63"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Al confirmar, la línea de regalo viaja con "
},
{
"type": "text",
"text": "isPromotion: \"3\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "typePromotion: 3",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "promotionId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "price: 0",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "subTotal: 0",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "8b2eb3102a7b"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "8c283505522b"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "La orden se crea correctamente con producto normal + regalo + descuento."
}
],
"attrs": {
"localId": "31c94654b5b2"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "3edaab37cb1d"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si se quita el producto pagado y no se alcanza la compra mínima, el regalo/descuento desaparecen del carrito."
}
],
"attrs": {
"localId": "a6dbf9585e8e"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "939df717c5c3"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si los campos nuevos llegan vacíos/nulos, la app funciona exactamente como hoy."
}
],
"attrs": {
"localId": "bacbc82256e5"
}
}
]
}
],
"attrs": {
"localId": "8fcc02881010"
}
},
{
"type": "rule",
"attrs": {
"localId": "2c7fdcdf97c9"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "207378c925d6"
},
"content": [
{
"type": "text",
"text": "Errores esperados"
}
]
},
{
"type": "table",
"attrs": {
"isNumberColumnEnabled": false,
"layout": "center",
"localId": "d8b67457-7cbc-43ac-b777-d82370d0516e"
},
"content": [
{
"type": "tableRow",
"attrs": {
"localId": "25e8b12f5e73"
},
"content": [
{
"type": "tableHeader",
"attrs": {
"localId": "1a614b1c0f2a"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Código"
}
],
"attrs": {
"localId": "1c4018f3727d"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "c9562b3fd901"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "HTTP"
}
],
"attrs": {
"localId": "63dbf70a88cf"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "7ecbfc879b90"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Significado"
}
],
"attrs": {
"localId": "95c6e4d58d61"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "1fd133eee96d"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "5c10969b63b3"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "ORDER_GIFT_NOT_APPLICABLE",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "3442983a4a1e"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "12c92582bd2e"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "409"
}
],
"attrs": {
"localId": "690da3a55091"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "2d6ed5431c70"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "La línea de regalo enviada no corresponde a un regalo autorizado."
}
],
"attrs": {
"localId": "b85c151fb3e1"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "f2a0c14f1b85"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "f8678de7770f"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "ORDER_DISCOUNT_NOT_APPLICABLE",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "1d7660de2e5d"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "84cf10bd27f1"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "409"
}
],
"attrs": {
"localId": "d2ac40a945ac"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "ec47f9c05318"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El descuento enviado supera el autorizado."
}
],
"attrs": {
"localId": "592ffaa1206e"
}
}
]
}
]
}
]
},
{
"type": "rule",
"attrs": {
"localId": "8fb83201e260"
}
}
]
},
"updateAuthor": {
"self": "https://albatrosservices.atlassian.net/rest/api/3/user?accountId=712020%3A343b485c-be6f-43cb-9cf3-7ff3ed3cbc7b",
"accountId": "712020:343b485c-be6f-43cb-9cf3-7ff3ed3cbc7b",
"avatarUrls": {
"48x48": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png",
"24x24": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png",
"16x16": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png",
"32x32": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png"
},
"displayName": "Xavier Alexander Chávez Saraguro",
"active": true,
"timeZone": "America/Guatemala",
"accountType": "atlassian"
},
"created": "2026-07-17T09:48:55.201-0600",
"updated": "2026-07-17T09:48:55.201-0600",
"jsdPublic": true
},
{
"self": "https://albatrosservices.atlassian.net/rest/api/3/issue/65228/comment/73993",
"id": "73993",
"author": {
"self": "https://albatrosservices.atlassian.net/rest/api/3/user?accountId=712020%3A343b485c-be6f-43cb-9cf3-7ff3ed3cbc7b",
"accountId": "712020:343b485c-be6f-43cb-9cf3-7ff3ed3cbc7b",
"avatarUrls": {
"48x48": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png",
"24x24": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png",
"16x16": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png",
"32x32": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png"
},
"displayName": "Xavier Alexander Chávez Saraguro",
"active": true,
"timeZone": "America/Guatemala",
"accountType": "atlassian"
},
"body": {
"type": "doc",
"version": 1,
"content": [
{
"type": "heading",
"attrs": {
"level": 1,
"localId": "4fa7e4d9a751"
},
"content": [
{
"type": "text",
"text": "Integración del motor de promociones — App Móvil"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Alcance de esta fase:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " producto de regalo ("
},
{
"type": "text",
"text": "GIFT_PRODUCT",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", ahora elegible y configurable por el cliente)"
}
],
"attrs": {
"localId": "d408439296f5"
}
},
{
"type": "rule",
"attrs": {
"localId": "978744496468"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "c0247824fb72"
},
"content": [
{
"type": "text",
"text": "Qué cambió respecto de la versión anterior"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Lo más importante: el regalo ya no viaja dentro del carrito.",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " Si ya empezaste a construir contra el documento anterior, esto es lo que cambia:"
}
],
"attrs": {
"localId": "9e2b102fcead"
}
},
{
"type": "table",
"attrs": {
"isNumberColumnEnabled": false,
"layout": "center",
"localId": "b5b71b93-65c1-48c6-bd52-bcdd77cd62b4"
},
"content": [
{
"type": "tableRow",
"attrs": {
"localId": "576f79d3913b"
},
"content": [
{
"type": "tableHeader",
"attrs": {
"localId": "72937c6c2453"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sección del doc anterior"
}
],
"attrs": {
"localId": "07982032f984"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "b477d0055462"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Estado"
}
],
"attrs": {
"localId": "798d5319a2de"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "c74f82a4de4a"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Qué pasó"
}
],
"attrs": {
"localId": "63589d4254bc"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "6add9d69b581"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "a03237074be8"
},
"content": [
{
"type": "orderedList",
"attrs": {
"order": 1,
"localId": "37f56c6c272e"
},
"content": [
{
"type": "listItem",
"attrs": {
"localId": "c02d6ff4ed73"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Banner ("
},
{
"type": "text",
"text": "get_points",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ")"
}
],
"attrs": {
"localId": "eb0ae87a33a6"
}
}
]
}
]
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "1dfa6283f4f6"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "✅ Sigue igual, pero ahora "
},
{
"type": "text",
"text": "navega",
"marks": [
{
"type": "strong"
}
]
}
],
"attrs": {
"localId": "e932bc4c567c"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "c54e92940814"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "availablePromotions",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "/"
},
{
"type": "text",
"text": "potentialPromotions",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " no cambiaron. Lo nuevo es que tocar el banner debe llevar a una pantalla de beneficios (sección 1 más abajo)."
}
],
"attrs": {
"localId": "284b21f4ac0e"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "403cd1c19b59"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "42aadbe69761"
},
"content": [
{
"type": "orderedList",
"attrs": {
"order": 2,
"localId": "b166a646cf1b"
},
"content": [
{
"type": "listItem",
"attrs": {
"localId": "382decceba71"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Línea de regalo automática en el carrito"
}
],
"attrs": {
"localId": "8f72d5fe3790"
}
}
]
}
]
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "e97b806539ec"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ "
},
{
"type": "text",
"text": "Eliminada. No la implementes.",
"marks": [
{
"type": "strong"
}
]
}
],
"attrs": {
"localId": "1fcef2074eae"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "131314c1787b"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El servidor dejó de inyectar el regalo en "
},
{
"type": "text",
"text": "POST em/shopping_bag/get",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ". Ese endpoint ahora es un "
},
{
"type": "text",
"text": "passthrough",
"marks": [
{
"type": "em"
}
]
},
{
"type": "text",
"text": " puro: devuelve exactamente lo que hay persistido, nada más."
}
],
"attrs": {
"localId": "ba3282b20887"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "99ef1e6283fe"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "a98b193b82d4"
},
"content": [
{
"type": "orderedList",
"attrs": {
"order": 3,
"localId": "7fd5ab365ec0"
},
"content": [
{
"type": "listItem",
"attrs": {
"localId": "30e0d597c5fb"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Descuento ("
},
{
"type": "text",
"text": "promotion_preview",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ")"
}
],
"attrs": {
"localId": "9fac2ee3ae3a"
}
}
]
}
]
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "ea0b495c0564"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "✅ Sigue igual"
}
],
"attrs": {
"localId": "3e3080fe8e0b"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "bb6073665284"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sin cambios, léela igual que antes (ahora es la sección 4)."
}
],
"attrs": {
"localId": "a28dffb9392b"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "1c9173b13ff0"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "23ceda513fe9"
},
"content": [
{
"type": "orderedList",
"attrs": {
"order": 4,
"localId": "97d5e441a392"
},
"content": [
{
"type": "listItem",
"attrs": {
"localId": "d0323d6af925"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Confirmar la orden"
}
],
"attrs": {
"localId": "6132ae59f033"
}
}
]
}
]
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "bacd13e55c57"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "✅ El contrato sigue igual, cambia el "
},
{
"type": "text",
"text": "origen",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " del dato"
}
],
"attrs": {
"localId": "6270f85f1052"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "d312fb4e0efb"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "isPromotion: \"3\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "typePromotion: 3",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "promotionId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "price: 0",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "subTotal: 0",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " siguen siendo exactamente los mismos campos. Lo que cambia es de dónde los sacás: ya no los copiás de la línea que traía el carrito (no existe más), sino de lo que el cliente eligió y configuró en las pantallas nuevas (secciones 2 y 3)."
}
],
"attrs": {
"localId": "f805be8bc6f6"
}
}
]
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Lo que reemplaza a la inyección automática:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " dos endpoints nuevos que arman el flujo de \"elegir tu regalo\", igual al que ya tiene el ecommerce web en su pestaña "
},
{
"type": "text",
"text": "\"Beneficios\"",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ":"
}
],
"attrs": {
"localId": "3d18f3cfb8c0"
}
},
{
"type": "orderedList",
"attrs": {
"order": 1,
"localId": "6fbc4084a4d0"
},
"content": [
{
"type": "listItem",
"attrs": {
"localId": "89136c4ce737"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "POST api/em/fidelization/get_rewards",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " — lista qué puede elegir el cliente (sección 2)."
}
],
"attrs": {
"localId": "862216be75f6"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "0e95edfaf74b"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "GET api/em/material/get_benefit/:code/:type/:office/:storeId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " — trae el detalle configurable de lo que eligió (sección 3)."
}
],
"attrs": {
"localId": "49d92d71c491"
}
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "La razón del cambio es de experiencia, no técnica: el negocio quiere que el cliente "
},
{
"type": "text",
"text": "elija",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " su regalo en vez de que aparezca solo en el carrito. Si tu app ya tiene código que asume la línea automática, hay que sacarlo."
}
],
"attrs": {
"localId": "58128b285ba1"
}
},
{
"type": "rule",
"attrs": {
"localId": "cb1ed55c797e"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "e41615ac29e5"
},
"content": [
{
"type": "text",
"text": "Resumen"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El servidor sigue resolviendo "
},
{
"type": "text",
"text": "toda",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " la lógica de promociones: decide qué recompensas corresponden, valida el canje, calcula el descuento. Lo que cambia es "
},
{
"type": "text",
"text": "cómo",
"marks": [
{
"type": "em"
}
]
},
{
"type": "text",
"text": " el regalo llega al pedido: ya no es automático, ahora requiere una elección explícita del cliente."
}
],
"attrs": {
"localId": "9c1f85a1184c"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "La app "
},
{
"type": "text",
"text": "no calcula, no decide y no valida",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " promociones. Tiene que:"
}
],
"attrs": {
"localId": "e7d24dbf4509"
}
},
{
"type": "orderedList",
"attrs": {
"order": 1,
"localId": "1a332bc43b6d"
},
"content": [
{
"type": "listItem",
"attrs": {
"localId": "b298949e26d7"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Mostrar el banner de recompensas y llevar a la pantalla de beneficios al tocarlo."
}
],
"attrs": {
"localId": "5c6660a0eca2"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "1d7587bc1642"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Pedir y renderizar la lista de beneficios elegibles ("
},
{
"type": "text",
"text": "get_rewards",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ")."
}
],
"attrs": {
"localId": "8da0feac285c"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "1401376641f9"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Cuando el cliente elige un regalo, traer su detalle configurable ("
},
{
"type": "text",
"text": "get_benefit",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ") y dejarlo listo para agregarlo."
}
],
"attrs": {
"localId": "68020ce7202f"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "f6a44b9aa2d8"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Pedir y mostrar el descuento del carrito ("
},
{
"type": "text",
"text": "promotion_preview",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ")."
}
],
"attrs": {
"localId": "247eae8e0fe9"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "c48fc48c4630"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Reenviar correctamente el regalo y el descuento al confirmar la orden",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " ← lo único que sigue requiriendo desarrollo real en el punto de llegada; lo nuevo es que ahora hay desarrollo real también en los puntos 2 y 3."
}
],
"attrs": {
"localId": "188e7d118b05"
}
}
]
}
]
},
{
"type": "blockquote",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Regla general:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " si un campo llega vacío o nulo, la app se comporta "
},
{
"type": "text",
"text": "exactamente como hoy",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " (sin banner, sin regalos, sin descuento). Nunca asumir que están presentes."
}
],
"attrs": {
"localId": "358d1fc83b85"
}
}
],
"attrs": {
"localId": "2dc2242325fe"
}
},
{
"type": "rule",
"attrs": {
"localId": "005dd5761390"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "b1e67ba34695"
},
"content": [
{
"type": "text",
"text": "1. Banner de recompensas"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Endpoint (ya lo consumen para los puntos):",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "GET api/em/fidelization/get_points",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "d02a81b25da8"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El response incluye "
},
{
"type": "text",
"text": "dos",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " campos, sin cambios en su forma:"
}
],
"attrs": {
"localId": "6d9457e4daab"
}
},
{
"type": "codeBlock",
"attrs": {
"localId": "91ea2407-684b-47a6-ad1d-02865e1f0fe5",
"wrap": true
},
"content": [
{
"type": "text",
"text": "{\n \"response\": \"success\",\n \"data\": 23076,\n \"dataExchange\": { \"amount\": \"...\", \"value\": 0 },\n\n \"availablePromotions\": [\n {\n \"id\": 1,\n \"name\": \"Regalo de bienvenida\",\n \"rewards\": [\n {\n \"rewardType\": \"GIFT_PRODUCT\",\n \"materialCode\": \"0001-000000005000001\",\n \"quantity\": 1,\n \"amountType\": null,\n \"amount\": null\n }\n ]\n }\n ],\n\n \"potentialPromotions\": [\n {\n \"id\": 2,\n \"name\": \"Regalo por compra\",\n \"rewards\": [\n {\n \"rewardType\": \"GIFT_PRODUCT\",\n \"materialCode\": \"...\",\n \"quantity\": 1,\n \"amountType\": null,\n \"amount\": null\n }\n ],\n \"missing\": [ { \"attribute\": \"cart.total\", \"operator\": \"gte\", \"value\": \"130\" } ]\n }\n ]\n}\n"
}
]
},
{
"type": "table",
"attrs": {
"isNumberColumnEnabled": false,
"layout": "center",
"localId": "53f7819b-10ff-47c3-9b48-4677e14f8360"
},
"content": [
{
"type": "tableRow",
"attrs": {
"localId": "62fb16fa2755"
},
"content": [
{
"type": "tableHeader",
"attrs": {
"localId": "9382a7b065a2"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Campo"
}
],
"attrs": {
"localId": "0fa4904b3de1"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "836cb5cf1472"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Significado"
}
],
"attrs": {
"localId": "7321ae66abef"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "081c06e6144b"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "657879df224f"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "availablePromotions",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "730340530b0b"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "aa639a590d69"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El cliente "
},
{
"type": "text",
"text": "ya tiene",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " la recompensa"
}
],
"attrs": {
"localId": "a911197d2071"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "b375b3f7e2d2"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "d2d0934563a9"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "potentialPromotions",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "16bd589771a1"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "d76a8499a98b"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Aún no",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " la tiene: le falta cumplir algo ("
},
{
"type": "text",
"text": "missing",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ")"
}
],
"attrs": {
"localId": "c800abc96a76"
}
}
]
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si ambos arrays vienen vacíos → no mostrar banner."
}
],
"attrs": {
"localId": "2827921760c9"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El mensaje depende del ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "rewardType",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", no todas las recompensas son un regalo:",
"marks": [
{
"type": "strong"
}
]
}
],
"attrs": {
"localId": "8616e2906bef"
}
},
{
"type": "table",
"attrs": {
"isNumberColumnEnabled": false,
"layout": "center",
"localId": "13bfc0c2-2bab-4261-81fc-3f5e3738f16f"
},
"content": [
{
"type": "tableRow",
"attrs": {
"localId": "708d282470b8"
},
"content": [
{
"type": "tableHeader",
"attrs": {
"localId": "915dacf29694"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "rewardType",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "33a709d93dee"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "1c521294b518"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Campos relevantes"
}
],
"attrs": {
"localId": "ba82b6cb7bb2"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "b5f16d92920e"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Mensaje"
}
],
"attrs": {
"localId": "318f4dadfd1b"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "e8765011555a"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "dda459e529a1"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "GIFT_PRODUCT",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "2834e887d5d1"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "a876833c5843"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "materialCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "quantity",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "f5132d3194dc"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "f8efeb88982d"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "\"¡Tienes recompensas esperándote!\"",
"marks": [
{
"type": "em"
}
]
},
{
"type": "text",
"text": " / "
},
{
"type": "text",
"text": "\"…y llévate: {name}\"",
"marks": [
{
"type": "em"
}
]
}
],
"attrs": {
"localId": "765c7b4174d1"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "be0156aca9fe"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "efda0b37863b"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "DISCOUNT_ORDER",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "9ef78e0cc803"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "8009adf2f984"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "amountType",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "amount",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "e4ef6513ab0a"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "919aaecbdeda"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "\"…y obtén {amount}% de descuento\"",
"marks": [
{
"type": "em"
}
]
},
{
"type": "text",
"text": " (si "
},
{
"type": "text",
"text": "amountType === \"P\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ") o "
},
{
"type": "text",
"text": "\"C$ {amount} de descuento\"",
"marks": [
{
"type": "em"
}
]
},
{
"type": "text",
"text": " (si "
},
{
"type": "text",
"text": "amountType === \"A\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ")"
}
],
"attrs": {
"localId": "f490a48481e1"
}
}
]
}
]
}
]
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "5935b2b6d672"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "amountType",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ": "
},
{
"type": "text",
"text": "\"P\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " = porcentaje, ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "\"A\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " = monto fijo",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " ("
},
{
"type": "text",
"text": "A",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " de "
},
{
"type": "text",
"text": "amount",
"marks": [
{
"type": "em"
}
]
},
{
"type": "text",
"text": "). Viene "
},
{
"type": "text",
"text": "null",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " cuando la recompensa es un regalo. No hay otros valores."
}
],
"attrs": {
"localId": "b00a90e42c00"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "83ec37e276ff"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si el "
},
{
"type": "text",
"text": "rewardType",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " no es ninguno de esos dos, "
},
{
"type": "text",
"text": "ignorar ese elemento",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " (aún no se aplican, ver alcance)."
}
],
"attrs": {
"localId": "442a07443205"
}
}
]
}
],
"attrs": {
"localId": "807006e517b9"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sobre ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "potentialPromotions",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ":",
"marks": [
{
"type": "strong"
}
]
}
],
"attrs": {
"localId": "50fc607d3fd8"
}
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "35cd54774464"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Cada elemento trae "
},
{
"type": "text",
"text": "missing",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ": "
},
{
"type": "text",
"text": "qué le falta",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " al cliente para ganar esa recompensa."
}
],
"attrs": {
"localId": "e789efab78ae"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "9e6cc8023984"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Hoy solo hay que interpretar "
},
{
"type": "text",
"text": "missing.attribute === \"cart.total\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (monto mínimo de compra). El "
},
{
"type": "text",
"text": "value",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " es el monto."
}
],
"attrs": {
"localId": "811bec898fc9"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "345ca44d9b5c"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si el "
},
{
"type": "text",
"text": "missing",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " es de otro atributo que no se sabe interpretar, "
},
{
"type": "text",
"text": "ignorar ese elemento",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "3ad9059a8c7f"
}
}
]
}
],
"attrs": {
"localId": "b60631816303"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "No requiere llamadas nuevas.",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " Los dos campos viajan en la misma respuesta de puntos."
}
],
"attrs": {
"localId": "c2ac59799bde"
}
},
{
"type": "heading",
"attrs": {
"level": 3,
"localId": "022ade17f28a"
},
"content": [
{
"type": "text",
"text": "Nuevo: el banner ya no es solo informativo"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Al tocar el banner (no el botón de cerrar), la app debe "
},
{
"type": "text",
"text": "navegar a la pantalla de beneficios",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " (sección 2). El banner y la pestaña de beneficios leen endpoints distintos con contexto distinto — "
},
{
"type": "text",
"text": "get_points",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " se evalúa sin tienda ni modalidad, "
},
{
"type": "text",
"text": "get_rewards",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " se evalúa "
},
{
"type": "text",
"text": "con",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "storeId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "/"
},
{
"type": "text",
"text": "officeCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "/"
},
{
"type": "text",
"text": "pickup",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " — así que pueden legítimamente no coincidir: una promoción visible en el banner puede depender de una tienda o modalidad que el cliente todavía no eligió, y no aparecer en la lista de la pantalla de beneficios. Si eso pasa (pantalla de beneficios sin regalos elegibles y sin avisos), mostrar un mensaje que invite a cambiar de tienda/modalidad, nunca una pantalla vacía sin explicación."
}
],
"attrs": {
"localId": "a833be66b11a"
}
},
{
"type": "rule",
"attrs": {
"localId": "7ac47551988a"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "9100118f721b"
},
"content": [
{
"type": "text",
"text": "2. Pantalla de beneficios: listar las recompensas elegibles"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Endpoint NUEVO:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "POST api/em/fidelization/get_rewards",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "f76d600b20d4"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Guard:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "JwtMarketGuard",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " — el mismo que usa "
},
{
"type": "text",
"text": "get_points",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (requiere JWT válido con "
},
{
"type": "text",
"text": "group: 'CSM'",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "; si no, "
},
{
"type": "text",
"text": "USER_UNAUTHORIZED",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ")."
}
],
"attrs": {
"localId": "459205713bdf"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Body:"
}
],
"attrs": {
"localId": "eb9b1b2e32f7"
}
},
{
"type": "codeBlock",
"attrs": {
"localId": "4271b38b-b3f5-4e32-afd2-6c4b5da07b15",
"wrap": true
},
"content": [
{
"type": "text",
"text": "{\n \"userid\": 55,\n \"storeId\": 12,\n \"officeCode\": \"OFC-A\",\n \"pickup\": \"PD\"\n}\n"
}
]
},
{
"type": "table",
"attrs": {
"isNumberColumnEnabled": false,
"layout": "center",
"localId": "10a4ded8-f83b-4501-bb4b-acd8205fdd26"
},
"content": [
{
"type": "tableRow",
"attrs": {
"localId": "4e2b340715ec"
},
"content": [
{
"type": "tableHeader",
"attrs": {
"localId": "57d9abe9bb4f"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Campo"
}
],
"attrs": {
"localId": "0169e22c17c7"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "2e087cbaab1a"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Tipo"
}
],
"attrs": {
"localId": "384ff20a7e50"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "c5ae9a739bc6"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Obligatorio"
}
],
"attrs": {
"localId": "0d89103adcdc"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "a1d06a227c86"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Significado"
}
],
"attrs": {
"localId": "2c6a7a34fd46"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "5217fcafc3f5"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "3147f410f8eb"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "userid",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "7c0ab1bd74d7"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "57a6babac692"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "number"
}
],
"attrs": {
"localId": "f0b576b3291e"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "083cf668a2e6"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "No (advisory)"
}
],
"attrs": {
"localId": "de4edbcb4702"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "cb4e629f67f0"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si lo mandás, se valida contra el "
},
{
"type": "text",
"text": "bp_id",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " del JWT — si no coinciden, "
},
{
"type": "text",
"text": "USER_UNAUTHORIZED",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ". El JWT manda siempre, "
},
{
"type": "text",
"text": "userid",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " es solo una verificación extra."
}
],
"attrs": {
"localId": "583c78c76f77"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "a8c017b18c23"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "6147adfaca8d"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "storeId",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "dea1841fb10b"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "f75cbbf2fe2d"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "number"
}
],
"attrs": {
"localId": "2f8f7f41267d"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "88a25dcb8bfc"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Condicional (ver abajo)"
}
],
"attrs": {
"localId": "a0a1e31ac9ab"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "6ef8cb9f2992"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "BusinessPartnerAddress.id",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " — el identificador de tienda que usa el motor de promociones para evaluar reglas acotadas por tienda."
}
],
"attrs": {
"localId": "3a5ce39822f4"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "b2df706011c3"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "8fd218e3941b"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "officeCode",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "c9c09ff655a1"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "a3e7ee8a6ce7"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "string"
}
],
"attrs": {
"localId": "22ca02953959"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "d33741945cad"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sí, siempre que el motor esté habilitado",
"marks": [
{
"type": "strong"
}
]
}
],
"attrs": {
"localId": "c8cfae45a3ce"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "f9fe646c1aa0"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Office.code",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " — el identificador que usa el catálogo de materiales para resolver precios/adicionales de la tienda."
}
],
"attrs": {
"localId": "77ca20f08082"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "9f959af709de"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "d925a72be969"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "pickup",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "9c6a68c7ab96"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "91fbc140adf7"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "string"
}
],
"attrs": {
"localId": "843eff587a25"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "28aedeade471"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sí, siempre que el motor esté habilitado",
"marks": [
{
"type": "strong"
}
]
}
],
"attrs": {
"localId": "e835a6894546"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "99a7a0fe7059"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Modalidad ("
},
{
"type": "text",
"text": "PD",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "RC",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", …), la misma que ya se manda a "
},
{
"type": "text",
"text": "shopping_bag/get",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "e3b61164634e"
}
}
]
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "storeId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " y ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "officeCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " NO son intercambiables.",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " Son dos identificadores distintos para la misma tienda: "
},
{
"type": "text",
"text": "storeId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " es lo que el motor de promociones usa para decidir si una recompensa aplica ahí; "
},
{
"type": "text",
"text": "officeCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " es lo que el catálogo de materiales usa para resolver precio y adicionales de esa tienda. Mandar el "
},
{
"type": "text",
"text": "officeCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " en el campo "
},
{
"type": "text",
"text": "storeId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (o viceversa) no da un error explícito — simplemente hace que el motor o el catálogo evalúen mal, con resultados silenciosamente incorrectos. Ejemplo: para la tienda \"Metrocentro\", el "
},
{
"type": "text",
"text": "officeCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " puede ser "
},
{
"type": "text",
"text": "\"OFC-A\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " mientras que su "
},
{
"type": "text",
"text": "storeId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (la dirección comercial asociada) es "
},
{
"type": "text",
"text": "12",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " — son dos valores con formatos distintos (string vs. number) y hay que mandar cada uno en su campo."
}
],
"attrs": {
"localId": "c3f8276cb05b"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "⚠️ ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "officeCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " y ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "pickup",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " son obligatorios, pero solo si el motor de promociones está habilitado.",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " El orden real de validación en el servidor es:"
}
],
"attrs": {
"localId": "1fbf11e5c8ca"
}
},
{
"type": "orderedList",
"attrs": {
"order": 1,
"localId": "9351a1fccb85"
},
"content": [
{
"type": "listItem",
"attrs": {
"localId": "111b09dc1408"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si mandaste "
},
{
"type": "text",
"text": "userid",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", se valida contra el JWT ("
},
{
"type": "text",
"text": "USER_UNAUTHORIZED",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " si no coincide)."
}
],
"attrs": {
"localId": "484a59eefcac"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "43d97fb9c3b0"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si el motor de promociones está "
},
{
"type": "text",
"text": "deshabilitado",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " ("
},
{
"type": "text",
"text": "PROMOTION_ENGINE_ENABLED",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " apagado), el endpoint devuelve "
},
{
"type": "text",
"text": "{ \"rewards\": [], \"notices\": [] }",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " de inmediato — "
},
{
"type": "text",
"text": "sin validar ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "officeCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "/",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "pickup",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " en absoluto",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "151c03eb2b00"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "d0078651a31d"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Solo si el motor está "
},
{
"type": "text",
"text": "habilitado",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ", faltar "
},
{
"type": "text",
"text": "officeCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " o "
},
{
"type": "text",
"text": "pickup",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " lanza "
},
{
"type": "text",
"text": "VALIDATION_ERROR",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " ("
},
{
"type": "text",
"text": "400",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "), "
},
{
"type": "text",
"text": "antes de evaluar nada más",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ", incluso si "
},
{
"type": "text",
"text": "storeId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " no vino."
}
],
"attrs": {
"localId": "879b84d7e268"
}
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "En la práctica: mandá siempre "
},
{
"type": "text",
"text": "officeCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " y "
},
{
"type": "text",
"text": "pickup",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " cuando llames a este endpoint (igual que ya hacés al armar el carrito). Si no los mandás y el motor está activo en producción, vas a recibir un "
},
{
"type": "text",
"text": "400",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " sin ningún otro dato — la causa más fácil de terminar con una pantalla vacía sin explicación."
}
],
"attrs": {
"localId": "44696404ae20"
}
},
{
"type": "heading",
"attrs": {
"level": 3,
"localId": "96367723cbb5"
},
"content": [
{
"type": "text",
"text": "Respuesta"
}
]
},
{
"type": "codeBlock",
"attrs": {
"localId": "919598f6-8577-40bd-893f-fafcf70d75bb",
"wrap": true
},
"content": [
{
"type": "text",
"text": "{\n \"rewards\": [\n {\n \"promotionId\": 1,\n \"promotionName\": \"Regalo de bienvenida\",\n \"materialCode\": \"0001-000000005000001\",\n \"name\": \"Whopper Combo Pequeño\",\n \"quantity\": 1,\n \"images\": [\n { \"fileName\": \"whopper.jpg\", \"displayName\": \"Whopper\", \"position\": 0 }\n ],\n \"referencePrice\": 130,\n \"tax\": 15\n }\n ],\n \"notices\": [\n { \"promotionId\": 3, \"promotionName\": \"Envío gratis por tu cumpleaños\", \"rewardType\": \"FREE_DELIVERY\" }\n ]\n}\n"
}
]
},
{
"type": "table",
"attrs": {
"isNumberColumnEnabled": false,
"layout": "center",
"localId": "a6de39b4-eef6-47bd-8c08-561fdaf20e97"
},
"content": [
{
"type": "tableRow",
"attrs": {
"localId": "c776ca6d3708"
},
"content": [
{
"type": "tableHeader",
"attrs": {
"localId": "d44a7e39ed1d"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Campo"
}
],
"attrs": {
"localId": "8e9b5397d1cc"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "76e90d4c4a18"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Tipo"
}
],
"attrs": {
"localId": "722c0c852b77"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "f1d1f7e10f7c"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Significado"
}
],
"attrs": {
"localId": "65259eeef03e"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "17132cdadb75"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "a8e10989db8d"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "rewards",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "bff6fee4b5df"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "a46068f4d472"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "PickableReward[]",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "666839be9739"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "843f55833550"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Regalos que el cliente puede "
},
{
"type": "text",
"text": "elegir",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ". Solo "
},
{
"type": "text",
"text": "GIFT_PRODUCT",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " aparece acá."
}
],
"attrs": {
"localId": "5c350dae70a9"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "601e7351451c"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "7bf68ee7ff6a"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "notices",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "f08a5eea027a"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "d0c98056b29b"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "RewardNotice[]",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "fb7e8f2bc1d2"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "422b52e6b54a"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Beneficios "
},
{
"type": "text",
"text": "automáticos",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ", no elegibles: "
},
{
"type": "text",
"text": "DISCOUNT_ORDER",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " y "
},
{
"type": "text",
"text": "FREE_DELIVERY",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "c19adf4ba8b9"
}
}
]
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "PickableReward",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ":",
"marks": [
{
"type": "strong"
}
]
}
],
"attrs": {
"localId": "9cfc8573b756"
}
},
{
"type": "table",
"attrs": {
"isNumberColumnEnabled": false,
"layout": "center",
"localId": "ab1ec26e-1178-4481-9a87-31cfda652dbe"
},
"content": [
{
"type": "tableRow",
"attrs": {
"localId": "e3f98f960836"
},
"content": [
{
"type": "tableHeader",
"attrs": {
"localId": "e096588123f2"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Campo"
}
],
"attrs": {
"localId": "d8512d57877b"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "e504652355d1"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Tipo"
}
],
"attrs": {
"localId": "f13a3c57773e"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "aff5c86736c8"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Notas"
}
],
"attrs": {
"localId": "e3f25f902829"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "714e1443407e"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "ae8af77cdc74"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "promotionId",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "c457ba52da61"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "ffb602f83c05"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "number"
}
],
"attrs": {
"localId": "467cc765f5de"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "bf4c2e83b1eb"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Guardalo: lo vas a necesitar tal cual al confirmar la orden (sección 5)."
}
],
"attrs": {
"localId": "27b4331745b4"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "8c157e8b08ff"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "dbc98895a988"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "promotionName",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "4a42c87ea76f"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "b04652454713"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "string"
}
],
"attrs": {
"localId": "0521cd0e38f1"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "858c534eab61"
},
"content": [
{
"type": "paragraph",
"attrs": {
"localId": "e313ce841d88"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "53f323474ef6"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "3893333b0eee"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "materialCode",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "34e221cd4588"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "df914ee3da6e"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "string"
}
],
"attrs": {
"localId": "9ec8a7d7a40c"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "68831f42ce33"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Código del producto de regalo."
}
],
"attrs": {
"localId": "811831e1e7f7"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "a35991dbb197"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "59e0650670a9"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "name",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "6706e15710a2"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "a0ad3e16d497"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "string"
}
],
"attrs": {
"localId": "3e0d34c0506d"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "a9695cae04b9"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Nombre del producto."
}
],
"attrs": {
"localId": "fdbce5d4c0fb"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "c44d9467d152"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "b2b0ad4bf321"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "quantity",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "9c1358beb692"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "95d2d964db36"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "number"
}
],
"attrs": {
"localId": "2bc1ef0e0f7e"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "891d1e85ff66"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Cantidad que otorga la promoción — es el tope; no se puede pedir más."
}
],
"attrs": {
"localId": "b8c7634bdfe7"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "ac599358885e"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "0812f4a8b7f1"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "images",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "0cf69005eb5d"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "c2dc3b391ae8"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "array"
}
],
"attrs": {
"localId": "5e6c8fdba018"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "871f62da6b65"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Mismo shape que las imágenes de un producto normal ("
},
{
"type": "text",
"text": "fileName",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "displayName",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "position",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ")."
}
],
"attrs": {
"localId": "6d37aad0af7e"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "b9318f8fef5a"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "1eed4c626bb8"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "referencePrice",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "ed62400c819a"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "899478238177"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "number | null"
}
],
"attrs": {
"localId": "ffc7712f917b"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "f8a07f44659a"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Precio de lista del producto, "
},
{
"type": "text",
"text": "solo informativo",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " (para mostrar \"ahorrás C$ X\"). Puede venir "
},
{
"type": "text",
"text": "null",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " si el material no tiene precio de lista activo. El precio real que se cobra siempre es "
},
{
"type": "text",
"text": "0",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "6295b1ad1a0a"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "b2c7026867c8"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "22bc8bdb699f"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "tax",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "f3974c7e5917"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "e1ce4cb28fff"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "number"
}
],
"attrs": {
"localId": "bdb42d9eddd9"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "df1b8d43f804"
},
"content": [
{
"type": "paragraph",
"attrs": {
"localId": "e82b594336d7"
}
}
]
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "RewardNotice",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ":",
"marks": [
{
"type": "strong"
}
]
}
],
"attrs": {
"localId": "a5f8127d96f8"
}
},
{
"type": "table",
"attrs": {
"isNumberColumnEnabled": false,
"layout": "center",
"localId": "b0109723-ab93-48b0-a2e5-367ced60e27d"
},
"content": [
{
"type": "tableRow",
"attrs": {
"localId": "4ef8d0e6fdc6"
},
"content": [
{
"type": "tableHeader",
"attrs": {
"localId": "f21bc81fe810"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Campo"
}
],
"attrs": {
"localId": "5922b4900ad3"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "955388289950"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Tipo"
}
],
"attrs": {
"localId": "2c193f05b8a8"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "1185a614166d"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Notas"
}
],
"attrs": {
"localId": "af7c09129c8f"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "53c7dccb9c7b"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "0766279f2528"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "promotionId",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "a27332c0fa2a"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "4f2486aa9a25"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "number"
}
],
"attrs": {
"localId": "7d913c317c28"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "0ce7c80f25f9"
},
"content": [
{
"type": "paragraph",
"attrs": {
"localId": "105bccbed7f5"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "0d0722cea708"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "98ad95836c21"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "promotionName",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "9a5702b59e1d"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "3b8c74e58b75"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "string"
}
],
"attrs": {
"localId": "1b3761669c64"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "a64c2ba75d45"
},
"content": [
{
"type": "paragraph",
"attrs": {
"localId": "a73b9819f558"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "0184000ab2e2"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "bdd49015fcf9"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "rewardType",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "0919a7905d18"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "468afe97bdba"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "\"DISCOUNT_ORDER\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " | "
},
{
"type": "text",
"text": "\"FREE_DELIVERY\"",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "9dcf50d41d56"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "470674c76353"
},
"content": [
{
"type": "paragraph",
"attrs": {
"localId": "93a166ff85d6"
}
}
]
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Importante: ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "RewardNotice",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " NO trae ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "amount",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " ni ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "amountType",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ".",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " A diferencia del banner (sección 1), acá no hay monto calculado — solo el nombre de la promoción. El monto real del descuento sigue viniendo únicamente de "
},
{
"type": "text",
"text": "promotion_preview",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (sección 4). El mensaje para un "
},
{
"type": "text",
"text": "notice",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " tiene que ser genérico, del tipo "
},
{
"type": "text",
"text": "\"también tenés activo: {promotionName}\"",
"marks": [
{
"type": "em"
}
]
},
{
"type": "text",
"text": ", sin inventar un porcentaje o monto que el endpoint no manda."
}
],
"attrs": {
"localId": "2a123ed554d8"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sobre el ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "notice",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " de ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "FREE_DELIVERY",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ":",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " puede aparecer en la lista aunque "
},
{
"type": "text",
"text": "FREE_DELIVERY",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " siga fuera de alcance de esta fase (ver el encabezado del documento). Mostralo como texto informativo, igual que "
},
{
"type": "text",
"text": "DISCOUNT_ORDER",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", pero "
},
{
"type": "text",
"text": "no",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " intentes aplicarlo ni calcular nada con él todavía."
}
],
"attrs": {
"localId": "e2be9384858e"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Alcance de ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "rewards",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ":",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " solo aparecen recompensas de tipo "
},
{
"type": "text",
"text": "GIFT_PRODUCT",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ". Si el material del regalo tiene un grupo de adicionales obligatorio y ninguna de sus opciones cuesta cero en esa tienda ("
},
{
"type": "text",
"text": "storeId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "), la recompensa "
},
{
"type": "text",
"text": "se filtra y no aparece en la lista",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " — nunca vas a recibir un regalo que no se pueda configurar sin costo."
}
],
"attrs": {
"localId": "6fda9eee6ca4"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Este endpoint nunca rompe la pantalla:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " si el motor de promociones falla internamente, la respuesta es "
},
{
"type": "text",
"text": "{ \"rewards\": [], \"notices\": [] }",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", nunca un error 500. Los únicos errores esperados son "
},
{
"type": "text",
"text": "USER_UNAUTHORIZED",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (userid no coincide con el JWT) y "
},
{
"type": "text",
"text": "VALIDATION_ERROR",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (falta "
},
{
"type": "text",
"text": "officeCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "/"
},
{
"type": "text",
"text": "pickup",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " con el motor habilitado)."
}
],
"attrs": {
"localId": "c03a30ac2f6b"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Cuándo llamarlo:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " al entrar a la pantalla de beneficios, y de nuevo cada vez que el cliente cambie de tienda o modalidad (los resultados dependen de "
},
{
"type": "text",
"text": "storeId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "/"
},
{
"type": "text",
"text": "officeCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "/"
},
{
"type": "text",
"text": "pickup",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ")."
}
],
"attrs": {
"localId": "c2324525090f"
}
},
{
"type": "rule",
"attrs": {
"localId": "e6da662e6da1"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "94fd4777a425"
},
"content": [
{
"type": "text",
"text": "3. Configurar el regalo elegido"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Endpoint NUEVO:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "GET api/em/material/get_benefit/:code/:type/:office/:storeId",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "7969bf4aef22"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Parámetros de ruta, en este orden exacto:"
}
],
"attrs": {
"localId": "57407dfa8690"
}
},
{
"type": "table",
"attrs": {
"isNumberColumnEnabled": false,
"layout": "center",
"localId": "44d766e6-94eb-4d17-9d3b-70c9cc244616"
},
"content": [
{
"type": "tableRow",
"attrs": {
"localId": "587e5b80798c"
},
"content": [
{
"type": "tableHeader",
"attrs": {
"localId": "ab7ff9efb5d5"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Posición"
}
],
"attrs": {
"localId": "121ef06026f1"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "215891f55312"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Parámetro"
}
],
"attrs": {
"localId": "3753e9eecc94"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "1bd385cb5dd6"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Ejemplo"
}
],
"attrs": {
"localId": "3d57bdfa5212"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "a55dfa6ffca4"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Origen"
}
],
"attrs": {
"localId": "a13c06761c5e"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "70236a121765"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "9b11a38dcca4"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "1"
}
],
"attrs": {
"localId": "7336c0c00c8d"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "5503d855669e"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "code",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "7c3fdf53b5f2"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "82a8bef79d47"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "0001-000000005000001",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "b697652edbf4"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "4bec4f9518ad"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "materialCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " de la "
},
{
"type": "text",
"text": "PickableReward",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " elegida"
}
],
"attrs": {
"localId": "7892ca8f541a"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "ad50db539822"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "ec1b44a03e2d"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "2"
}
],
"attrs": {
"localId": "13a7575a5387"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "36b61c8049a0"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "type",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "5b1983d98e06"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "ed0a57924684"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "PD",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "6395b8329cef"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "f6f9c44f93ec"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "La misma modalidad ("
},
{
"type": "text",
"text": "pickup",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ") que ya usás para todo lo demás"
}
],
"attrs": {
"localId": "893a8d286122"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "7ba2f6e6c004"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "85eed562a634"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "3"
}
],
"attrs": {
"localId": "05624af00626"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "49c7c4375c81"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "office",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "b3d6b242dbdc"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "5f2e30289224"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "OFC-A",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "29f7c4dc5548"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "023ed5b8a98c"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El mismo "
},
{
"type": "text",
"text": "officeCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " de la sección 2"
}
],
"attrs": {
"localId": "05e8a4a428fd"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "40849d2b8583"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "da9ebe923cef"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "4"
}
],
"attrs": {
"localId": "594d29e20cc9"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "cd542d060bd4"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "storeId",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "a1073235676f"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "33a7975ae3cf"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "12",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "90092418b44e"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "d7367179b029"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El mismo "
},
{
"type": "text",
"text": "storeId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " de la sección 2"
}
],
"attrs": {
"localId": "18e02397ac62"
}
}
]
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Ejemplo de llamada: "
},
{
"type": "text",
"text": "GET api/em/material/get_benefit/0001-000000005000001/PD/OFC-A/12",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "a8a2f9034539"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Qué devuelve:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " el mismo shape que el detalle de producto normal ("
},
{
"type": "text",
"text": "GET api/em/material/get/:code/:type/:office",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", el que ya consumen), pero "
},
{
"type": "text",
"text": "sin ninguna opción adicional que tenga costo en esa tienda",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ". Los adicionales sin costo ("
},
{
"type": "text",
"text": "isAditionalPrice !== '1'",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", o con precio "
},
{
"type": "text",
"text": "0",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " para ese "
},
{
"type": "text",
"text": "storeId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " específico) se mantienen; los que tienen costo se eliminan del grupo."
}
],
"attrs": {
"localId": "060ca54f9cee"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Por qué se filtran los adicionales con costo:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " la línea de regalo tiene que llegar a la orden con "
},
{
"type": "text",
"text": "price",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "y",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "subTotal",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " en exactamente "
},
{
"type": "text",
"text": "0",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (ver sección 5). Si la app dejara elegir un adicional que cuesta algo, el subtotal dejaría de ser cero y el servidor rechazaría la orden completa con "
},
{
"type": "text",
"text": "ORDER_GIFT_NOT_APPLICABLE",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ". El precio de los adicionales es por tienda, por eso el parámetro "
},
{
"type": "text",
"text": "storeId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " es obligatorio acá también."
}
],
"attrs": {
"localId": "1b12784f598c"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Un grupo de adicionales obligatorio sin ninguna opción sin costo nunca llega a esta pantalla",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ", porque esa recompensa ya fue excluida del listado en "
},
{
"type": "text",
"text": "get_rewards",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (sección 2). Si igual llegás a este endpoint con un "
},
{
"type": "text",
"text": "materialCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " que no vino de un "
},
{
"type": "text",
"text": "reward",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " de la lista, no hay garantía de ese filtrado previo — usá siempre un "
},
{
"type": "text",
"text": "code",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " que salió de "
},
{
"type": "text",
"text": "get_rewards",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "838516e86200"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Qué hacer con la respuesta:",
"marks": [
{
"type": "strong"
}
]
}
],
"attrs": {
"localId": "927331751510"
}
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "0f1eb402d7ce"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Renderizar la pantalla de configuración igual que un producto normal (mismo shape), pero forzando "
},
{
"type": "text",
"text": "precio y subtotal en ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "0",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " sin importar lo que traiga el material — no confiar en que el backend ya lo puso en cero para todos los casos, es responsabilidad de la app fijarlo antes de mandarlo (defensa en profundidad; el servidor igual lo revalida al confirmar la orden)."
}
],
"attrs": {
"localId": "0f9ba3daa7d2"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "439b7231f435"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si el material tiene un grupo de adicionales "
},
{
"type": "text",
"text": "opcional",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " (no obligatorio), el cliente puede elegir cero opciones sin que eso bloquee nada."
}
],
"attrs": {
"localId": "08cdbfbef8c9"
}
}
]
}
],
"attrs": {
"localId": "cead21df8460"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Qué NO hacer todavía:",
"marks": [
{
"type": "strong"
}
]
}
],
"attrs": {
"localId": "b96cd3a8ce55"
}
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "df1d745921dd"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "La app "
},
{
"type": "text",
"text": "no",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " debe agregar el regalo al carrito por su cuenta ni automáticamente: solo después de que el cliente complete esta configuración explícitamente."
}
],
"attrs": {
"localId": "d8049b5145a5"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "b650baa40f36"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "La app "
},
{
"type": "text",
"text": "no",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " debe llamar a este endpoint sin haber pasado antes por "
},
{
"type": "text",
"text": "get_rewards",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " — necesita "
},
{
"type": "text",
"text": "officeCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " y "
},
{
"type": "text",
"text": "storeId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", que salen de ese contexto."
}
],
"attrs": {
"localId": "982a111bafea"
}
}
]
}
],
"attrs": {
"localId": "d333a8bf613b"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "De acá en adelante hasta la orden:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " el modelo de datos que necesitás para armar la línea de regalo al confirmar la orden (sección 5) ya está completo con lo que tenés de "
},
{
"type": "text",
"text": "get_rewards",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " ("
},
{
"type": "text",
"text": "promotionId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "materialCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "quantity",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ") y de este endpoint (nombre, imágenes, adicionales sin costo). "
},
{
"type": "text",
"text": "No dependas del carrito para recuperar esos datos más tarde:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "POST api/em/shopping_bag/get",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " ya no enriquece nada — es un "
},
{
"type": "text",
"text": "passthrough",
"marks": [
{
"type": "em"
}
]
},
{
"type": "text",
"text": " puro de lo que esté realmente persistido (ver la advertencia de la sección \"Qué cambió\"). Si tu app decide guardar una fila de regalo en el carrito para mostrarla en el resumen antes de pagar (llamando a "
},
{
"type": "text",
"text": "POST api/em/shopping_bag/set",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", el mismo endpoint que ya usás para productos normales), sos vos quien tiene que construir el "
},
{
"type": "text",
"text": "material_json",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " con "
},
{
"type": "text",
"text": "isPromotion",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "typePromotion: 3",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " y "
},
{
"type": "text",
"text": "promotionId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " adentro — el servidor no se los agrega. Mantené esos tres valores (más "
},
{
"type": "text",
"text": "promotionId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "materialCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " y "
},
{
"type": "text",
"text": "quantity",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ") en el estado de la app desde que el cliente elige el regalo hasta que confirma la orden, sin importar si además lo persistís como fila de carrito."
}
],
"attrs": {
"localId": "4d9361924106"
}
},
{
"type": "rule",
"attrs": {
"localId": "dcc92e83677d"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "9a84c655dfbb"
},
"content": [
{
"type": "text",
"text": "4. Descuento en el carrito"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Endpoint:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "POST api/em/shopping_bag/promotion_preview",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "7fde1f85b072"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Mismo payload que "
},
{
"type": "text",
"text": "shopping_bag/get",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ":"
}
],
"attrs": {
"localId": "7eebbf03218e"
}
},
{
"type": "codeBlock",
"attrs": {
"localId": "acfbdd90-af66-4d03-817c-927d73c3cc6b",
"wrap": true
},
"content": [
{
"type": "text",
"text": "{ \"userid\": 55, \"providerid\": 1, \"pickup\": \"PD\", \"storeId\": 12 }\n"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "storeId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " es "
},
{
"type": "text",
"text": "opcional",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " (mandarlo si la modalidad es retiro en tienda; hay promociones acotadas por tienda)."
}
],
"attrs": {
"localId": "9866faec4a68"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Respuesta:"
}
],
"attrs": {
"localId": "0bb6715e26c6"
}
},
{
"type": "codeBlock",
"attrs": {
"localId": "148b4c5f-bc6a-4bab-9cb0-3be894ab0c02",
"wrap": true
},
"content": [
{
"type": "text",
"text": "{ \"discount\": { \"amount\": 26.00, \"promotionId\": 3, \"promotionName\": \"Descuento de cumpleaños\" } }\n"
}
]
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "ed6eaae4bf54"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "La respuesta "
},
{
"type": "text",
"text": "no viene envuelta",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " en el sobre "
},
{
"type": "text",
"text": "{response, data}",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " de los otros endpoints: es el objeto tal cual."
}
],
"attrs": {
"localId": "50ce447a8edc"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "8173804d57a1"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si no aplica ningún descuento → "
},
{
"type": "text",
"text": "{ \"discount\": null }",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ". También devuelve "
},
{
"type": "text",
"text": "{ \"discount\": null }",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " ante cualquier error interno (nunca rompe el carrito)."
}
],
"attrs": {
"localId": "4ff6e07440be"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "e1b07aba02dd"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El "
},
{
"type": "text",
"text": "amount",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "ya viene calculado y en moneda",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " (si era porcentaje o monto fijo ya está resuelto, y topeado al total del carrito). La app "
},
{
"type": "text",
"text": "no calcula nada",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "1fd5458791c9"
}
}
]
}
],
"attrs": {
"localId": "fe40ffa1ccfb"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Cuándo llamarlo:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " al cargar/refrescar el carrito (después de "
},
{
"type": "text",
"text": "shopping_bag/get",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "). Es no bloqueante: si falla, mostrar el carrito sin descuento."
}
],
"attrs": {
"localId": "9133f7cb1837"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Regla de negocio (importante):",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " el descuento del motor "
},
{
"type": "text",
"text": "NO se acumula",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " con el del cupón. "
},
{
"type": "text",
"text": "Gana el mayor",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " de los dos:"
}
],
"attrs": {
"localId": "8f55a7bfc745"
}
},
{
"type": "codeBlock",
"attrs": {
"localId": "dcb4d0ce-b8fc-4241-992b-0b53393fe7ac",
"wrap": true
},
"content": [
{
"type": "text",
"text": "descuentoFinal = max(descuentoDelCupon, discount.amount)\n"
}
]
},
{
"type": "blockquote",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "⚠️ "
},
{
"type": "text",
"text": "Esta regla es responsabilidad de la app.",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " El servidor "
},
{
"type": "text",
"text": "no",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " la verifica cuando la orden lleva cupón o puntos: en ese caso no compara contra el motor y acepta el "
},
{
"type": "text",
"text": "discount",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " que se le mande. Si la app suma los dos descuentos, la orden "
},
{
"type": "text",
"text": "se crea igual",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " y la diferencia la paga el negocio. El único caso en que el servidor topea el descuento es cuando "
},
{
"type": "text",
"text": "no",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " hay cupón ni puntos (ver 5.3)."
}
],
"attrs": {
"localId": "fe20510c3e18"
}
}
],
"attrs": {
"localId": "25fcb8e32a70"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Qué hacer:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " mostrar el descuento en el resumen ("
},
{
"type": "text",
"text": "- C$ 26.00",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ") y restarlo del total."
}
],
"attrs": {
"localId": "4586b09f9d81"
}
},
{
"type": "rule",
"attrs": {
"localId": "c4ffcb46c91a"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "3dcbc0d24144"
},
"content": [
{
"type": "text",
"text": "5. Confirmar la orden ← desarrollo real"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Endpoint (ya lo consumen):",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "POST api/em/order/set",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "99b95f6fd949"
}
},
{
"type": "heading",
"attrs": {
"level": 3,
"localId": "878b05a8d3d0"
},
"content": [
{
"type": "text",
"text": "5.1 La línea de regalo en "
},
{
"type": "text",
"text": "detail[]",
"marks": [
{
"type": "code"
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Debe incluir "
},
{
"type": "text",
"text": "estos campos",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ":"
}
],
"attrs": {
"localId": "33c0303e9fdb"
}
},
{
"type": "codeBlock",
"attrs": {
"localId": "07ce08c6-379e-475e-b1d1-bcf4b96d3946",
"wrap": true
},
"content": [
{
"type": "text",
"text": "{\n \"material\": \"0001-000000005000001\",\n \"quantity\": 1,\n \"price\": 0,\n \"subTotal\": 0,\n \"isPromotion\": \"3\",\n \"typePromotion\": 3,\n \"promotionId\": 1\n}\n"
}
]
},
{
"type": "table",
"attrs": {
"isNumberColumnEnabled": false,
"layout": "center",
"localId": "6b336f64-0026-4e61-ab00-af0fcb98a6bc"
},
"content": [
{
"type": "tableRow",
"attrs": {
"localId": "7707e904362f"
},
"content": [
{
"type": "tableHeader",
"attrs": {
"localId": "389b097b55c2"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Campo"
}
],
"attrs": {
"localId": "11a69566960f"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "077f6c2f36df"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Valor"
}
],
"attrs": {
"localId": "64b8099aed5d"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "9dc1d39cca0a"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Obligatorio"
}
],
"attrs": {
"localId": "67ae6b76b078"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "ec84095fcb0c"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "De dónde sale"
}
],
"attrs": {
"localId": "37d97f273b5d"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "42cce0a451c6"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "275baf8a3094"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "isPromotion",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "1d1efbfbd575"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "e0e04dc4efcb"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "\"3\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (string)"
}
],
"attrs": {
"localId": "9598119d3923"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "20269c89041a"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sí"
}
],
"attrs": {
"localId": "6fc7973a0b66"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "24005bd09b00"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Fijo, no viene de ningún endpoint."
}
],
"attrs": {
"localId": "64c7499ab889"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "8594a9fe6c51"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "a879494a5f68"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "typePromotion",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "698e4274f352"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "5719001ad2be"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "3",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (number)"
}
],
"attrs": {
"localId": "f10a0d605a57"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "1eb3e0e00650"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sí"
}
],
"attrs": {
"localId": "9c8db7f4bcde"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "ff3e6230de6f"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Fijo, no viene de ningún endpoint."
}
],
"attrs": {
"localId": "f5c4b5f9ba1b"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "852265189f46"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "15096f4bb1af"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "promotionId",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "3128fc66abe5"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "8efd98dca385"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "el "
},
{
"type": "text",
"text": "promotionId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " que elegiste"
}
],
"attrs": {
"localId": "3ded4c5906a1"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "da16c51473c1"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sí"
}
],
"attrs": {
"localId": "1bd40c9e5ee0"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "5ffb32360118"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "De la "
},
{
"type": "text",
"text": "PickableReward",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " que devolvió "
},
{
"type": "text",
"text": "get_rewards",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (sección 2). "
},
{
"type": "text",
"text": "Ya no sale de una línea del carrito",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " — no existe más."
}
],
"attrs": {
"localId": "79c9e916f0d6"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "48a1992371e4"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "ca6539063252"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "material",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "d1f0020b28d4"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "3f5d8e250bce"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "materialCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " de la reward"
}
],
"attrs": {
"localId": "22d558ee70dd"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "a1802c97b17a"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sí"
}
],
"attrs": {
"localId": "a14e2e3f8584"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "971260f5560f"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Idem."
}
],
"attrs": {
"localId": "27463d5e8557"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "4bc703e2cd19"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "33dcb37871f5"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "quantity",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "f1399336b7f4"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "edacba647324"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "hasta la "
},
{
"type": "text",
"text": "quantity",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " otorgada"
}
],
"attrs": {
"localId": "3f2a716a54c5"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "4fe1832db933"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sí"
}
],
"attrs": {
"localId": "36b10f76ec91"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "2d2c1760944f"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Idem — no pedir más de lo que otorga la promoción."
}
],
"attrs": {
"localId": "2935efbbd65c"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "a6a663d831bd"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "a89657aa3fcd"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "price",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " / "
},
{
"type": "text",
"text": "subTotal",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "d00e2f50737d"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "fafde4d06881"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "0",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "a0896d62db81"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "875bee2c616a"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Sí"
}
],
"attrs": {
"localId": "1eb0e26927a1"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "346f6bc30904"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Fijo."
}
],
"attrs": {
"localId": "3d1e4b941574"
}
}
]
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Las líneas normales no cambian (siguen con "
},
{
"type": "text",
"text": "isPromotion: \"0\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ")."
}
],
"attrs": {
"localId": "f4570e1f00f8"
}
},
{
"type": "blockquote",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Los "
},
{
"type": "text",
"text": "dos",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " campos ("
},
{
"type": "text",
"text": "isPromotion",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " y "
},
{
"type": "text",
"text": "typePromotion",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ") deben ir juntos. Si falta "
},
{
"type": "text",
"text": "isPromotion: \"3\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", el servidor puede tratar la línea como producto normal y rechazarla con "
},
{
"type": "text",
"text": "ORDER_PRODUCT_NO_PRICE",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (por venir en 0) en vez de con el error de regalo."
}
],
"attrs": {
"localId": "6ea8fcee23cc"
}
}
],
"attrs": {
"localId": "d279ac506adb"
}
},
{
"type": "heading",
"attrs": {
"level": 3,
"localId": "c782e9d4a339"
},
"content": [
{
"type": "text",
"text": "5.2 El descuento"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Va en el campo "
},
{
"type": "text",
"text": "discount",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " del payload de la orden (el mismo que ya se usa para cupones), con el monto final aplicado."
}
],
"attrs": {
"localId": "74ce488936c3"
}
},
{
"type": "heading",
"attrs": {
"level": 3,
"localId": "a5e97ee23b97"
},
"content": [
{
"type": "text",
"text": "5.3 Por qué hay que enviarlo exacto"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Al confirmar, el servidor "
},
{
"type": "text",
"text": "vuelve a validar",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " el regalo y el descuento contra los datos reales del pedido (cliente, modalidad, tienda, total) y "
},
{
"type": "text",
"text": "solo acepta lo que realmente corresponde",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ":"
}
],
"attrs": {
"localId": "ab9c5ebc4347"
}
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "48d1756cea31"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Regalo:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " si la línea no corresponde (campos incorrectos, cantidad mayor a la otorgada, precio o subtotal ≠ 0, o el cliente ya no califica) → "
},
{
"type": "text",
"text": "se rechaza la orden completa",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " con "
},
{
"type": "text",
"text": "ORDER_GIFT_NOT_APPLICABLE",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ". Se valida "
},
{
"type": "text",
"text": "siempre",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "dd2f8b1a6ce5"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "99dbb2b016d8"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Descuento:",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " solo se valida cuando la orden "
},
{
"type": "text",
"text": "no",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " lleva cupón, ni puntos, ni promociones del sistema anterior ("
},
{
"type": "text",
"text": "isPromotion",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " 1 o 2). En ese caso, si el "
},
{
"type": "text",
"text": "discount",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " enviado supera el autorizado por el motor → "
},
{
"type": "text",
"text": "se rechaza",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " con "
},
{
"type": "text",
"text": "ORDER_DISCOUNT_NOT_APPLICABLE",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ". Si la orden lleva cupón o puntos, el servidor "
},
{
"type": "text",
"text": "no",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " topea el descuento (ver la advertencia de la sección 4)."
}
],
"attrs": {
"localId": "3f1737ddd481"
}
}
]
}
],
"attrs": {
"localId": "9399c80fe8ce"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Por eso los campos deben viajar tal cual, sin alterarlos: cualquier alteración hace fallar la orden."
}
],
"attrs": {
"localId": "1aeb215c9536"
}
},
{
"type": "rule",
"attrs": {
"localId": "98a84c3768b7"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "a4624282e4df"
},
"content": [
{
"type": "text",
"text": "6. Pago"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "No hay trabajo.",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " El canje se registra automáticamente al confirmar el pago."
}
],
"attrs": {
"localId": "360fb375da2f"
}
},
{
"type": "blockquote",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El canje se registra "
},
{
"type": "text",
"text": "al pagar",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ", no al crear la orden."
}
],
"attrs": {
"localId": "cc1ebdc9527d"
}
}
],
"attrs": {
"localId": "f188a3bf6559"
}
},
{
"type": "rule",
"attrs": {
"localId": "01ded76da59a"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "5efd0f6c3418"
},
"content": [
{
"type": "text",
"text": "Lo que la app NO debe hacer"
}
]
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "fe00f887e9fb"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ Calcular o decidir qué promoción aplica."
}
],
"attrs": {
"localId": "d79e0b0254ee"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "1beebfd99931"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ Asumir que el regalo llega solo en el carrito o en "
},
{
"type": "text",
"text": "shopping_bag/get",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " — "
},
{
"type": "text",
"text": "ya no pasa",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": ", hay que pasar por "
},
{
"type": "text",
"text": "get_rewards",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " → "
},
{
"type": "text",
"text": "get_benefit",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " con una elección explícita del cliente."
}
],
"attrs": {
"localId": "4acda6afb702"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "d6b0157f4408"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ Dejar elegir un adicional con costo en la configuración del regalo ("
},
{
"type": "text",
"text": "get_benefit",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " ya los filtra; no ofrecer opciones fuera de esa respuesta)."
}
],
"attrs": {
"localId": "89dd6ce20bbd"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "65b71a681bb7"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ Llamar a "
},
{
"type": "text",
"text": "get_rewards",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "/"
},
{
"type": "text",
"text": "get_benefit",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " sin "
},
{
"type": "text",
"text": "officeCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "pickup",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " y "
},
{
"type": "text",
"text": "storeId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " resueltos (falla con "
},
{
"type": "text",
"text": "VALIDATION_ERROR",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " si el motor está activo, o simplemente no filtra bien si mezclás "
},
{
"type": "text",
"text": "officeCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " con "
},
{
"type": "text",
"text": "storeId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ")."
}
],
"attrs": {
"localId": "e22c129777ed"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "deab3d66ac60"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ Calcular el monto del descuento (viene calculado)."
}
],
"attrs": {
"localId": "3a7b79f5c5ed"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "3786a0191504"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ Acumular el descuento con el del cupón (gana el mayor)."
}
],
"attrs": {
"localId": "e5d450ef0965"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "c7e06759b406"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ Modificar precio/cantidad del regalo, o pedir más "
},
{
"type": "text",
"text": "quantity",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " de la que otorga la "
},
{
"type": "text",
"text": "PickableReward",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "30088f7b43cd"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "d51f70d9a5dc"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ Inventar un monto para un "
},
{
"type": "text",
"text": "notice",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " ("
},
{
"type": "text",
"text": "DISCOUNT_ORDER",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "/"
},
{
"type": "text",
"text": "FREE_DELIVERY",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ") que no lo trae — solo mostrar el nombre."
}
],
"attrs": {
"localId": "67a2eab814d0"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "bc51cadaae6d"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "❌ Asumir que el regalo, el descuento o los avisos siempre están."
}
],
"attrs": {
"localId": "7c61c9bcca94"
}
}
]
}
],
"attrs": {
"localId": "26bd25f956f8"
}
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Si la app \"ayuda\", la orden se rechaza."
}
],
"attrs": {
"localId": "21abcd280766"
}
},
{
"type": "rule",
"attrs": {
"localId": "8126d3e2f9d3"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "a400f01b094f"
},
"content": [
{
"type": "text",
"text": "Criterios de aceptación"
}
]
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"attrs": {
"localId": "dd7a52a7f905"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": " Con "
},
{
"type": "text",
"text": "availablePromotions",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " no vacío, se muestra el banner con el nombre de la recompensa."
}
],
"attrs": {
"localId": "88cd494359d3"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "027fe8fc57fc"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": " Con "
},
{
"type": "text",
"text": "potentialPromotions",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (missing "
},
{
"type": "text",
"text": "cart.total",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "), el banner muestra el monto que falta: "
},
{
"type": "text",
"text": "\"Compra C$ X o más y llévate: {name}\"",
"marks": [
{
"type": "em"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "e569fe38e150"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "d093680ff555"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": " Con una recompensa "
},
{
"type": "text",
"text": "DISCOUNT_ORDER",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", el banner habla de "
},
{
"type": "text",
"text": "descuento",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " ("
},
{
"type": "text",
"text": "amount",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "/"
},
{
"type": "text",
"text": "amountType",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "), no de \"llévate\"."
}
],
"attrs": {
"localId": "8725433d2cbc"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "ad8c50840e79"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": " Con ambos arrays vacíos, no se muestra banner."
}
],
"attrs": {
"localId": "897d8c07e95c"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "418e641669a0"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": " Tocar el banner (no el botón de cerrar) navega a la pantalla de beneficios."
}
],
"attrs": {
"localId": "00e122978791"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "907097f7d52f"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": " La pantalla de beneficios pide "
},
{
"type": "text",
"text": "get_rewards",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " con "
},
{
"type": "text",
"text": "officeCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "pickup",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " y "
},
{
"type": "text",
"text": "storeId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " resueltos."
}
],
"attrs": {
"localId": "494b8e3bb2d8"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "cc138de023b0"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": " Cada "
},
{
"type": "text",
"text": "reward",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " de la lista se muestra con nombre, imagen, "
},
{
"type": "text",
"text": "referencePrice",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (tachado si existe, sin romper si es "
},
{
"type": "text",
"text": "null",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ") y precio final C$ 0.00."
}
],
"attrs": {
"localId": "458e5a3160d1"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "2d5a907645c2"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": " Cada "
},
{
"type": "text",
"text": "notice",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " se muestra como texto informativo con el nombre de la promoción, sin monto."
}
],
"attrs": {
"localId": "9d307cecd024"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "e9c56cfd6d79"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": " Si "
},
{
"type": "text",
"text": "rewards",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " y "
},
{
"type": "text",
"text": "notices",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " vienen ambos vacíos, se muestra un mensaje invitando a cambiar de tienda/modalidad, nunca una pantalla vacía sin explicación."
}
],
"attrs": {
"localId": "70814b7c6c38"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "79368d1d5eba"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": " Al elegir un regalo, se pide "
},
{
"type": "text",
"text": "get_benefit",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " con el "
},
{
"type": "text",
"text": "materialCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " de esa "
},
{
"type": "text",
"text": "reward",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " y se muestra su detalle configurable, sin ofrecer adicionales con costo."
}
],
"attrs": {
"localId": "8f02fb641e45"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "1a9d5447e10e"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": " El regalo configurado se agrega/confirma con precio C$ 0.00, sin importar lo que traiga el material."
}
],
"attrs": {
"localId": "6a77ef3a1126"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "bff847948830"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": " El descuento del preview se muestra en el resumen y se resta del total."
}
],
"attrs": {
"localId": "733bfe48a104"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "fbfd742b9943"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": " Con cupón "
},
{
"type": "text",
"text": "y",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " descuento, se aplica "
},
{
"type": "text",
"text": "solo el mayor",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " (no se suman)."
}
],
"attrs": {
"localId": "686c735d6fd1"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "6de9ff05df27"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": " Al confirmar, la línea de regalo viaja con "
},
{
"type": "text",
"text": "isPromotion: \"3\"",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "typePromotion: 3",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "promotionId",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "price: 0",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", "
},
{
"type": "text",
"text": "subTotal: 0",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", tomados de lo que el cliente eligió en "
},
{
"type": "text",
"text": "get_rewards",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "/"
},
{
"type": "text",
"text": "get_benefit",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " — no de una respuesta de carrito."
}
],
"attrs": {
"localId": "ae1e489e2b23"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "9946c329a982"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": " La orden se crea correctamente con producto normal + regalo + descuento."
}
],
"attrs": {
"localId": "e0f6c34ad1fe"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "86b9add99331"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": " Si se quita el producto pagado y no se alcanza la compra mínima, el regalo elegido y el descuento dejan de poder confirmarse (la promoción ya no aplica)."
}
],
"attrs": {
"localId": "76f1cc927dda"
}
}
]
},
{
"type": "listItem",
"attrs": {
"localId": "1421c53cbc58"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": " Si los campos nuevos llegan vacíos/nulos, la app funciona exactamente como hoy."
}
],
"attrs": {
"localId": "cebecff14275"
}
}
]
}
],
"attrs": {
"localId": "44d7c2023e62"
}
},
{
"type": "rule",
"attrs": {
"localId": "391400543d82"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "b11e16bb297e"
},
"content": [
{
"type": "text",
"text": "Errores esperados"
}
]
},
{
"type": "table",
"attrs": {
"isNumberColumnEnabled": false,
"layout": "center",
"localId": "8e0fe9b1-52a5-4435-8a39-34f3c80df26f"
},
"content": [
{
"type": "tableRow",
"attrs": {
"localId": "d55b07cb60f9"
},
"content": [
{
"type": "tableHeader",
"attrs": {
"localId": "b4b0663273b4"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Código"
}
],
"attrs": {
"localId": "7085ad9ae64f"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "5110c4858cb9"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "HTTP"
}
],
"attrs": {
"localId": "4bbeba1bee5c"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "118a483b94d6"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Endpoint"
}
],
"attrs": {
"localId": "a5c4c9ebd2d5"
}
}
]
},
{
"type": "tableHeader",
"attrs": {
"localId": "2489b0bcdea9"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Significado"
}
],
"attrs": {
"localId": "6e320390987d"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "87f493133121"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "a966c74fd692"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "USER_UNAUTHORIZED",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "122c8c271392"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "6dec8b9f973f"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "401"
}
],
"attrs": {
"localId": "15e9d6124985"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "b97790b3bad6"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "get_rewards",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "4443c040fbb0"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "fadc3850adc9"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El "
},
{
"type": "text",
"text": "userid",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " enviado no coincide con el usuario del JWT, o el JWT no es de un usuario "
},
{
"type": "text",
"text": "CSM",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": "."
}
],
"attrs": {
"localId": "3ddd6c12b848"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "787cf9fd6bd9"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "dc3b44d33b0b"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "VALIDATION_ERROR",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "08a510a31edc"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "5cdaee95d91b"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "400"
}
],
"attrs": {
"localId": "837b9d0caf7e"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "f0d3f7362dc3"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "get_rewards",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "71deff01ecb9"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "85ad8cb07c1b"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Falta "
},
{
"type": "text",
"text": "officeCode",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " o "
},
{
"type": "text",
"text": "pickup",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": ", con el motor de promociones habilitado."
}
],
"attrs": {
"localId": "5cd949f28ab6"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "5f5cbb44f3c7"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "cbee6a91ba2a"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "ORDER_GIFT_NOT_APPLICABLE",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "18a7d36c2ac4"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "ffa73de157c8"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "409"
}
],
"attrs": {
"localId": "9a1659083a3a"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "b9483d2b7f9d"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "order/set",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "0ad3de85474f"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "984351a90b56"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "La línea de regalo enviada no corresponde a un regalo autorizado."
}
],
"attrs": {
"localId": "47cef329fd14"
}
}
]
}
]
},
{
"type": "tableRow",
"attrs": {
"localId": "f8abf2e7aae7"
},
"content": [
{
"type": "tableCell",
"attrs": {
"localId": "2fc536a519bd"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "ORDER_DISCOUNT_NOT_APPLICABLE",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "344d396e0ff8"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "219e6b01d30f"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "409"
}
],
"attrs": {
"localId": "04f04fc2b993"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "e1c1db85977d"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "order/set",
"marks": [
{
"type": "code"
}
]
}
],
"attrs": {
"localId": "608a2198a1be"
}
}
]
},
{
"type": "tableCell",
"attrs": {
"localId": "5b3a668f13ab"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "El descuento enviado supera el autorizado."
}
],
"attrs": {
"localId": "8894362571bb"
}
}
]
}
]
}
]
},
{
"type": "rule",
"attrs": {
"localId": "906cb5dd92af"
}
},
{
"type": "heading",
"attrs": {
"level": 2,
"localId": "cbc21c5b33aa"
},
"content": [
{
"type": "text",
"text": "Nota"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Este documento asume que la app consume los endpoints "
},
{
"type": "text",
"text": "em/*",
"marks": [
{
"type": "code"
}
]
},
{
"type": "text",
"text": " (los mismos que el ecommerce web). Si la app usa otros endpoints, avisar antes de estimar"
}
],
"attrs": {
"localId": "7d5b5e61ba14"
}
}
]
},
"updateAuthor": {
"self": "https://albatrosservices.atlassian.net/rest/api/3/user?accountId=712020%3A343b485c-be6f-43cb-9cf3-7ff3ed3cbc7b",
"accountId": "712020:343b485c-be6f-43cb-9cf3-7ff3ed3cbc7b",
"avatarUrls": {
"48x48": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png",
"24x24": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png",
"16x16": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png",
"32x32": "https://secure.gravatar.com/avatar/785a0208517497ea1e8100c547b12a21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FXS-1.png"
},
"displayName": "Xavier Alexander Chávez Saraguro",
"active": true,
"timeZone": "America/Guatemala",
"accountType": "atlassian"
},
"created": "2026-07-21T07:43:04.955-0600",
"updated": "2026-07-21T07:43:04.955-0600",
"jsdPublic": true
}
],
"self": "https://albatrosservices.atlassian.net/rest/api/3/issue/65228/comment",
"maxResults": 2,
"total": 2,
"startAt": 0
},
"worklog": {
"startAt": 0,
"maxResults": 20,
"total": 0,
"worklogs": []
}
}septiembre de 2026
octubre de 2026
noviembre de 2026
diciembre de 2026
enero de 2027
Asignado
hoy
DA
Derlis Aguilar
2 tareas
≈RISERISE-29En cursoRegalar Producto - App movil
≈RISERISE-18Por hacerRevisar multilenguaje de lado de la APP
FJ
Fernando Josue Moreno Castro
1 tarea
≈RISERISE-19En cursoRevisar multilenguaje de lado de la WEB
XA
Xavier Alexander Chávez Saraguro
2 tareas
≈RISERISE-17Por hacerMultilenguaje
≈RISERISE-20Por hacerEndpoints dedicados para T&C y política de privacidad en em_company
?
Sin asignar
2 tareas
≈RISERISE-3Por hacerConfiguracion y Desarrollo SPRINT 02
≈RISERISE-2Por hacerConfiguracion y Desarrollo SPRINT 01
Por hacerEn progresoHechoChoqueHoy←Inicio anterior≈Fechas estimadasLLidera proyecto7 tareas en el gráfico · 1 vencida fuera de rango
Vencidas fuera de rangoIssues activos cuyo dueDate ya pasó (anteriores al mes actual)1expandir
- RISERISE-14Pruebas (QA)Xavier Alexander Chávez Saraguro2026-07-07→2026-07-10
Carga por persona
Todas las tareas activas asignadas, incluyendo las que no entran al Gantt
4 personas
XA
Xavier Alexander Chávez Saraguro
3 tareas3
- RISE-14Pruebas (QA)Por hacer2026-07-07 → 2026-07-10
- RISE-17MultilenguajePor hacersin fechas
- RISE-20Endpoints dedicados para T&C y política de privacidad en em_companyPor hacersin fechas
DA
Derlis Aguilar
2 tareas11
- RISE-29Regalar Producto - App movilEn cursosin fechas
- RISE-18Revisar multilenguaje de lado de la APPPor hacersin fechas
FJ
Fernando Josue Moreno Castro
1 tarea1
- RISE-19Revisar multilenguaje de lado de la WEBEn cursosin fechas
?
Sin asignar
2 tareas2
- RISE-2Configuracion y Desarrollo SPRINT 01Por hacersin fechas
- RISE-3Configuracion y Desarrollo SPRINT 02Por hacersin fechas