Template variables and filters
Every variable, filter, schema setting, and query you can use in a GST Pro template.
Templates are Liquid (HTML + CSS), rendered once for each document and each copy. You edit them in the code editor using the Liquid, Query, and Schema tabs.
Variables
| Variable | What it holds |
|---|---|
doc.type | invoice, credit_note, packing_slip, or estimate |
doc.number / doc.date | Document number and issue date (the date uses your date format) |
doc.order_name / doc.order_date | Shopify order name (#1001) and order date |
doc.place_of_supply.text | "32 - Kerala", or the country for exports |
doc.copy / doc.copy_key | "Original for Recipient" and so on / original, duplicate, triplicate |
doc.reverse_charge | Yes or No (Rule 46(p)) |
doc.export_note | LUT / IGST endorsement on export invoices |
doc.against.number / doc.against.date | Credit notes: the original invoice |
doc.reason | Credit notes: the refund note |
doc.tracking.number / .company / .url | Tracking from the first fulfilment |
doc.payment_gateway, doc.shipping_method, doc.po_number, doc.order_note, doc.tags | Order details |
doc.qr_value / doc.barcode_value | The value chosen in the QR / barcode settings |
supplier.legal_name, supplier.gstin, supplier.formatted, supplier.logo, supplier.signature | Your business (the location's GSTIN when you have several) |
billing.* / shipping.* | name, company, formatted, city, state_name, state_code, zip, phone, email, gstin |
buyer.gstin / buyer.company / buyer.is_b2b | Buyer GST details from the order, B2B company, or customer |
lines[] | title, variant_title, sku, hsn, quantity, unit_price, unit_taxable_value, discount, taxable_value, rate, cgst, sgst, igst, cess, tax, total, image, properties, metafields |
gst.totals.* | quantity, gross, discount, taxable_value, cgst, sgst, igst, cess, tax, shipping, shipping_tax, round_off, grand_total |
gst.hsn_summary[] / gst.rate_summary[] | hsn, rate, quantity, taxable_value, cgst, sgst, igst, cess, tax, total |
gst.same_state / gst.supply_type / gst.state_tax_label | true for CGST + SGST; intra, inter, or export; SGST or UTGST |
gst.amount_in_words | "RUPEES ONE THOUSAND AND FIFTY ONLY" |
shop.name / shop.domain / shop.currency | Your Shopify store |
order.* | The raw Shopify order (Admin GraphQL shape), merged with your template's Query |
config.<section>.<setting> | Values from the Customize panel, defined in the Schema tab |
Filters
| Filter | Output |
|---|---|
{{ x | money }} | Your currency format (Settings → Invoice number & formatting). money: "₹ {{amount}}" overrides it |
{{ x | money_plain }} | 1,23,456.00 (Indian grouping, no symbol) |
{{ x | percent }} | 18% |
{{ x | amount_in_words }} | RUPEES … ONLY (lakh / crore) |
{{ doc.qr_value | qr: 100 }} | QR code image URL, size in px |
{{ doc.barcode_value | barcode }} | Code 128 barcode image URL |
{{ line.image | img_url: 80 }} | Resized Shopify image |
All standard Liquid tags and filters work (if, for, assign, capture, date, upcase, split, and so on). Output is HTML-escaped. Use richtext settings for formatted text.
Schema and click-to-edit
The Schema tab is a JSON array of sections. Each section has settings of type header, text, textarea, number, checkbox, range, select, color, image_picker, font_picker, or richtext. Read a value with {{ config.<section id>.<setting id> }}.
Add data-section (and optionally data-edit with a setting id) to an element. Clicking it in the preview opens that setting in the Customize panel:
Query
The Query tab runs an Admin GraphQL query with $id set to the order ID. The order it returns is merged into order, so an alias like note_attr: customAttributes { key value } becomes {{ order.note_attr }}. Only fields covered by Foxr GST Pro's access scopes can be read.
Pages and printing
Each document prints on its own page. Paper size and margins come from the Global settings (paper_size, page_margin). Use @media print for print-only CSS. Images must be https URLs. Scripts don't run in PDFs or prints.