Appearance
Payload branch "attributes"
The first "branch" of the payload is made of those informations that are relative to the cart/checkout/purchase only, and for some reason they cannot be easily grouped into other "scoped branch".
Let's review an example:
js
{
"context": "...",
"event": "...",
"checkout_step": "...",
"attributes": {
"id": 298,
"lang_id": "it",
"availability_mode": "master",
"currency": {
"id": 1,
"name": "Euro",
"iso_code": "EUR"
},
"products_total_qty": 2,
"total": "84.96",
"total_cart_discount": "0",
"total_discount": "0",
"total_taxes": "15.32",
"total_products": "539.95",
"total_products_real": "84.96",
"total_products_discount": "454.99",
"total_shipment": "0",
"total_payment": "0"
},
"products": [...],
"carrier": {...},
"payment": {...},
"delivery": {...},
"billing": {...},
"user": {...},
"engagements": {...}
}Variables full details
Here you can find a detailed description of each variable or sub-branch:
| Var | Type | Description |
|---|---|---|
| id | int | Current cart session id |
| lang_id | string | ISO-CODE of the user language |
| availability_mode | string | Internal logic for order splitting |
| currency | object | The currenct currency object; see Object: "currency" |
| products_total_qty | int | Overall total quantity of items in the cart |
| total | string | Final total for the current cart |
| total_cart_discount | string | Amount of the "cart_discount" for the current cart |
| total_discount | string | Amount of the "discount" for the current cart |
| total_taxes | string | Total taxes for the current cart |
| total_products | string | Total for all products (without reductions) |
| total_products_real | string | Total for all products (reductions applied) |
| total_products_discount | string | Total reduction applied to products |
| total_shipment | string | Shipment extra charge |
| total_payment | string | Payment extra charge |
Object: "currency"
This object holds informations about a currency, and it is always defined with these variables:
| Var | Type | Description |
|---|---|---|
| id | int | Unique id |
| name | string | Translated description |
| iso_code | string | Universal ISO-CODE(3) |
