Cart Email Data (Cart Context)
This article lists every field in the cart context and how to view them for a real cart.
Cart summary and invoice emails use the cart context ({{context}} = cart_context), which is set up differently from the order context. Field names are shorter and grouped by object, for example cart.number, not ticket_order_number. This article covers where to view a cart's data, how to open it step by step, and a reference for every cart field.
Where to find it
https://<CMS domain>/api/cart/<cart id>/context.
Required access: Portal Admin. Use the CMS domain, not the web domain.
View a cart's data
- Open the cart — in the CMS, open the cart. The page title shows the cart number, for example Cart #D154156B. The URL looks like
https://demo.cms.d1tix.com/aquarium/cart/f1202584-e391-f185-d27b-b83d485c0190. - Change the path — replace
/aquarium/cart/with/api/cart/and add/contextat the end:https://demo.cms.d1tix.com/api/cart/f1202584-e391-f185-d27b-b83d485c0190/context. - Find the field you need — match it to the tables below.
Reference
How the data is nested
cart
├─ cart, totals, identity, portal, seller
├─ event_templates[]
│ ├─ venue, meta
│ └─ event_sessions[]
│ └─ tickets[] (one row per ticket type)
├─ payments[]
├─ scheduled_payments[]
└─ cartmods[]
Cart fields (cart)
|
Field |
Description |
Example |
|---|---|---|
|
|
The cart's unique ID, found in the cart's CMS URL |
|
|
|
Cart number shown in the CMS |
|
|
|
|
|
|
|
Always |
|
Totals (totals)
|
Field |
Description |
Example |
|---|---|---|
|
|
Currency |
|
|
|
Cart total before discounts |
|
|
|
Total discounts |
|
|
|
Cart total after discounts |
|
|
|
Fees included in the price, percentage and fixed |
|
|
|
Fees added on top, percentage and fixed |
|
|
|
Cart total |
|
|
|
Amount paid so far |
|
|
|
Total of upcoming scheduled payments |
|
|
|
Balance due |
|
Purchaser fields (identity)
|
Field |
Description |
Example |
|---|---|---|
|
|
The purchaser's account ID |
|
|
|
Full name |
|
|
|
Email address |
|
|
|
Saved account details: |
|
Event fields (event_templates[])
|
Field |
Description |
Example |
|---|---|---|
|
|
Event name |
|
|
|
Event category |
|
|
|
Venue name |
|
|
|
Venue address |
|
|
|
Event images: |
|
|
|
The sessions in the cart for this event |
— |
Session fields (event_sessions[])
|
Field |
Description |
Example |
|---|---|---|
|
|
Start date and time, formatted |
|
|
|
Start date and time, unformatted |
|
|
|
End date and time, unformatted |
|
|
|
One row per ticket type |
— |
Ticket fields (tickets[])
|
Field |
Description |
Example |
|---|---|---|
|
|
Number of tickets of this type |
|
|
|
Ticket type |
|
|
|
Ticket type description |
— |
|
|
Ticket group |
|
|
|
Ticket group description |
— |
|
|
Currency |
|
|
|
One ticket, before and after discounts |
|
|
|
All tickets of this type, before and after discounts |
|
Payment fields (payments[])
|
Field |
Description |
|---|---|
|
|
|
|
|
Amount |
|
|
Card brand and last 4 digits |
|
|
Payment method |
|
|
Payment method name |
|
|
Payment date and time, formatted |
|
|
Payment date and time, unformatted |
Scheduled payment fields (scheduled_payments[])
|
Field |
Description |
|---|---|
|
|
Amount due |
|
|
Due date, unformatted. Use it with a date helper |
|
|
Note on the scheduled payment |
Portal and seller fields
|
Field |
Description |
Example |
|---|---|---|
|
|
Portal name |
|
|
|
Portal web domain |
|
|
|
Portal identifier |
|
|
|
Seller name |
|
|
|
Seller identifier |
|
cartmods[] holds changes made to the cart. Its fields are still to be documented.
Best practices
-
Show the balance with
totals.unpaid. Wrap it in{{#if}}so a paid cart doesn't show "0.00 due". -
List scheduled payments with
{{#each scheduled_payments}}. Each row has its ownamountandduedate. -
Don't copy order fields into a cart template. Names like
identity_emailandticket_type_nameare blank in the cart context. Useidentity.emailandticket_type.name.