{"title":"POS print templates","slug":"pos-print-templates","url":"https://support.storeconnect.com/articles/pos-print-templates","url_markdown":"https://support.storeconnect.com/articles/pos-print-templates.md","subtitle":null,"summary":"Create and manage print templates for cart quotes, receipts, product labels, and PDF documents using the POS Print Template object in Salesforce, with Liquid templating and support for thermal receipt printers, label printers, and document printers.","type":"Help_Documentation","video_url":"","keywords":"POS print templates, cart template, cart receipt, quote template, receipt template, label template, document template, ZPL, EPL, PDF, jsPDF, Liquid template, POS printing, thermal printer, label printer, print actions, print:cart, print:receipt, print:labels, print:template, POS Print Template object, RPML, print markup, Quest Airpay receipt, print:quest_receipt, gateway_receipt","last_modified":"2026-09-16T07:15:50+0000","body_markdown":"POS print templates let you define exactly what gets printed when a cart quote, receipt, label, or document is triggered from a POS register. Templates are stored in Salesforce as POS Print Template records and rendered using Liquid at print time.\n\nThe POS Print Template system supports three output types:\n\n- **Receipt** — formatted output for ESC/POS or Star PRNT thermal receipt printers\n- **Label** — ZPL or EPL commands for label printers\n- **Document** — PDF output via a browser print dialog, for invoices, packing slips, and custom documents\n\nCart quotes use the same output types. A cart template with `receipt` printer type prints to the thermal printer, and one with `document` printer type produces a PDF.\n\n## How it works\n\nEach POS Print Template record has two key settings:\n\n- **Context** — determines what data is available in the template (`cart`, `receipt`, or `label`)\n- **Printer type** — determines where the output is sent (`receipt`, `label`, or `document`)\n\nThese settings are independent, which gives you flexibility. For example, you can send label-context data to a document printer to produce product label PDFs instead of printing directly to a label printer.\n\nWhen a print action fires in the POS, StoreConnect:\n\n1. Looks up the template (by SFID or from the default set in POS settings)\n2. Builds a Liquid context from the template's context setting\n3. Renders the Liquid template\n4. Sends the output to the matching printer\n\n## Create a POS print template\n\n1. In Salesforce, go to **POS Print Templates** in the StoreConnect navigation.\n2. Select **New**.\n3. Enter a descriptive **Name** for the template, for example \"Standard receipt\" or \"Barcode label 4x2\".\n4. Set the **Context**:\n   - `cart` — template receives cart/quote data (`current_cart`, `current_outlet`, `current_store`)\n   - `receipt` — template receives order data (`current_order`, `current_outlet`, `current_store`)\n   - `label` — template receives product data (`products`, `quantity`)\n5. Set the **Printer type**:\n   - `receipt` — output is sent to the thermal receipt printer\n   - `label` — output is sent to the label printer\n   - `document` — output is rendered as a PDF and sent to the browser print dialog\n6. Enter your **Content**, which is the Liquid template. See the sections below for syntax guidance by type.\n7. Select **Save**.\n\nThe template appears in the **POS Print Templates** list and can be set as a default, or targeted by a print action, once the device next syncs.\n\n:::note\nThe **StoreConnect External ID** field is auto-generated on save. Do not modify it.\n:::\n\n## Set default templates in POS settings\n\nAfter creating templates, set them as defaults in POS Hardware Settings so they are used automatically when print actions run without a template override.\n\n:::note\nSet the defaults in the POS under **Settings** \u003e **Hardware**, where there is a selector for the default cart template, the default receipt template, and the default label template.\n:::\n\n## Template contexts and available variables\n\n### Cart context\n\nAvailable when **Context** is set to `cart`.\n\n| Variable | Type | Description |\n|----------|------|-------------|\n| `current_cart` | Cart | The active cart/quote being printed |\n| `current_outlet` | Outlet | The POS outlet where the print was triggered |\n| `current_store` | Store | The store |\n\nUse the cart context for templates that print quotes or order summaries for unpaid carts. Cart templates can target any printer type: use `receipt` to print to the thermal printer, or `document` to produce a PDF.\n\nFor a full variable reference and sample template, see [Create a POS cart print template](pos-cart-template).\n\n### Receipt context\n\nAvailable when **Context** is set to `receipt`.\n\n| Variable | Type | Description |\n|----------|------|-------------|\n| `current_order` | Order | The order being printed |\n| `current_outlet` | Outlet | The POS outlet where the print was triggered |\n| `current_store` | Store | The store |\n\nUse the receipt context for templates that print order summaries, receipts, invoices, or any output based on a completed order.\n\nReceipt and cart templates that print to a thermal printer use RPML print markup for layout and formatting, combined with Liquid for dynamic data. The most common markup tags are:\n\n| Tag | Description |\n|-----|-------------|\n| `{document}` | Opens the document, with optional settings such as `word-wrap=true` |\n| `{center}` / `{left}` | Text alignment |\n| `{bold}` / `{endBold}` | Start and end bold text |\n| `{line}` | Blank line |\n| `{rule}` | Horizontal rule |\n| `{table cols=N}` | Multi-column table layout |\n| `{image src=\"...\" size=N}` | Image, such as an outlet logo |\n| `{qrcode data=\"...\"}` | QR code |\n\nFor receipt template syntax and a full working example, see [Create or update a POS receipt template](pos-receipt-template).\n\n### Label context\n\nAvailable when **Context** is set to `label`.\n\n| Variable | Type | Description |\n|----------|------|-------------|\n| `products` | Array | The products to print labels for |\n| `quantity` | Number | Number of labels to print per product (default: 1) |\n\nFor label template syntax, ZPL and EPL command reference, available variables, and working examples, see [Create or update a POS label template](create-or-update-a-label-template).\n\n## Document (PDF) templates\n\nWhen **Printer type** is set to `document`, the template renders as a PDF using the jsPDF library and opens the browser print dialog. This is suited to multi-line documents such as invoices, packing slips, and quotes.\n\nDocument templates use special Liquid tags that map directly to jsPDF methods, wrapped in a `{% pdf %}` block:\n\n\n```liquid\n\n{% pdf orientation: 'portrait', format: 'a4' %}\n  {% set_font 'helvetica', 'bold' %}\n  {% set_font_size 16 %}\n  {% text 'Tax Invoice', 20, 20 %}\n  {% set_font 'helvetica', 'normal' %}\n  {% set_font_size 11 %}\n  {% text current_order.reference, 20, 32 %}\n  {% line 20, 40, 190, 40 %}\n{% endpdf %}\n```\n\n\nFor the full jsPDF tag reference and more examples, see [Document print templates](pos-document-print-templates).\n\n## Print actions\n\nPOS print templates are triggered from POS layouts using print actions. You can attach these to action items, buttons, or other interactive elements.\n\n### print:cart\n\nPrints the active cart as a quote using the default cart template, or a specified template override. If no `cart_sc_id` is provided, the currently active cart is used.\n\n```json\n\n{\n  \"action\": \"print:cart\"\n}\n```\n\n**With a template override:**\n\n```json\n\n{\n  \"action\": \"print:cart\",\n  \"params\": \"print_template_sfid=a2cMn00003s4X88IAE\"\n}\n```\n\n| Parameter | Required | Description |\n|-----------|----------|-------------|\n| `cart_sc_id` | No | StoreConnect ID of the cart to print. Defaults to the active cart. |\n| `print_template_sfid` | No | SFID of a cart-context template to use instead of the default |\n\n### print:receipt\n\nPrints a receipt for an order using the default receipt template, or a specified template override.\n\n\n```json\n\n{\n  \"action\": \"print:receipt\",\n  \"params\": \"order_sc_id={{ record.id }}\"\n}\n```\n\n\n**With a template override:**\n\n\n```json\n\n{\n  \"action\": \"print:receipt\",\n  \"params\": \"order_sc_id={{ record.id }};print_template_sfid=a2cMn00003s4X88IAE\"\n}\n```\n\n\n| Parameter | Required | Description |\n|-----------|----------|-------------|\n| `order_sc_id` | Yes | The order's StoreConnect ID |\n| `print_template_sfid` | No | SFID of a receipt-context template to use instead of the default |\n\n### print:labels\n\nPrints product labels for one or more products using the default label template, or a specified template override.\n\n\n```json\n\n{\n  \"action\": \"print:labels\",\n  \"params\": \"product_sfids={{ record.sfid }}\"\n}\n```\n\n\n**Multiple products and custom quantity:**\n\n```json\n\n{\n  \"action\": \"print:labels\",\n  \"params\": \"product_sfids=a01xxx,b02yyy;quantity=3\"\n}\n```\n\n| Parameter | Required | Description |\n|-----------|----------|-------------|\n| `product_sfids` | Yes | Comma-separated Salesforce IDs of products to print labels for |\n| `quantity` | No | Number of labels per product (default: 1) |\n| `print_template_sfid` | No | SFID of a label-context template to use instead of the default |\n\n### print:template\n\nPrints using any template by SFID, with optional custom context variables.\n\n```json\n\n{\n  \"action\": \"print:template\",\n  \"params\": \"print_template_sfid=a1b2c3d4e5f6g7h8\"\n}\n```\n\n**With additional context:**\n\n\n```json\n\n{\n  \"action\": \"print:template\",\n  \"params\": \"print_template_sfid=a1b2c3d4e5f6g7h8;order_id={{ record.id }};custom_note=Pick up by 5pm\"\n}\n```\n\n\n| Parameter | Required | Description |\n|-----------|----------|-------------|\n| `print_template_sfid` | Yes | SFID of the POS Print Template record |\n| `*` | No | Any additional parameters are passed as Liquid context variables |\n\n:::tip\nUse `print:template` when you need to print a specific template that isn't the default for its type, or when you want to pass custom variables into the template content.\n:::\n\n## Quest Airpay TAP receipts\n\nQuest Airpay TAP payment receipts are printed with the `print:quest_receipt` action and the `order_sc_id` parameter. This action prints the receipt data returned by the Quest terminal and does not use a configurable template.\n\n\n```json\n\n{\n  \"action\": \"print:quest_receipt\",\n  \"params\": \"order_sc_id={{ record.id }}\"\n}\n```\n\n\n| Parameter | Required | Description |\n|-----------|----------|-------------|\n| `order_sc_id` | Yes | The order's StoreConnect ID |\n\nTo include Quest payment output in your own receipt layout instead, use a standard `print:receipt` action with a custom template and read the Quest receipt data from `payment.gateway_receipt`:\n\n\n```liquid\n\n{% for payment in order.payments %}\n  {% if payment.gateway_receipt %}\n    {{ payment.gateway_receipt }}\n  {% endif %}\n{% endfor %}\n```\n\n\n## Printer output formats\n\nEach printer type sends a different format to the hardware, which determines how you write the template:\n\n| Printer type | Output format | Hardware |\n|---|---|---|\n| Receipt | ESC/POS or Star PRNT commands, rendered from RPML print markup | Thermal receipt printers |\n| Label | Raw ZPL or EPL commands, sent to the printer exactly as the template renders them | Label printers |\n| Document | PDF, opened in the browser print dialog | Any printer installed on the device |\n\nReceipt templates are sized to the connected printer's characters per line, which varies by model. Star PRNT and ESC/POS printers are not interchangeable at the template level: a template built for a 42 character 80mm printer wraps badly on a 32 character 58mm one.\n\nFor the supported models, their character widths, and the printer profile settings for a model POS does not recognize, see [Compatible hardware for POS](compatible-hardware-for-pos). For connecting the hardware to a register, see [Connect POS printers](connect-pos-printers)."}