Getting startedCreate your first template

Create your first template

Copy page

Start from a ready-made invoice, packing slip, product data sheet, customer summary or a blank page, make it yours and save it.

A template is the design of one kind of document. This walkthrough creates one from a ready-made starting point, checks it against a real order and saves it, so a Flow workflow can use it.

Step 1: Pick a starting point

Open Templates and select Create template. The New template page lists the ready-made templates under Start from. Select Use this on the one you want.

Template Renders What it contains
Invoice An order Line items, taxes and totals of an order
Packing slip An order What to pack and where it goes, without prices
Product data sheet A product Description, options and every variant with SKU and price
Customer summary A customer Contact details, totals and the most recent orders of a customer
Blank An order An empty page to start from scratch

The template is created at once and the editor opens. If a template with that name already exists, the new one gets a number, for example Invoice 2.

Step 2: Look at it with your own data

The right half of the editor is the Preview. It shows the template with your latest order, product or customer, depending on what the template renders. On a store without any, it shows sample data.

Use Preview with to switch to a specific order, product or customer, and Preview PDF to open the real PDF. See The template editor.

Step 3: Make it yours

The ready-made templates already use your branding. Before you change any code, open Settings in the app navigation and add your logo, colors, fonts and company details. They appear in the preview of every template. See Branding your documents.

Then adjust the template itself:

Step 4: Name it and save

On the Settings tab, check the Name. The Generate document action in Shopify Flow finds the template by this exact name, so choose a name you will not need to change later.

Select Save in the bar at the top. A template is only saved when it renders: if the Liquid has an error, the save is refused and the error is shown with its line, so a broken template never reaches a workflow.

Start from scratch

Pick Blank for an empty page. It renders an order. To build a document for a product or a customer instead, open the Settings tab and change Renders, then replace the HTML: the variables of the other resource apply from then on.

Turn a template off

Clear Template is on on the Settings tab to stop a template without deleting it. While it is off, Flow and the API refuse to generate documents with it.

Deleting a template is permanent. Workflows and API calls that name it stop working, and the documents it generated stay in the history.

Next steps