Print configuration
Every print key, the Document it renders from and every property it reads, plus per-print email subjects and bodies and requirements that gate a print.
A print integration turns Documents into PDFs, such as delivery notes, invoices and pallet
labels, and emails them. Every print is driven by one entry in the integration's
genericPrintConfigs. Each entry is a print key, which chooses the print, plus a free-form
properties object, which is whatever that print accepts:
{
"emailAddresses": ["warehouse@example.com"],
"emailSubject": "Delivery note {0}",
"genericPrintConfigs": [
{
"printKey": "pallet-label",
"properties": { "copies": 2, "maximumItems": 4 }
}
]
}
This page lists every print, the Document type it renders from, and the properties it reads.
Rules every print follows
- A property left out falls back to its default. The Default column in the tables below is what the print uses when the property is absent. A blank means null or empty.
- The properties object is never validated. A misspelt key is silently ignored, so check names against this page. Each print reads its own shape, so the same property name can mean different things to different prints.
- A print only renders Documents of its type. Configuring
order-a4against a pick produces a translation error, not a PDF. - A print the Document gives nothing to produces no output, and that's not an error. A pallet label on a despatch that was never palletised creates no PDF and no email, and the integration's other prints are unaffected. You don't need a requirement for this.
- Several prints can share one integration. A despatch producing a delivery note and pallet labels lists both keys, each with its own properties.
Integration settings around the prints
These settings sit beside genericPrintConfigs and belong to the integration rather than to any
one print: emailAddresses, emailSubject, emailBodyText, emailSubjectTemplate,
emailBodyTemplate and cartonUnitOfMeasureId. The source guide documents them with the other
integration settings rather than here.
Every print entry
Each entry in genericPrintConfigs can carry these properties.
| Property | Type | Default | What it does |
|---|---|---|---|
printKey | text | Which print this entry configures. See Print keys. | |
properties | object | The configuration that print reads, in its own shape. See the print's own section below. | |
requirement | map expression | A true-or-false map expression that gates this print. Omit it to always print. See Requirements. | |
emailSubject | text | The email subject for this print alone. Null falls back to the integration's; an empty string sends no subject. | |
emailSubjectTemplate | text | A Liquid template for this print's email subject, used ahead of every other subject. | |
emailBodyText | text | The email body for this print alone. Null falls back to the integration's; an empty string sends no body. | |
emailBodyTemplate | text | A Liquid template for this print's email body, used ahead of every other body. |
Email subject and body
Each print can carry its own subject and body, so a despatch producing a delivery note and pallet labels doesn't send both under one subject. The subject and the body each resolve down their own chain, stopping at the first one that's set:
subjectTemplate (entry) -> subject (entry) -> subjectTemplate (integration) -> subject (integration)
Null falls through. An empty string is an answer: it stops the chain, and the email goes out with nothing there.
Templates
A template is written in Liquid and rendered when the output is created. It can read
printKey, reference, filename, documentNumber, documentType and documentDate:
"emailSubjectTemplate": "Delivery note {{ documentNumber }} for {{ reference }}"
Link placeholders
A template can't link to the Document or the file, because those links are built when the email
is sent, long after the template has run. A plain emailSubject or emailBodyText reaches the
sender unrendered and keeps its numbered placeholders, which is where the links are:
| Placeholder | What it becomes | Subject | Body |
|---|---|---|---|
{0} | The combined reference | Yes | Yes |
{1} | The reference | Yes | Yes |
{2} | The source reference | Yes | Yes |
{3} | The ID | Yes | Yes |
{4} | The file's URL | Yes | |
{5} | The Document's URL | Yes |
Use a template for anything that reads the Document, and a plain string for anything that needs a link.
Requirements
An entry's requirement is a true-or-false map expression, in the same language (and with the
same $.document root) as a config-driven map's condition. Omit it and the print always runs.
This one prints pallet labels only when the Document has containers:
{
"printKey": "pallet-label",
"requirement": {
"op": "compare", "operator": "gt",
"left": { "op": "path", "path": "$.document.containers.length()" },
"right": { "op": "literal", "value": 0 }
}
}
- Anything but true is a no. An expression that reads a field the Document doesn't carry produces nothing, and nothing doesn't print.
opneedn't be written first. Stored settings can come back with their keys reordered.- A field the language doesn't have is refused, not dropped. This stops half a requirement silently deciding whether a Document prints. Both checks happen when the settings are saved, not on the first despatch.
- A skipped print has still had its identifiers resolved, because that happens before any requirement is evaluated. It costs a lookup and changes nothing about what's produced.
Print keys
| Key | Document type | Properties |
|---|---|---|
3v-delivery-note | Pick | 3V delivery note and packing list |
3v-large-label | Pick | 3V large label |
3v-packing-list | Pick | 3V delivery note and packing list |
backcountry-shipping-label | Pick | None |
credit-a4 | Credit | A4 Document prints |
invoice-a4 | Invoice | A4 Document prints |
kehe-shipping-label | Pick | None |
order-a4 | Order | A4 Document prints |
pallet-label | Pick | Pallet label |
proof-of-delivery-a4 | ProofOfDelivery | A4 Document prints |
tesco-pallet-label | Pick | Tesco pallet label |
we-are-rise-delivery-note | Pick | We Are Rise delivery note |
A4 Document prints
Used by credit-a4, invoice-a4, order-a4 and proof-of-delivery-a4 (configuration type
DocumentWithLinesConfig).
| Property | Type | Default | What it does |
|---|---|---|---|
logoUrl | text | URL of the logo drawn at the top of the page. | |
logoBackgroundColor | text | Background colour behind the logo, as a hex value. | |
logoPaddingCm | number | 0.1 | Padding around the logo, in centimetres. |
logoMaxHeightCm | number | 2.5 | Height the logo is fitted into, in centimetres. |
logoMaxWidthCm | number | 2.5 | Width the logo is fitted into, in centimetres. |
noteTags | list of note tags | Notes gathered from the Document's tags and printed beneath the addresses. | |
lineNotes | list of line notes | Notes printed beneath each line's description. Replaces the built-in delivery variance note; an empty list prints none. |
Note tags (noteTags)
| Property | Type | Default | What it does |
|---|---|---|---|
prefix | text | Text placed before the note's content. | |
prefixSeparator | text | What separates the prefix from the content. Falls back to separator. | |
separator | text | A new line | What joins the matched tag values. |
tags | list of tags | The tags whose values make up the note. Each tag has source, key, value and data. |
Line notes (lineNotes)
| Property | Type | Default | What it does |
|---|---|---|---|
template | text | Liquid template for the note. Reads each of the values by name. | |
values | object of name to map expression | Map expressions evaluated against the line, keyed by the name the template reads them as. |
Pallet label
Used by pallet-label (configuration type PalletLabelConfig).
| Property | Type | Default | What it does |
|---|---|---|---|
logoUrl | text | URL of the brand logo at the head of the label. No logo panel is printed without one. | |
widthMillimetres | number | 105 | Label width in millimetres. |
heightMillimetres | number | 148 | Label height in millimetres. |
copies | number | 1 | Labels printed per pallet. |
palletUnitOfMeasureId | Unit of Measure ID | The Unit of Measure that identifies a pallet. Falls back to the organisation's default pallet unit, then to every outermost container. | |
requireSscc | true or false | true | Whether a pallet with no SSCC fails the print rather than printing a label without one. |
maximumItems | number | 4 | How many products are listed before the overflow note replaces the rest. |
overflowLines | list of text | PALLET CONTAINS MORE ITEMS THAN LISTED ABOVE, REFER TO DELIVERY NOTE OR ASN | Lines printed when a pallet holds more products than the label lists. |
eanIdentifierType | text | "gtin-14" | Product identifier type printed as the EAN. |
skuIdentifierType | text | "spc" | Product identifier type printed as the SKU. |
dateFormat | text | "dd.MM.yyyy" | Format the expiry dates are printed in. |
quantityUnitOfMeasureId | Unit of Measure ID | The Unit of Measure quantities are converted to. Its UN/ECE Rec 20 code is printed after each quantity. Falls back to the unit the quantity already carries. | |
showProductBarcode | true or false | true | Whether the GS1-128 product barcode prints above the SSCC barcode. |
Tesco pallet label
Used by tesco-pallet-label (configuration type TescoPalletLabelConfig).
| Property | Type | Default | What it does |
|---|---|---|---|
palletUnitOfMeasureId | Unit of Measure ID | The Unit of Measure that identifies a pallet. Falls back to the organisation's default pallet unit. | |
copies | number | One | Labels printed per pallet. |
3V delivery note and packing list
Used by 3v-delivery-note and 3v-packing-list (configuration type _3VPrintConfig).
| Property | Type | Default | What it does |
|---|---|---|---|
logoSvg | text | The supplier logo, as SVG markup. | |
webAddress | text | Web address printed in the supplier block. | |
internalContact | text | Internal contact printed in the reference box. | |
accountNumberIdentifierType | text | Party identifier type holding the customer's account number. | |
referenceType1 | reference type | Document reference printed in the first column of the reference band. | |
referenceLabel1 | text | Heading above reference 1. | |
referenceType2 | reference type | Document reference printed in the second column of the reference band. | |
referenceLabel2 | text | Heading above reference 2. |
3V large label
Used by 3v-large-label (configuration type _3VLabelConfig).
| Property | Type | Default | What it does |
|---|---|---|---|
logoSvg | text | The supplier logo, as SVG markup. | |
referenceType1 | reference type | Document reference printed on the parcel row. | |
referenceFormat1 | text | Composite format for reference 1, taking the number and its date. | |
referenceType2 | reference type | Document reference printed under the parcel row. | |
referenceFormat2 | text | Composite format for reference 2, taking the number and its date. |
Reference types
The referenceType1 and referenceType2 properties on the 3V prints take one of these values:
buyerorder, credit, deliverynote, fulfilment, default, inventory, invoice,
invoiceadditional, journal, order, orderadditional, payment, paymentadditional,
product, proofofdelivery, quote, remittance, salesreport, shipment, statement,
stockadjustment, transaction, warehousetransfer, workorder.
We Are Rise delivery note
Used by we-are-rise-delivery-note (configuration type WeAreRiseDeliveryNoteConfig).
Layout and despatch details
| Property | Type | Default | What it does |
|---|---|---|---|
logoUrl | text | URL of the logo at the top left of every page. | |
companyLines | list of text | The company block under the logo on the first page. Falls back to the pick's supplier. | |
haulierLines | list of text | The haulier block. Falls back to the pick's shipping company. | |
despatchLocationLines | list of text | What prints as the despatch location. Falls back to the pick's ship-from Party. | |
contactPerson | text | The Contact Person in the despatch block. | |
contactTelephone | text | The Telephone in the despatch block. | |
shippingConditions | text | The Shipping Conditions field, for example Road. | |
footerLines | list of text | Lines printed at the foot of every page. | |
statements | list of statements | The declarations printed after the lines, each with a signature and date line. Each statement has a title (its heading) and text (its wording; line breaks are kept). |
Lines, codes and dates
| Property | Type | Default | What it does |
|---|---|---|---|
quantityUnitOfMeasureId | Unit of Measure ID | The Unit of Measure line quantities are converted to. Its UN/ECE Rec 20 code is printed after each quantity. Falls back to the unit the quantity already carries. | |
dateFormat | text | "dd.MM.yyyy" | Format the header and template dates are printed in. |
lineNumberStep | number | 10 | What an item number is multiplied by, so order lines 1, 2, 3 print as 10, 20, 30. |
bookingNumberPattern | text | "BN:\s*(\S+)" | Regular expression capturing the booking number from the delivery instructions. |
findOriginalOrder | true or false | true | Whether the original sales order is read for what the despatch doesn't carry. |
skuIdentifierType | text | "spc" | Product identifier type printed as the SKU. |
eanIdentifierType | text | "gtin-14" | Product identifier type printed as the EAN. |
customerCodeIdentifierType | text | "bpc" | Product identifier type printed as the customer code. |
Templates and values
| Property | Type | Default | What it does |
|---|---|---|---|
values | object of name to text | Free values the templates read as values.name. A variant's values override these. | |
incoTerms | text | "DAP, {{ shipTo.town | default: shipTo.county }}" | Template for the Inco Terms field. |
instructions | text | "{{ instructions }}" | Template for the delivery instructions block. |
description | text | "{{ line.description }}" | Line template for the description column. Each line it renders prints as a line of the description, and line.attributes["Name"] reads a product attribute the line is tagged with. |
customerCode | text | "Customer Code: {{ line.customerCode }}" | Line template for the customer code column. |
variants | list of variants | Per-retailer rules, chosen by the resolved customer Party. See below. |
Variants (variants)
| Property | Type | Default | What it does |
|---|---|---|---|
name | text | For whoever reads the config; not printed. | |
customerPartyIds | list of Party IDs | The resolved customer Parties this variant applies to. | |
despatchLocationLines | list of text | Despatch location for this retailer, replacing the shared one. | |
values | object of name to text | Values for this retailer, overriding the shared ones. | |
customerCodeIdentifierType | text | Product identifier type printed as the customer code for this retailer. | |
incoTerms | text | Inco Terms template for this retailer. | |
instructions | text | Delivery instructions template for this retailer. | |
description | text | Description template for this retailer. | |
customerCode | text | Customer code template for this retailer. |