Skip to main content
— Setup walkthrough

Customise your watermark template with variables

The watermark template is a piece of text that runs through a token replacer for every order. Static text stays as-is; tokens wrapped in curly braces are swapped out with the buyer's name, email, order number, and other order data at stamp time.

Before you start

Open Settings → PDF Watermarking in the Alva admin. Watermarking is paid-plan only. The template editor has two fields: the stamp template (the large diagonal or positioned overlay) and the footer template (smaller text on the bottom of each page). Both accept the same variables.

How the template renders

At stamp time, Alva Digital Downloads parses the template, finds every {token}, and substitutes the buyer's data. Anything outside the curly braces is rendered exactly as written. The stamp template and the footer template share the same token list, so a variable that works in one field works in the other.

Available variables

Alva supports ten tokens grouped into four categories. Use any combination of them across the stamp and footer fields.

Customer

  • {customer.full_name} — buyer's full name from Shopify. Falls back to email when name parts are empty (this happens for Shopify POS orders where only email is captured).
  • {customer.first_name} — first name only.
  • {customer.last_name} — last name only.
  • {customer.email} — buyer's email address.

Order

  • {order.name} — Shopify order name, e.g. #1234.
  • {order.id} — internal Shopify order identifier (long numeric).
  • {order.date} — order creation date in your shop's timezone.

Product

  • {product.title} — title of the Shopify product the PDF belongs to.
  • {file.name} — the PDF's original filename.

Shop

  • {shop.name} — your Shopify store name.

Add a variable via the picker

1. Click the field you want to edit

Click the stamp template or footer template field to focus it. The cursor lands wherever you click inside the existing text.

2. Click any variable button

Under the field, click any variable button — for example, {customer.full_name}. Each token is exposed as a single click.

3. Alva appends the token to the field

Alva appends the token to the end of the current field text. Drag the cursor and rearrange the line by hand if you need the token in a different position.

4. Repeat for every variable

Repeat for every variable you want to mix into the template, then save the settings page. Clicking a variable button appends to the end of the field — it does not insert at the cursor position.

Example templates

Three example templates that work well as starting points. Copy any of them into either field and tweak the static text to taste.

Minimal trace marker

Licensed to {customer.email} · Order {order.name}

Friendly buyer-facing line

{customer.full_name} — purchased from {shop.name} on {order.date}

Full footer line

{product.title} · Order {order.name} · {customer.email} · {shop.name}

Limits and safety

  • Each template field is capped at 1,000 characters.
  • Line breaks, tabs and other control characters in customer data are stripped to spaces before rendering — Alva Digital Downloads sanitises tokens so a buyer can't break the layout with crafted profile data.
  • Empty values (e.g. customer with no last name) render as empty strings, so {customer.first_name} {customer.last_name} collapses cleanly to just the first name with no trailing space when needed.
  • Unknown tokens ({order.shipping_country} etc.) are left in the rendered output literally — Alva only swaps tokens it knows about.

Preview your template

The settings page shows a live preview using fake test data — Test Customer, test@example.com, #1001. The preview is a CSS mock, not an actual stamped PDF. To verify the real output, opt one product in via Enable PDF watermarking on a specific product, place a test order against yourself, and download the file.

Frequently asked questions

Can I use the same template for the stamp overlay and the footer line?

Yes — both fields accept the same variables. Many stores write a single short trace line in the footer and a more decorative customer-facing line in the diagonal stamp. The two fields are independent so you can also use only one of them by leaving the other blank.

What appears in {customer.full_name} for a Shopify POS order?

Shopify POS captures the customer's email at checkout but rarely captures first and last name. When both name parts are empty, Alva Digital Downloads falls back to the customer's email so the watermark never reads "Licensed to ".

Are unknown tokens like {customer.phone} replaced with anything?

No. Only the documented tokens are substituted. Anything else is left literal in the rendered PDF, which makes typos visible — a stamp reading "Licensed to {customer.emial}" tells you immediately that the template has a typo to fix.

See also

Was this helpful?

Still stuck? Email us.

Last updated 2026-05-28