AwardXero App of the Year Awards 2026 Finalist
qoblex_logo_main

Document Customization

.docx Fields for Purchase Orders

This article lists the merge fields you can place in a Word template for a purchase order. Each field comes with what it prints, so you can build the template without guessing.

Use it next to Build a .docx template in Word while you work. When you finish, you will know which fields exist, how the product and landed-cost lines repeat, and what to check in a test print.


Before you start

A purchase order template is a .docx template whose Category is Purchases. Qoblex fills it with the order’s data and gives you a PDF, never a Word file.

Copy the field names below into Word merge fields rather than retyping them. Capital letters do not matter, so Subtotal and SubTotal print the same value. For how merge fields work in general, see How .docx templates work.

Where the template is used

You choose the template each time you print, email or request approval for a purchase order.

Action Where you find it Template choice
Print The printer icon on the purchase order Print Document dialog
Email The email button on the purchase order Email document dialog
Request approval The Request Approval button, shown only on draft orders to users who cannot approve purchases themselves Template list in the dialog

Each print covers one purchase order.

What the Print Document list shows

The Print Document list shows your Purchases templates, both designer designs and .docx files, plus any Product Labels designs. Qoblex preselects the first one in the list.

The email and approval dialogs list Purchases templates only. Product Labels designs do not appear there.

If you have no Purchases template and no Product Labels design, the list offers only Default Template, the built-in layout. Once you add a Purchases template, the built-in layout is no longer in the list.

With no Purchases template, the email and approval dialogs show a single Default Branding Theme choice instead.

If your only design is one Product Labels design, the list shows that design plus Default Template, and the label design is preselected. With two or more label designs and no Purchases template, Default Template does not appear. Choosing a label design prints product labels instead of the order, so check which item is selected before you print.

Order header fields

These fields sit outside any repeating range. Put them anywhere in the document, including tables, but outside the product and landed-cost ranges. Inside a range they print blank.

Field What it prints
Number The purchase order number.
Reference The reference typed on the order.
CreatedDate When the order was created, in the time zone of the person printing. Add a date format, as in How numbers and dates print.
DueDate The order’s due date, in the time zone of the person printing. Add a date format too.
Notes The order comments. The comments box is a rich-text editor, so plain Notes can print the formatting code as text. Use Html:Notes for order comments.
Currency The currency symbol of the order, such as $ or € for USD or EUR. Falls back to your company currency when the order has none.
CurrencySymbol The same as Currency.
CurrencyName The currency code stored on the order, such as USD. Blank when the order has no currency.
CurrencyRate The exchange rate on the order.

Totals

Totals are converted at the order’s exchange rate and rounded to two decimals, except where the table says otherwise. Add a number format such as \# "#,##0.00" to show thousands separators.

Field What it prints
SubTotal Line totals after discounts, plus landed costs, before tax is added. When prices include tax, SubTotal already includes it and equals Total.
TotalTax Total tax across product lines and landed costs.
Total SubTotal plus TotalTax. When prices already include tax, tax is not added again.
TotalUnitsCount The ordered quantity across product lines. Landed costs and received quantities are not counted.
TotalDiscount The sum of line and landed-cost discounts. Not rounded.
HasDiscount The text True or False, depending on whether any line or landed cost has a percentage discount above zero.
IsTaxInclusive Whether the order’s prices include tax. Prints True or False.
PaidAmount The payments recorded against the order’s bills, converted at the exchange rate and rounded to your Decimal display setting.
BalanceDue Total minus the paid amount, converted and rounded the same way.
TotalRefund The total of supplier refunds recorded on the order, converted at the exchange rate. Not rounded. Supplier returns are not included.

Total does not subtract refunds.

Supplier and company fields

Dotted names reach into a group of details. Type the whole name, dots included, as one merge field.

Supplier fields

The order’s supplier is available as Supplier. On a purchase order, Customer holds the same contact, so Customer.Name prints the supplier’s name too.

Field What it prints
Supplier.Name The supplier’s name.
Supplier.Person The contact person.
Supplier.Email The supplier’s email address.
Supplier.TaxNumber The supplier’s tax number.
Supplier.Eori The supplier’s EORI number.
Supplier.Notes The comments saved on the supplier. Like Notes, it can print formatting code as text.
Supplier.PrimaryAddress.* The first address saved on the supplier.
Supplier.SecondaryAddress.* The second address, or the first when there is only one.
Supplier.ShippingAddress.* The supplier address typed as shipping.
Supplier.BillingAddress.* The supplier address typed as billing.

Replace the * with an address part from the address parts table, for example Supplier.PrimaryAddress.City.

Any Supplier. field also works with Customer., for example Customer.Email or Customer.PrimaryAddress.City. If the supplier has no address typed as shipping or billing, those fields print blank.

Your company

Field What it prints
Company.Name Your company name.
Company.Phone Your company’s landline phone.
Company.Address.* The address of your company’s first location that cannot hold inventory. If the address looks wrong, check which location that is.

There is no logo field for purchase orders. Place your logo in Word as an ordinary picture.

Ship-to and bill-to addresses

Field What it prints
ShippingAddress.* The address of the order’s ship-to location, which is where you receive the goods.
BillingAddress.* The address of the order’s bill-to location.

On a drop-ship purchase order, ShippingAddress still prints your ship-to location. No .docx field prints the end customer’s address.

Address parts

Every address field takes the same parts after the last dot.

Address part What it prints
LineOne Address line 1.
LineTwo Address line 2.
City City.
State State or region.
ZipPostCode ZIP or postcode.
Country Country.
LandlinePhone Landline phone.
MobilePhone Mobile phone.

Examples: ShippingAddress.ZipPostCode, BillingAddress.LandlinePhone, Company.Address.Country.

There is no single full-address field. Place each part on its own line, or separate them with commas.

Blank address parts

An address part with no value prints as nothing, and Qoblex does not remove the empty line around it. A blank LineTwo leaves a blank line.

Before you use Supplier.PrimaryAddress.*, make sure the supplier has at least one address saved. Do the same for Company.Address.* and a location that cannot hold inventory. Print a sample order to check.

Product lines

Product lines repeat. Put RangeStart:OrderItems at the start of the part you want repeated and RangeEnd:OrderItems at the end. Everything between them prints once per product line, in the order shown on the purchase order.

The name after RangeEnd: must match the name after RangeStart:. If it does not, the print fails.

Where you place the two fields decides what repeats:

  • Same table row: put RangeStart:OrderItems in the first cell and RangeEnd:OrderItems in the last cell. The row repeats for each product and the header row prints once. This is the easiest layout.
  • Different paragraphs: the whole block of paragraphs between them repeats.
  • Same paragraph: the lines run on together in one paragraph.

Inside the range only the product line’s fields fill. Header fields such as Number print blank there, so keep them outside the range.

Fields inside the OrderItems range

Field What it prints
ProductName The product name on the line.
SKU The variant SKU.
SupplierSKU The supplier’s SKU for the variant.
Barcode The variant barcode.
Quantity The ordered quantity, without trailing zeros.
UnitOfMeasure The unit of the line’s quantity.
Price The unit cost, converted at the order’s exchange rate.
Discount The line’s percentage discount, rounded to a whole number.
Tax The tax rate of the line’s tax class, as a number. 0 when the line has no tax.
TaxAmount The tax amount for the line.
Total The line total after discount.
Notes The notes typed on the line.
Image The product image. Use it as Picture:Image. See Product images.
HarmonizedSystemCode The variant’s harmonized system code.
CountryOfOrigin The variant’s country of origin.
RetailCompareAtPrice The variant’s retail compare-at price.
WholesaleCompareAtPrice The variant’s wholesale compare-at price.
Currency The currency symbol.
CurrencyName The currency code. Blank when the order has none.
CustomField:<key> A product custom field. See Product custom fields.

On a purchase order, Price is what you pay the supplier per unit, not your selling price. Total already includes the line’s discount.

Fields that do not exist

These fields are not available:

Missing Note
Received quantity No field prints it.
Bundle components No field prints bundle components.

Landed costs

Landed costs repeat the same way, with RangeStart:CustomItems and RangeEnd:CustomItems. Fields with the same name as a product line field, such as Total or Currency, give the landed cost’s value inside this range. These are the landed cost and expense lines added on the order, listed in the order shown there.

Field What it prints
ItemName The landed cost description.
Quantity The quantity, without trailing zeros.
Price The unit price.
Total The line total after discount.
Tax The tax rate as a number.
TaxAmount The tax amount.
Currency The currency symbol.
CurrencyName The currency code.

Landed costs have no Discount, Notes, SKU or CustomField: fields.

When there are no landed costs

If the order has no landed costs, Qoblex removes everything inside the CustomItems range. The same applies to OrderItems when there are no product lines. In a table, only the repeating row goes. A header row above it stays, so a purchase order without landed costs prints that heading with no rows under it.

Notes with formatting

Use Html:Notes instead of Notes to keep the formatting typed in the order comments: bold text and paragraphs become Word formatting in the PDF.

Put the field alone on its own line. Inside a sentence, the formatted text breaks onto its own lines and splits the text around it. When the order has no comments, the paragraph disappears and no blank line is left.

Type the prefix exactly as Html:, with a capital H. A different spelling, such as html:Notes, matches no field and prints nothing.

Use Html: only for fields that hold formatted text, such as Notes and Supplier.Notes.

Product images

Put Picture:Image in the product row to print the product photo. Qoblex supplies the variant’s image, or the product’s first image when the variant has none.

Copy the image cell from the starter template unchanged, including the \y switch in Picture:Image \y and the small picture inside the field. Then check the photo size in a test print.

Products without an image

Print a test order that includes a product with no image, and check that row before you send the template out. Remove the picture column if you do not want it.

Product custom fields

CustomField:<key> prints a product custom field on each product line. Use it only inside the OrderItems range.

Replace <key> with the field’s Key. For a field whose Key is material, the merge field is CustomField:material.

Find the key

  1. Open Account Settings and click Documents. The Branding and Customization page opens.
  2. Under Products, find the Custom Field Definitions table.
  3. Read the Key column. Do not use the Display Name.

What to expect

  • Copy the key exactly as it appears in the Key column, capitals included.
  • A line without a value prints blank, never the field name.
  • Only product custom fields work. Order and supplier custom fields are not available.
  • Landed-cost rows cannot use custom fields.

How numbers and dates print

Qoblex rounds the values before it fills your template. Order totals use two decimals. Line prices, taxes and totals use the Decimal display setting on your company profile. Dates follow the time zone of the person printing.

Add a Word format switch to every number and date field:

  • A number with no switch prints all its decimals and no thousands separator, such as 1247.067. With \# "#,##0.00" it prints 1,247.07.
  • A date with no switch prints with the time. With \@ "dd MMM yyyy" it prints 20 Oct 2026, and with \@ "dddd, dd MMMM yyyy" it prints Tuesday, 20 October 2026.
  • HasDiscount and IsTaxInclusive print True or False. To show your own wording, use a Word IF field, for example { IF «HasDiscount» = "True" "Includes a discount" "" }.

The starter template carries the date format on CreatedDate and DueDate, and a two-decimal number format (\#0.00) on prices and totals. Change that to \# "#,##0.00" if you want thousands separators. The starter has no IF field, so add that yourself. Use common fonts such as Arial or Calibri, and check the fonts in a test print.

Start from the sample template

The sample purchase template shows the fields in a working layout. Open the Document Template Editor with Add .docx Template, then click the purchase link in the intro text at the top. Do not use the editor’s large Word download link, which gives you your own uploaded file instead.

It uses these fields:

  • Supplier address, Reference, Number, CreatedDate and DueDate at the top.
  • ShippingAddress.* and BillingAddress.* for the delivery and billing details.
  • An OrderItems row with image, name, notes, supplier SKU, HS code, country of origin, quantity, price, tax and total.
  • A CustomItems row for landed costs.
  • Subtotal, tax, units and total, then Html:Notes at the bottom.

Open the sample in Word, replace the text and styling, and keep the merge fields.

Troubleshooting

A field is blank in the PDF
A misspelled field name prints nothing and gives no error. Compare the name with the tables above, copy it from this page or the starter template, then upload the template again and print another test. A field that holds no value on the order, supplier or product also prints blank.
An address line is blank in the PDF
Check the order or the supplier for the missing detail. Blank address lines are not removed, so remove address parts you never use from the template in Word.
There was an error while generating the pdf document
Qoblex does not say which field failed. Check that the name after RangeEnd: matches the name after RangeStart:. Then remove fields in groups and print again until the PDF works.
The product photos are the wrong size
Copy the image cell from the starter template unchanged, including the \y switch and the small picture inside the field. Upload the template again and print a test to check the size.
Header fields are blank in the product row
Header fields such as Number print blank inside a range. Move them outside RangeStart:OrderItems and RangeEnd:OrderItems.
The landed-cost heading prints with no rows
When an order has no landed costs, the repeating row is removed but a header row above it stays. Delete the heading in Word if you never want it.
My custom field prints nothing
Check that the field is inside the OrderItems range and that you used the Key, not the Display Name. The product must also have a value saved.

Share

Your next stage of growth is just a click away