Next Commerce
Data AttributesOrder Data

Properties

Every property you can read with data-next-display="order.<path>". Grouped by category. Most properties have both snake_case and camelCase forms โ€” use whichever you prefer.


Identification

PathTypeDescription
order.idstring/numberInternal order ID
order.numberstringHuman-readable order number
order.refId (or order.ref_id)stringReference ID used in URLs
order.statusstringCurrent order status
order.createdAt (or order.created_at)stringCreation timestamp
order.currencystringISO 4217 currency code
order.statusUrl (or order.order_status_url)URLOrder status page URL
order.testBadgestring"๐Ÿงช TEST ORDER" for test orders, empty otherwise

Financial Totals

Order totals have specific meanings โ€” use the right one for the right context.

PathDescription
order.totalGrand total โ€” line items + shipping + tax
order.subtotalLine items only โ€” excludes shipping and tax
order.shippingShipping charge (including shipping tax)
order.taxTotal tax amount
order.discounts (or order.total_discounts)Total discounts applied
order.savingsAmountCalculated savings
order.savingsPercentageSavings as a percentage

Subtotal vs total_excl_tax vs total

FieldIncludes
order.subtotalLine items only
order.total_excl_taxLine items + shipping, no tax
order.totalLine items + shipping + tax

Shipping breakdown

PathDescription
order.shipping_excl_taxShipping cost without tax
order.shipping_taxTax charged on shipping

Payment & shipping methods

PathDescription
order.paymentMethod (or order.payment_method)Payment method name
order.shippingMethod (or order.shipping_method)Shipping method name

Raw values for math

Append .raw to get a numeric value:

PathType
order.total.rawnumber
order.subtotal.rawnumber
order.tax.rawnumber
order.shipping.rawnumber
order.discounts.rawnumber

Customer

Read customer details from order.customer.*. The same fields are also available as order.user.* (alias).

PathDescription
order.customer.nameFull name
order.customer.firstNameFirst name only
order.customer.lastNameLast name only
order.customer.emailEmail address
order.customer.phonePhone number
order.customer.acceptsMarketingMarketing opt-in (boolean)
order.customer.languageCustomer language
order.customer.ipCustomer IP address

Addresses

Both order.shippingAddress.* and order.billingAddress.* have identical fields.

PathDescription
order.shippingAddress.fullPre-formatted full address string
order.shippingAddress.nameRecipient name
order.shippingAddress.line1Address line 1
order.shippingAddress.line2Address line 2
order.shippingAddress.cityCity
order.shippingAddress.stateState / province
order.shippingAddress.zip (or .postcode)ZIP / postcode
order.shippingAddress.countryCountry
order.shippingAddress.phonePhone
<address data-next-display="order.shippingAddress.full">-</address>

Line Items

Aggregate

PathDescription
order.lines.count (or order.items.count)Number of line items
order.lines.totalQuantityTotal quantity of all units
order.lines.upsellCountNumber of upsell line items
order.lines.mainProductTitle of the first non-upsell line
order.lines.mainProductSkuSKU of the first non-upsell line

Individual lines (by index)

Read a specific line by zero-based index: order.lines[0], order.lines[1], etc.

PathDescription
order.lines[n].title (or .product_title)Product title
order.lines[n].sku (or .product_sku)Product SKU
order.lines[n].quantityQuantity ordered
order.lines[n].imageProduct image URL
order.lines[n].priceUnit price (incl tax)
order.lines[n].priceExclTaxUnit price (excl tax)
order.lines[n].totalLine total (incl tax)
order.lines[n].totalExclTaxLine total (excl tax)
order.lines[n].isUpsellBoolean โ€” is upsell line

For dynamic line item rendering with templates, see Order Items Template.


Boolean Flags (for conditionals)

Use these in data-next-show / data-next-hide.

Load state

PropertyDescription
order.existsOrder loaded successfully
order.isLoadingOrder fetch in flight
order.hasErrorOrder failed to load

Content flags

PropertyDescription
order.hasItemsOrder has at least one line
order.isEmptyOrder has no lines
order.hasShippingShipping was charged
order.hasTaxTax was charged
order.hasDiscountsDiscounts were applied
order.hasSavingsOrder has a savings amount
order.hasUpsellsOrder has upsell line items

Timing flags

PropertyDescription
order.isRecentPlaced within the recent threshold
order.isNewOrderPlaced less than 15 minutes ago
order.isExpiredPlaced more than 15 minutes ago โ€” stored data may be cleared
order.supportsUpsellsOrder can accept post-purchase upsells
order.isTestTest order

Attribution & UTM

Marketing tracking captured at order time.

PathDescription
order.attribution.utm_source (or .source)UTM source
order.attribution.utm_medium (or .medium)UTM medium
order.attribution.utm_campaign (or .campaign)UTM campaign
order.attribution.utm_term (or .term)UTM term
order.attribution.utm_content (or .content)UTM content
order.attribution.gclidGoogle Click ID
order.attribution.funnelFunnel name
order.attribution.affiliateAffiliate code
order.attribution.hasTrackingBoolean โ€” any tracking data present
<div data-next-show="order.attribution.hasTracking">
  Source: <span data-next-display="order.attribution.utm_source">-</span>
</div>

Next Steps

On this page