---
title: "POS print templates"
source: https://support.storeconnect.com/articles/pos-print-templates
type: article
format: markdown
site: StoreConnect Support — product and developer documentation for StoreConnect
site_index: https://storeconnect.com/llms.txt
docs_index: https://support.storeconnect.com/llms.txt
note: Append .md to any page or article URL on this site to get its Markdown form.
---
# POS print templates

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.

The POS Print Template system supports three output types:

- **Receipt** — formatted output for ESC/POS or Star PRNT thermal receipt printers
- **Label** — ZPL or EPL commands for label printers
- **Document** — PDF output via a browser print dialog, for invoices, packing slips, and custom documents

Cart 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.

## How it works

Each POS Print Template record has two key settings:

- **Context** — determines what data is available in the template (`cart`, `receipt`, or `label`)
- **Printer type** — determines where the output is sent (`receipt`, `label`, or `document`)

These 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.

When a print action fires in the POS, StoreConnect:

1. Looks up the template (by SFID or from the default set in POS settings)
2. Builds a Liquid context from the template's context setting
3. Renders the Liquid template
4. Sends the output to the matching printer

## Create a POS print template

1. In Salesforce, go to **POS Print Templates** in the StoreConnect navigation.
2. Select **New**.
3. Enter a descriptive **Name** for the template, for example "Standard receipt" or "Barcode label 4x2".
4. Set the **Context**:
   - `cart` — template receives cart/quote data (`current_cart`, `current_outlet`, `current_store`)
   - `receipt` — template receives order data (`current_order`, `current_outlet`, `current_store`)
   - `label` — template receives product data (`products`, `quantity`)
5. Set the **Printer type**:
   - `receipt` — output is sent to the thermal receipt printer
   - `label` — output is sent to the label printer
   - `document` — output is rendered as a PDF and sent to the browser print dialog
6. Enter your **Content**, which is the Liquid template. See the sections below for syntax guidance by type.
7. Select **Save**.

The 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.

:::note
The **StoreConnect External ID** field is auto-generated on save. Do not modify it.
:::

## Set default templates in POS settings

After creating templates, set them as defaults in POS Hardware Settings so they are used automatically when print actions run without a template override.

:::note
Set the defaults in the POS under **Settings** > **Hardware**, where there is a selector for the default cart template, the default receipt template, and the default label template.
:::

## Template contexts and available variables

### Cart context

Available when **Context** is set to `cart`.

| Variable | Type | Description |
|----------|------|-------------|
| `current_cart` | Cart | The active cart/quote being printed |
| `current_outlet` | Outlet | The POS outlet where the print was triggered |
| `current_store` | Store | The store |

Use 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.

For a full variable reference and sample template, see [Create a POS cart print template](pos-cart-template).

### Receipt context

Available when **Context** is set to `receipt`.

| Variable | Type | Description |
|----------|------|-------------|
| `current_order` | Order | The order being printed |
| `current_outlet` | Outlet | The POS outlet where the print was triggered |
| `current_store` | Store | The store |

Use the receipt context for templates that print order summaries, receipts, invoices, or any output based on a completed order.

Receipt 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:

| Tag | Description |
|-----|-------------|
| `{document}` | Opens the document, with optional settings such as `word-wrap=true` |
| `{center}` / `{left}` | Text alignment |
| `{bold}` / `{endBold}` | Start and end bold text |
| `{line}` | Blank line |
| `{rule}` | Horizontal rule |
| `{table cols=N}` | Multi-column table layout |
| `{image src="..." size=N}` | Image, such as an outlet logo |
| `{qrcode data="..."}` | QR code |

For receipt template syntax and a full working example, see [Create or update a POS receipt template](pos-receipt-template).

### Label context

Available when **Context** is set to `label`.

| Variable | Type | Description |
|----------|------|-------------|
| `products` | Array | The products to print labels for |
| `quantity` | Number | Number of labels to print per product (default: 1) |

For 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).

## Document (PDF) templates

When **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.

Document templates use special Liquid tags that map directly to jsPDF methods, wrapped in a `{% pdf %}` block:


```liquid

{% pdf orientation: 'portrait', format: 'a4' %}
  {% set_font 'helvetica', 'bold' %}
  {% set_font_size 16 %}
  {% text 'Tax Invoice', 20, 20 %}
  {% set_font 'helvetica', 'normal' %}
  {% set_font_size 11 %}
  {% text current_order.reference, 20, 32 %}
  {% line 20, 40, 190, 40 %}
{% endpdf %}
```


For the full jsPDF tag reference and more examples, see [Document print templates](pos-document-print-templates).

## Print actions

POS print templates are triggered from POS layouts using print actions. You can attach these to action items, buttons, or other interactive elements.

### print:cart

Prints 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.

```json

{
  "action": "print:cart"
}
```

**With a template override:**

```json

{
  "action": "print:cart",
  "params": "print_template_sfid=a2cMn00003s4X88IAE"
}
```

| Parameter | Required | Description |
|-----------|----------|-------------|
| `cart_sc_id` | No | StoreConnect ID of the cart to print. Defaults to the active cart. |
| `print_template_sfid` | No | SFID of a cart-context template to use instead of the default |

### print:receipt

Prints a receipt for an order using the default receipt template, or a specified template override.


```json

{
  "action": "print:receipt",
  "params": "order_sc_id={{ record.id }}"
}
```


**With a template override:**


```json

{
  "action": "print:receipt",
  "params": "order_sc_id={{ record.id }};print_template_sfid=a2cMn00003s4X88IAE"
}
```


| Parameter | Required | Description |
|-----------|----------|-------------|
| `order_sc_id` | Yes | The order's StoreConnect ID |
| `print_template_sfid` | No | SFID of a receipt-context template to use instead of the default |

### print:labels

Prints product labels for one or more products using the default label template, or a specified template override.


```json

{
  "action": "print:labels",
  "params": "product_sfids={{ record.sfid }}"
}
```


**Multiple products and custom quantity:**

```json

{
  "action": "print:labels",
  "params": "product_sfids=a01xxx,b02yyy;quantity=3"
}
```

| Parameter | Required | Description |
|-----------|----------|-------------|
| `product_sfids` | Yes | Comma-separated Salesforce IDs of products to print labels for |
| `quantity` | No | Number of labels per product (default: 1) |
| `print_template_sfid` | No | SFID of a label-context template to use instead of the default |

### print:template

Prints using any template by SFID, with optional custom context variables.

```json

{
  "action": "print:template",
  "params": "print_template_sfid=a1b2c3d4e5f6g7h8"
}
```

**With additional context:**


```json

{
  "action": "print:template",
  "params": "print_template_sfid=a1b2c3d4e5f6g7h8;order_id={{ record.id }};custom_note=Pick up by 5pm"
}
```


| Parameter | Required | Description |
|-----------|----------|-------------|
| `print_template_sfid` | Yes | SFID of the POS Print Template record |
| `*` | No | Any additional parameters are passed as Liquid context variables |

:::tip
Use `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.
:::

## Quest Airpay TAP receipts

Quest 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.


```json

{
  "action": "print:quest_receipt",
  "params": "order_sc_id={{ record.id }}"
}
```


| Parameter | Required | Description |
|-----------|----------|-------------|
| `order_sc_id` | Yes | The order's StoreConnect ID |

To 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`:


```liquid

{% for payment in order.payments %}
  {% if payment.gateway_receipt %}
    {{ payment.gateway_receipt }}
  {% endif %}
{% endfor %}
```


## Printer output formats

Each printer type sends a different format to the hardware, which determines how you write the template:

| Printer type | Output format | Hardware |
|---|---|---|
| Receipt | ESC/POS or Star PRNT commands, rendered from RPML print markup | Thermal receipt printers |
| Label | Raw ZPL or EPL commands, sent to the printer exactly as the template renders them | Label printers |
| Document | PDF, opened in the browser print dialog | Any printer installed on the device |

Receipt 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.

For 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).

---

## Follow StoreConnect

- [Email Newsletter](https://storeconnect.com/c/lp-newsletter)
- [LinkedIn Newsletter](https://www.linkedin.com/build-relation/newsletter-follow?entityUrn=7444956928444862464)
- [YouTube](https://www.youtube.com/channel/UCngKdP2x8l1wcbAKW3tvU8g)
- [LinkedIn](https://www.linkedin.com/company/storeconnect)
- [X / Twitter](https://x.com/storeconnecthq)

## Popular Links

- [Partners](https://storeconnect.com/partners)
- [Become a Partner](https://storeconnect.com/become-a-partner)
- [News](https://storeconnect.com/articles/news)
- [Events](https://storeconnect.com/articles/events)
- [Live Events](https://storeconnect.com/live-events)
- [Feature Comparison](https://storeconnect.com/how-we-compare)
- [Download a free trial](https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FMkeKUAT)
- [Book a Demo](https://storeconnect.com/contact)

## Documentation

- [Help documentation](https://support.storeconnect.com/help-documentation)
- [AI agents](https://support.storeconnect.com/ai)
- [Videos & tutorials](https://support.storeconnect.com/videos-tutorials)
- [Developer reference](https://support.storeconnect.com/developer-reference)
- [Release notes](https://support.storeconnect.com/release-notes)
- [Troubleshooting](https://support.storeconnect.com/troubleshooting)
- [Trust Center](https://trust.getstoreconnect.com/)
- [Status Page](https://status.storeconnect.com/)

## Contact

- info@getstoreconnect.com
- US +1 415 745 3230
- AUS +61 2 8365 2308

100 S Ashley Dr, Suite 600-2461
Tampa FL 33602-600 USA

Level 22, Sydney Place
180 George Street
Sydney, NSW, 2000, AUS

## Machine-readable

- [Site index for agents](https://storeconnect.com/llms.txt): curated map of the StoreConnect site in llms.txt format
- [Documentation index for agents](https://support.storeconnect.com/llms.txt): full technical and product documentation map

Every page and article on this site has a Markdown rendering: append `.md` to its URL.

Continue in Markdown: [Help documentation](https://support.storeconnect.com/help-documentation.md) · [Developer reference](https://support.storeconnect.com/developer-reference.md) · [Videos & tutorials](https://support.storeconnect.com/videos-tutorials.md) · [Release notes](https://support.storeconnect.com/release-notes.md)

---

StoreConnect Support — https://support.storeconnect.com/articles/pos-print-templates