Skip to content

Personal text

Personal text fills in details about the order when the thank you page loads: the buyer’s first name, their confirmation number, what they paid, how it’s delivered. Put a value between double curly brackets, {{ }}, in almost any text, button label or link of a thank you page block. Everything else shows as written.

Thanks, {{ firstName || "friend" }}! Your confirmation number is {{ orderNumber }}.

In the block editor, many blocks list the most common values under their text fields, with an All variables link to this page.

The part between the brackets is a small piece of JavaScript, so you can do math, compare values and choose between texts:

{{ orderTotal >= 100 ? "Your order ships free." : "Spend " + toMoney(100 - orderTotal) + " more next time for free shipping." }}
  • Fallbacks: {{ firstName || "friend" }} shows “friend” when there’s no first name.
  • Names are case-sensitive: orderNumber, not ordernumber.
  • What prints: numbers print as plain numbers (49.5), so wrap money in toMoney. Lists, such as discountCodes, print with commas between items. Values that don’t exist, and true or false, print as nothing.
  • A broken expression shows nothing. If an expression has a mistake, such as a typo in a name or a missing quote, that expression is left blank and the rest of the text still shows.
Variable What it holds Example
firstName Their first name. For guests, the name on the shipping address, or on the billing address when nothing ships. Jane
lastName Their last name, the same way Cooper
fullName Their full name Jane Cooper
email Their email address jane@example.com
isFirstOrder Whether this is their first order. Use it in a condition: {{ isFirstOrder ? "Welcome!" : "Welcome back!" }}
ordersCount Their number of orders, this one included. 0 for buyers Shopify doesn’t recognize. 4
companyName The B2B company that ordered. Blank for other orders. Acme Inc
Variable What it holds Example
orderNumber The confirmation number. Shopify doesn’t give apps the order name (#1001) on the thank you page. X7KQ2PL9A
orderName The same as orderNumber. On the order status page, where older checkout blocks still show, both are the order name. X7KQ2PL9A
confirmationNumber The confirmation number X7KQ2PL9A
orderId The order’s ID number 5551234567890
orderTotal What they paid, as a number. Use toMoney(orderTotal). 49.5
orderSubtotal Items after discounts, before shipping and taxes, as a number 42
shippingCost Shipping, as a number 5
taxTotal Taxes, as a number 2.5
currencyCode The currency they paid in. toMoney uses it. CAD
itemCount How many items they bought 3
discountCodes The discount codes they used, as a list WELCOME10
attributes Order attributes by name, like a gift message from a form: attributes["Gift message"] Happy birthday!
lines The items, as a list. Each has title, quantity and sku.
order The same details as an object: order.id, order.number, order.name, order.total, order.subtotal and order.currencyCode
Variable What it holds Example
deliveryMethod shipping, local delivery, pickup or pickup point pickup
shippingMethod The shipping or pickup option they chose Standard
pickupLocation The pickup location’s name, for pickup orders Shop location
shippingCity The city they’re shipping to Toronto
shippingCountry The two-letter code of the country they’re shipping to CA
Variable What it holds Example
shopName Your store’s name Your store
shopUrl Your online store’s address, for links to it https://your-store.myshopify.com

In item notes, line holds the item the note is under. Blank in other blocks.

Variable What it holds Example
line.title The item’s name, as the order summary shows it Linen shirt
line.variantTitle Its variant Small / White
line.quantity How many they bought 2
line.total What they paid for it, as a number 80
line.sku Its SKU SHIRT-S-WHT
line.productType, line.vendor Its product type and vendor Shirts
line.productId, line.variantId The numbers at the end of the product’s and variant’s IDs 8123456789
line.attributes Its line item properties, by name: line.attributes["Engraving"] J.C.
line.isSubscription Whether it was bought on a selling plan

In the steps of a What happens next block, shipDate, deliveryDate, deliveryDateFrom, deliveryDateTo, readyDate and carrier hold the order’s dates.

Helper What it does Example
toMoney(amount) Formats a number as money in the buyer’s currency and language. Add a currency code to choose another: toMoney(amount, "EUR"). {{ toMoney(orderTotal) }} → $49.50
formatDate(date) Formats a date in the buyer’s language. {{ formatDate("2026-12-24") }} → Dec 24, 2026

Text fields such as Text, Intro, Answer and Note also support:

Type this You get
**Free returns** Bold text
~~$40~~ Struck out text, for example a price before a discount
[Returns policy](https://example.com/returns) A link. Links to other websites open in a new tab. A store path such as /pages/returns links to your store.
A line break A new paragraph. Empty lines are ignored.

Headings, button text and labels show personal text but not bold or links. The announcement bar shows one line of plain text.

Text written for older checkout blocks keeps working: {@strikethrough …}, {@red …}, {@subdued …} and {@small …} keep their style, and other {@…} operators show their text plainly.

In link fields, such as Button link, Link and Link the QR code opens, values are URL-encoded: spaces become %20 and # becomes %23, so they don’t break the address.

https://example.com/track?order={{ orderNumber }}&email={{ email }}

Values in a [label](…) link inside text aren’t encoded. Encode them yourself, and keep spaces out of the address:

[Track your order](https://example.com/track?email={{ encodeURIComponent(email) }})

Personal text works in almost every text, button label and link in thank you page blocks, in their translations too, and in the Discount code and Share message fields.

It doesn’t work in the Image field (the image’s address), the Order guide’s metafield values, or Then go to.

Thank you page blocks, customer account blocks and checkout’s dynamic text all use the same {{ }} brackets, but each has its own variables: the thank you page knows this order, customer accounts know the customer’s history, and checkout knows the cart.

  • Statements work too. Text written for checkout’s dynamic text, such as {{ orderNumber?.replace(/^#/, ""); }} or {{ let total = orderTotal * 2; total }}, shows the last value.
  • Check it in the preview. The editor’s Preview fills in personal text for each sample order, so you can test an expression before you publish.
  • Plan for guests. Buyers Shopify doesn’t recognize have an ordersCount of 0. Their name comes from their shipping or billing address, and may be empty for some orders.
  • No customer tags or metafields. Shopify doesn’t share them with the thank you page.
  • No store credit balance. Shopify doesn’t share it with the thank you page. Show it with a Store credit customer account block instead.