Variables
Every value a store can put into a notification, a document or a page, as a
named token. Write {{ order.total }} and the store fills in the amount, in
its own currency, formatted the way the rest of the platform formats money.
There are 176 of them across 19 scopes, and this page is generated
from the same catalog the renderer resolves from, so it cannot drift.
Syntax
Dotted paths, the shape every template language you have used already has, so what you know transfers:
Hi {{ customer.first_name }}, order {{ order.number }} is on its way.
Total {{ order.total }} including {{ order.tax }} VAT.
Track it: {{ delivery.tracking_number }}Whitespace inside the braces is optional. A variable the store cannot answer
renders as nothing, never as the raw {{ ... }}: a customer must never see
template syntax.
Two rules worth knowing
The platform formats, you place. Money carries the order's currency, dates carry the platform's date format, statuses carry the same words the admin shows ("Unpaid", "Partially shipped"). You never format a value yourself, and the same amount looks identical in an email, on an invoice and in an API response.
Product names, not column names. The token is {{ order.number }}, and
it resolves to the store's own order number when the store has one. Database
column names never appear here.
Scopes
A scope is a group of related variables. Which ones a given notification carries depends on what that notification is about: an order confirmation carries the order, the customer, both addresses, the delivery and the store, while a purchase order carries the purchase order, the supplier and the store.
Order
Every customer notification carries it. Money is formatted in the order's own currency.
| Variable | What it is | Format | Also accepts |
|---|---|---|---|
{{ order.number }} |
The number the customer sees. The store's own number when it has one, otherwise the platform sequence. | text | {{order_number}} |
{{ order.display_id }} |
The bare number, with no prefix, suffix or padding. Use it when the copy supplies its own, otherwise use Order number. | text | {{display_id}} |
{{ order.id }} |
Internal identifier. Useful in links and API calls, not in customer copy. | text | |
{{ order.url }} |
Link to the customer's own order page. Built per store and per order: the store's custom domain when it has one, otherwise its Cartbase address. | url | {{order_url}} |
{{ order.email }} |
The address the order was placed with. | ||
{{ order.date }} |
When the order was placed. | date | |
{{ order.status }} |
Lifecycle state: pending, completed, canceled or archived. | text | |
{{ order.payment_status }} |
Paid, Unpaid, Partially paid, Refunded and so on, in the same words the admin uses. | text | |
{{ order.fulfillment_status }} |
Unfulfilled, Shipped, Delivered and so on, in the same words the admin uses. | text | |
{{ order.locale }} |
Language the customer shopped in, when the storefront sends one. | text | |
{{ order.cancelled_at }} |
When the order was cancelled, if it was. | datetime | |
{{ order.cancel_reason }} |
Why the order was canceled, in the words the cancel door offers. | text | |
{{ order.item_count }} |
Total number of units in the order. | number | |
{{ order.currency }} |
Currency code the order was placed in. | text | |
{{ order.total }} |
What the customer pays, everything included. | money | {{order_total}}, {{total}} |
{{ order.subtotal }} |
Items only, before tax, shipping and discounts. | money | |
{{ order.tax }} |
Total tax on the order. | money | |
{{ order.shipping }} |
What delivery cost the customer. | money | |
{{ order.discount }} |
Total discount applied to the order. | money | |
{{ order.payment_method_fee }} |
The fee of the payment method the customer chose (a COD courier fee, a handling fee on a manual method). | money | |
{{ order.paid }} |
How much has actually been received so far. | money | |
{{ order.refunded }} |
How much has been refunded. | money | |
{{ order.balance_due }} |
What is still outstanding on the order. | money |
Customer
The email address is the customer's identity here, so every order carries a customer. Names fall back to the shipping then the billing address.
| Variable | What it is | Format | Also accepts |
|---|---|---|---|
{{ customer.name }} |
Full name of the customer. | text | {{customer_name}} |
{{ customer.first_name }} |
First name on its own, for a greeting. | text | |
{{ customer.last_name }} |
Last name on its own. | text | |
{{ customer.email }} |
The customer's email address, which is their identity here. | ||
{{ customer.phone }} |
Phone number on the customer record. | text | |
{{ customer.company }} |
Company name for business customers. | text | |
{{ customer.vat_number }} |
VAT number for business customers, needed on invoices. | text | |
{{ customer.eik }} |
Bulgarian EIK for business customers. | text | |
{{ customer.tags }} |
Tags on the customer, comma separated. | text |
Shipping address
Every field individually, plus a one-line formatted version.
| Variable | What it is | Format | Also accepts |
|---|---|---|---|
{{ shipping_address.formatted }} |
The whole address on one line, ready to drop into a sentence. | text | |
{{ shipping_address.name }} |
Recipient's full name. | text | |
{{ shipping_address.first_name }} |
Recipient's first name. | text | |
{{ shipping_address.last_name }} |
Recipient's last name. | text | |
{{ shipping_address.company }} |
Company on the address, when given. | text | |
{{ shipping_address.line_1 }} |
Street and number. | text | |
{{ shipping_address.line_2 }} |
Apartment, floor, or extra detail. | text | |
{{ shipping_address.city }} |
City or town. | text | |
{{ shipping_address.province }} |
Province, region or state. | text | |
{{ shipping_address.postal_code }} |
Postal code. | text | |
{{ shipping_address.country }} |
Two-letter country code. | text | |
{{ shipping_address.phone }} |
Phone number on the address. | text |
Billing address
The same field set as the shipping address.
| Variable | What it is | Format | Also accepts |
|---|---|---|---|
{{ billing_address.formatted }} |
The whole address on one line, ready to drop into a sentence. | text | |
{{ billing_address.name }} |
Recipient's full name. | text | |
{{ billing_address.first_name }} |
Recipient's first name. | text | |
{{ billing_address.last_name }} |
Recipient's last name. | text | |
{{ billing_address.company }} |
Company on the address, when given. | text | |
{{ billing_address.line_1 }} |
Street and number. | text | |
{{ billing_address.line_2 }} |
Apartment, floor, or extra detail. | text | |
{{ billing_address.city }} |
City or town. | text | |
{{ billing_address.province }} |
Province, region or state. | text | |
{{ billing_address.postal_code }} |
Postal code. | text | |
{{ billing_address.country }} |
Two-letter country code. | text | |
{{ billing_address.phone }} |
Phone number on the address. | text |
Delivery
Reads the order's most recent live fulfillment and its first label.
| Variable | What it is | Format | Also accepts |
|---|---|---|---|
{{ delivery.method }} |
The shipping option the customer chose, in the merchant's own words. | text | |
{{ delivery.price }} |
What the chosen delivery method cost. | money | |
{{ delivery.carrier }} |
The courier carrying the parcel, by name: Econt, Speedy, Pigeon Express, BoxNow. | text | |
{{ delivery.tracking_number }} |
Waybill number the customer can track. | text | {{tracking_number}} |
{{ delivery.tracking_url }} |
Direct link to the courier's tracking page for this parcel. | url | |
{{ delivery.pickup_location }} |
Courier office or locker the customer chose. | text | |
{{ delivery.shipped_at }} |
When the parcel left the store. | datetime | |
{{ delivery.delivered_at }} |
When the courier delivered the parcel. | datetime |
Payment
| Variable | What it is | Format | Also accepts |
|---|---|---|---|
{{ payment.method }} |
How the customer pays, in the merchant's own words: the method's name (cash on delivery, bank transfer), or Card for a card processor. | text |
Store
The store's public identity. store.email is the address a reply reaches.
| Variable | What it is | Format | Also accepts |
|---|---|---|---|
{{ store.name }} |
The store's name. | text | {{store_name}} |
{{ store.url }} |
Link to the storefront: the custom domain when there is one. | url | |
{{ store.email }} |
Where customers reach the store. The sender address when set, otherwise the owner's account email. | {{support_email}} |
|
{{ store.address }} |
Registered address of the business. | text | |
{{ store.vat_number }} |
The business VAT number. | text | |
{{ store.eik }} |
Bulgarian EIK of the business. | text | |
{{ store.iban }} |
Bank account customers pay into. | text |
Brand
| Variable | What it is | Format | Also accepts |
|---|---|---|---|
{{ brand.logo_url }} |
The store's horizontal logo for white or light surfaces. | url | |
{{ brand.logo_dark_url }} |
The store's horizontal logo for dark or brand-coloured surfaces. | url | |
{{ brand.logo_square_url }} |
The square logo mark image URL, for compact placements. | url | |
{{ brand.color_primary }} |
The brand's primary color as #rrggbb, for inline styles. | text | |
{{ brand.color_secondary }} |
The brand's secondary color as #rrggbb, for inline styles. | text | |
{{ brand.slogan }} |
The store's slogan or tagline. | text |
Cart
For abandoned-cart flows. Supplied by the caller, not by an order.
| Variable | What it is | Format | Also accepts |
|---|---|---|---|
{{ cart.id }} |
Identifier of the customer's cart. | text | |
{{ cart.total }} |
What is in the cart, priced. | money | |
{{ cart.item_count }} |
How many units are in the cart. | number |
Document
Read from the document's frozen snapshot, never from the live order, because orders change and documents must not.
| Variable | What it is | Format | Also accepts |
|---|---|---|---|
{{ document.number }} |
Number of the invoice or other document. | text | {{document_number}} |
{{ document.type }} |
Invoice, proforma, dispatch note, handover protocol or sale receipt. | text | {{document_type}} |
{{ document.date }} |
Date the document was issued. | date | |
{{ document.url }} |
Link to download the PDF. | url | |
{{ document.currency }} |
Currency the document is issued in. | text | |
{{ document.payment_method }} |
How the document says payment is made. | text | |
{{ document.due_date }} |
When the invoice is due. | date | |
{{ document.outstanding }} |
How much of the invoice is still unpaid. | money | |
{{ document.paid_at }} |
When the invoice was settled. | datetime | |
{{ document.voided_at }} |
When the document was voided, if it was. | datetime | |
{{ document.issuer.name }} |
Legal name of the issuer. | text | |
{{ document.issuer.address }} |
Registered address of the issuer. | text | |
{{ document.issuer.eik }} |
Bulgarian EIK / company registration number. | text | |
{{ document.issuer.vat_number }} |
VAT registration number. | text | |
{{ document.issuer.mol }} |
Materially responsible person (Bulgarian invoicing). | text | |
{{ document.issuer.iban }} |
Bank account for payment. | text | |
{{ document.issuer.contact_email }} |
The issuer's public contact email. | text | |
{{ document.issuer.contact_phone }} |
The issuer's public contact phone. | text | |
{{ document.issuer.trade_name }} |
The brand the issuer trades under when it differs from the legal name. | text | |
{{ document.recipient.name }} |
Legal name of the recipient. | text | |
{{ document.recipient.address }} |
Registered address of the recipient. | text | |
{{ document.recipient.eik }} |
Bulgarian EIK / company registration number. | text | |
{{ document.recipient.vat_number }} |
VAT registration number. | text | |
{{ document.recipient.mol }} |
Materially responsible person (Bulgarian invoicing). | text | |
{{ document.recipient.iban }} |
Bank account for payment. | text | |
{{ document.totals.subtotal }} |
Line items on the document, before tax. | money | |
{{ document.totals.discount }} |
Discount on the document. | money | |
{{ document.totals.tax_base }} |
The lines less the discount, what the VAT is charged on. | money | |
{{ document.totals.discount_label }} |
What the discount is, when the document names it (the opening offer on a Cartbase bill). | text | |
{{ document.totals.shipping }} |
Shipping on the document. | money | |
{{ document.totals.tax }} |
Tax on the document. | money | |
{{ document.totals.tax_rate_percent }} |
Effective VAT percentage shown on the document. | percent | |
{{ document.totals.total }} |
The amount the document is for. | money | |
{{ document.sale.shop_number }} |
The number НАП gave the shop, printed on a sale receipt. | text | |
{{ document.sale.order_number }} |
The order number a sale receipt and the audit file both print. | text | |
{{ document.sale.transaction }} |
The card payment's reference at the processor. | text | |
{{ document.sale.date }} |
The date of the sale in Sofia, as a receipt prints it. | text | |
{{ document.sale.time }} |
The time of the sale in Sofia. | text | |
{{ document.sale.order_date }} |
The day the order was placed, in Sofia, as a receipt prints it. | text | |
{{ document.sale.payment }} |
How the customer paid, as a sale receipt prints it. | text | |
{{ document.sale.processor }} |
The payment service provider or virtual POS that took the card payment. | text | |
{{ document.sale.lines_total }} |
What a sale receipt's lines add up to with VAT, before discounts. | money | |
{{ document.sale.net_total }} |
What a sale receipt comes to without VAT, after discounts: its VAT groups' amounts added up. | money | |
{{ document.sale.discount }} |
The discounts on a sale receipt, with their VAT. Empty when there are none. | money | |
{{ document.sale.qr_code }} |
The QR code the ordinance asks a sale receipt to carry, as an image address for an |
url |
Purchase order
| Variable | What it is | Format | Also accepts |
|---|---|---|---|
{{ purchase_order.number }} |
Number of the purchase order sent to a supplier. | text | {{po_number}} |
{{ purchase_order.status }} |
Where the purchase order stands. | text | |
{{ purchase_order.total }} |
Value of the purchase order. | money | |
{{ purchase_order.expected_at }} |
When the goods are expected. | date |
Supplier
| Variable | What it is | Format | Also accepts |
|---|---|---|---|
{{ supplier.name }} |
Name of the supplier the purchase order goes to. | text | {{supplier_name}} |
{{ supplier.email }} |
Where the purchase order is sent. | ||
{{ supplier.phone }} |
Supplier phone number. | text |
Review
| Variable | What it is | Format | Also accepts |
|---|---|---|---|
{{ review.url }} |
Link to the review form for this order. | url | |
{{ review.product_title }} |
The product being reviewed. | text | {{product_title}} |
{{ review.reward_percentage }} |
Discount percentage earned for leaving a review. | number | {{reward_percentage}} |
{{ review.reward_code }} |
The single-use discount code earned for a review. | text | {{reward_code}} |
Gift card
The amount only. The card CODE is never a variable: it renders as a fixed block so an edited template cannot drop it or leak it.
| Variable | What it is | Format | Also accepts |
|---|---|---|---|
{{ gift_card.amount }} |
Value loaded on the gift card. | money | {{gift_card_amount}} |
{{ gift_card.expires_at }} |
When the gift card stops working, if it expires. | date |
Subscription
| Variable | What it is | Format | Also accepts |
|---|---|---|---|
{{ subscription.plan_name }} |
The subscription plan the customer is on. | text | {{plan_name}} |
{{ subscription.next_charge_date }} |
When the subscription renews next. | text | {{next_charge_date}} |
Order edit
| Variable | What it is | Format | Also accepts |
|---|---|---|---|
{{ edit.delivery_changed }} |
True when the edit changed the delivery method or its price. | text | |
{{ edit.items_changed }} |
True when the edit added, removed or changed a line. | text | |
{{ edit.refunded }} |
What the change returned to the customer's payment method. | money | |
{{ edit.charged }} |
What the change charged to the card the customer paid with. | money | |
{{ edit.owed }} |
What the customer still owes after the change, payable from the order page. | money | |
{{ edit.charge_failed }} |
True when the customer's bank did not approve the charge of the difference. | text |
Payment link
| Variable | What it is | Format | Also accepts |
|---|---|---|---|
{{ payment_link.amount }} |
The balance the payment link collects: the order's total pending when the link was sent. | money | |
{{ payment_link.expires_at }} |
When the payment link stops working (24 hours after it was sent). | datetime | |
{{ payment_link.url }} |
The address of the payment page; the mail's button carries it already. | url |
Payment received
| Variable | What it is | Format | Also accepts |
|---|---|---|---|
{{ payment_received.amount }} |
What the customer paid on the payment link, in the payment's currency. | money | |
{{ payment_received.paid_at }} |
When the payment was received. | datetime | |
{{ payment_received.balance_due }} |
What the order still owes after this payment; empty when nothing is due. | money |
Loyalty program
| Variable | What it is | Format | Also accepts |
|---|---|---|---|
{{ loyalty.member }} |
True when the customer is in the loyalty program; the order mails' loyalty section prints on it. | text | |
{{ loyalty.program_name }} |
The loyalty program's name, as set in the app; the store's name when none is set. | text | |
{{ loyalty.points_name }} |
What the store calls its points, plural ("points", "stars"). | text | |
{{ loyalty.points_name_singular }} |
What the store calls one point. | text | |
{{ loyalty.points_earned }} |
The points this order earned, or earns once it is paid. | number | |
{{ loyalty.points_available_at }} |
The day the order's points can be spent, after the store's delay. | date | |
{{ loyalty.earn_on_payment }} |
True when the store awards points once an order is paid and this order is not paid yet. | text | |
{{ loyalty.points_returned }} |
The points a cancellation or a refund took back from this order. | number | |
{{ loyalty.balance }} |
The points the customer can spend now. | number | |
{{ loyalty.pending }} |
Points earned that are still waiting out the store's delay. | number | |
{{ loyalty.expires_at }} |
The day the balance resets unless it moves; empty when the store does not expire points. | date | |
{{ loyalty.points_expiring }} |
The points about to reset (the Expiring soon mail). | number | |
{{ loyalty.tier }} |
The VIP tier the customer holds; empty while VIP is off. | text | |
{{ loyalty.next_tier }} |
The tier above the customer's; empty at the top. | text | |
{{ loyalty.points_to_next_tier }} |
What the customer still needs for the next tier, in the tier program's own unit. | number | |
{{ loyalty.campaign }} |
The bonus campaign that boosted this order's points; empty when none did. | text | |
{{ loyalty.referral_url }} |
The customer's own link to invite a friend. | url | |
{{ loyalty.account_url }} |
The customer's account page on the store, where their points and rewards are. | url | |
{{ loyalty.reward_name }} |
The reward's name, as the merchant set it. | text | |
{{ loyalty.reward_value }} |
What the reward is: "10% off", "EUR 5.00 off", "Free shipping", "200 points". | text | |
{{ loyalty.reward_reason }} |
Why the reward was given: "for 1,500 points", "for your birthday", "for reaching Gold". | text | |
{{ loyalty.points_spent }} |
The points the customer spent for the reward; empty for one that cost none. | number | |
{{ loyalty.reward_expires_at }} |
When the reward's code stops working; empty for one that never expires. | date |
What each notification carries
| Notification | Scopes |
|---|---|
| Order Confirmation | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand, Loyalty program |
| Order Shipped | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand |
| Order Delivered | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand |
| Order Refunded | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand, Loyalty program |
| Order Canceled | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand, Loyalty program |
| Order Edited | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand, Order edit |
| Payment Link | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand, Payment link |
| Payment Confirmation | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand, Payment received |
| Admin: New Order | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand |
| Welcome Email | Customer, Store, Brand |
| Password Reset | Customer, Store, Brand |
| Document Issued | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand, Document |
| Sale Receipt | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand, Document |
| Sign-in Code | Customer, Store, Brand |
| B2B Account Approved | Customer, Store, Brand |
| Review Request | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand, Review |
| Review Request Reminder | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand, Review |
| Review Reward Code | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand, Review |
| Out for Delivery | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand |
| Ready for Pickup | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand |
| Picked Up | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand |
| Office Pickup Reminder (Day 3) | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand |
| Office Pickup Reminder (Day 5) | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand |
| Gift Card Delivery | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand, Gift card |
| Purchase Order | Purchase order, Supplier, Store, Brand |
| Subscription: Upcoming Renewal | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand, Subscription |
| Subscription: Payment Failed | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand, Subscription |
| Subscription: Paused | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand, Subscription |
| Subscription: Canceled | Order, Customer, Shipping address, Billing address, Delivery, Payment, Store, Brand, Subscription |
| Accountant: NRA audit file | Document, Store, Brand |
| Your reward | Loyalty program, Customer, Store, Brand |
| Expiring soon | Loyalty program, Customer, Store, Brand |
Writing a variable from a scope the notification does not carry is refused when you save it, with the reason, rather than rendering as a blank in a real customer's inbox.
Not available yet
These are real product gaps, listed so they are visible rather than promised. They are not offered in the editor and cannot be saved into a template.
| Variable | What it would be | What is missing |
|---|---|---|
{{ order.note }} |
The note the customer left with their order. | not collected yet |
{{ store.phone }} |
The number customers can call. | no column yet |
{{ cart.url }} |
Link that puts the customer back in their abandoned cart. | storefront cart recovery route plus the cart id |
Never variables
The gift card code and the sign-in code render as fixed blocks and are deliberately not tokens. An edited template must not be able to drop them (the customer loses their code) or move them somewhere they leak.