Supply Lens

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-a4 against 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.

PropertyTypeDefaultWhat it does
printKeytextWhich print this entry configures. See Print keys.
propertiesobjectThe configuration that print reads, in its own shape. See the print's own section below.
requirementmap expressionA true-or-false map expression that gates this print. Omit it to always print. See Requirements.
emailSubjecttextThe email subject for this print alone. Null falls back to the integration's; an empty string sends no subject.
emailSubjectTemplatetextA Liquid template for this print's email subject, used ahead of every other subject.
emailBodyTexttextThe email body for this print alone. Null falls back to the integration's; an empty string sends no body.
emailBodyTemplatetextA 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:

PlaceholderWhat it becomesSubjectBody
{0}The combined referenceYesYes
{1}The referenceYesYes
{2}The source referenceYesYes
{3}The IDYesYes
{4}The file's URLYes
{5}The Document's URLYes

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.
  • op needn'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

KeyDocument typeProperties
3v-delivery-notePick3V delivery note and packing list
3v-large-labelPick3V large label
3v-packing-listPick3V delivery note and packing list
backcountry-shipping-labelPickNone
credit-a4CreditA4 Document prints
invoice-a4InvoiceA4 Document prints
kehe-shipping-labelPickNone
order-a4OrderA4 Document prints
pallet-labelPickPallet label
proof-of-delivery-a4ProofOfDeliveryA4 Document prints
tesco-pallet-labelPickTesco pallet label
we-are-rise-delivery-notePickWe Are Rise delivery note

A4 Document prints

Used by credit-a4, invoice-a4, order-a4 and proof-of-delivery-a4 (configuration type DocumentWithLinesConfig).

PropertyTypeDefaultWhat it does
logoUrltextURL of the logo drawn at the top of the page.
logoBackgroundColortextBackground colour behind the logo, as a hex value.
logoPaddingCmnumber0.1Padding around the logo, in centimetres.
logoMaxHeightCmnumber2.5Height the logo is fitted into, in centimetres.
logoMaxWidthCmnumber2.5Width the logo is fitted into, in centimetres.
noteTagslist of note tagsNotes gathered from the Document's tags and printed beneath the addresses.
lineNoteslist of line notesNotes printed beneath each line's description. Replaces the built-in delivery variance note; an empty list prints none.

Note tags (noteTags)

PropertyTypeDefaultWhat it does
prefixtextText placed before the note's content.
prefixSeparatortextWhat separates the prefix from the content. Falls back to separator.
separatortextA new lineWhat joins the matched tag values.
tagslist of tagsThe tags whose values make up the note. Each tag has source, key, value and data.

Line notes (lineNotes)

PropertyTypeDefaultWhat it does
templatetextLiquid template for the note. Reads each of the values by name.
valuesobject of name to map expressionMap expressions evaluated against the line, keyed by the name the template reads them as.

Pallet label

Used by pallet-label (configuration type PalletLabelConfig).

PropertyTypeDefaultWhat it does
logoUrltextURL of the brand logo at the head of the label. No logo panel is printed without one.
widthMillimetresnumber105Label width in millimetres.
heightMillimetresnumber148Label height in millimetres.
copiesnumber1Labels printed per pallet.
palletUnitOfMeasureIdUnit of Measure IDThe Unit of Measure that identifies a pallet. Falls back to the organisation's default pallet unit, then to every outermost container.
requireSscctrue or falsetrueWhether a pallet with no SSCC fails the print rather than printing a label without one.
maximumItemsnumber4How many products are listed before the overflow note replaces the rest.
overflowLineslist of textPALLET CONTAINS MORE ITEMS THAN LISTED ABOVE, REFER TO DELIVERY NOTE OR ASNLines printed when a pallet holds more products than the label lists.
eanIdentifierTypetext"gtin-14"Product identifier type printed as the EAN.
skuIdentifierTypetext"spc"Product identifier type printed as the SKU.
dateFormattext"dd.MM.yyyy"Format the expiry dates are printed in.
quantityUnitOfMeasureIdUnit of Measure IDThe 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.
showProductBarcodetrue or falsetrueWhether the GS1-128 product barcode prints above the SSCC barcode.

Tesco pallet label

Used by tesco-pallet-label (configuration type TescoPalletLabelConfig).

PropertyTypeDefaultWhat it does
palletUnitOfMeasureIdUnit of Measure IDThe Unit of Measure that identifies a pallet. Falls back to the organisation's default pallet unit.
copiesnumberOneLabels printed per pallet.

3V delivery note and packing list

Used by 3v-delivery-note and 3v-packing-list (configuration type _3VPrintConfig).

PropertyTypeDefaultWhat it does
logoSvgtextThe supplier logo, as SVG markup.
webAddresstextWeb address printed in the supplier block.
internalContacttextInternal contact printed in the reference box.
accountNumberIdentifierTypetextParty identifier type holding the customer's account number.
referenceType1reference typeDocument reference printed in the first column of the reference band.
referenceLabel1textHeading above reference 1.
referenceType2reference typeDocument reference printed in the second column of the reference band.
referenceLabel2textHeading above reference 2.

3V large label

Used by 3v-large-label (configuration type _3VLabelConfig).

PropertyTypeDefaultWhat it does
logoSvgtextThe supplier logo, as SVG markup.
referenceType1reference typeDocument reference printed on the parcel row.
referenceFormat1textComposite format for reference 1, taking the number and its date.
referenceType2reference typeDocument reference printed under the parcel row.
referenceFormat2textComposite 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

PropertyTypeDefaultWhat it does
logoUrltextURL of the logo at the top left of every page.
companyLineslist of textThe company block under the logo on the first page. Falls back to the pick's supplier.
haulierLineslist of textThe haulier block. Falls back to the pick's shipping company.
despatchLocationLineslist of textWhat prints as the despatch location. Falls back to the pick's ship-from Party.
contactPersontextThe Contact Person in the despatch block.
contactTelephonetextThe Telephone in the despatch block.
shippingConditionstextThe Shipping Conditions field, for example Road.
footerLineslist of textLines printed at the foot of every page.
statementslist of statementsThe 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

PropertyTypeDefaultWhat it does
quantityUnitOfMeasureIdUnit of Measure IDThe 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.
dateFormattext"dd.MM.yyyy"Format the header and template dates are printed in.
lineNumberStepnumber10What an item number is multiplied by, so order lines 1, 2, 3 print as 10, 20, 30.
bookingNumberPatterntext"BN:\s*(\S+)"Regular expression capturing the booking number from the delivery instructions.
findOriginalOrdertrue or falsetrueWhether the original sales order is read for what the despatch doesn't carry.
skuIdentifierTypetext"spc"Product identifier type printed as the SKU.
eanIdentifierTypetext"gtin-14"Product identifier type printed as the EAN.
customerCodeIdentifierTypetext"bpc"Product identifier type printed as the customer code.

Templates and values

PropertyTypeDefaultWhat it does
valuesobject of name to textFree values the templates read as values.name. A variant's values override these.
incoTermstext"DAP, {{ shipTo.town | default: shipTo.county }}"Template for the Inco Terms field.
instructionstext"{{ instructions }}"Template for the delivery instructions block.
descriptiontext"{{ 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.
customerCodetext"Customer Code: {{ line.customerCode }}"Line template for the customer code column.
variantslist of variantsPer-retailer rules, chosen by the resolved customer Party. See below.

Variants (variants)

PropertyTypeDefaultWhat it does
nametextFor whoever reads the config; not printed.
customerPartyIdslist of Party IDsThe resolved customer Parties this variant applies to.
despatchLocationLineslist of textDespatch location for this retailer, replacing the shared one.
valuesobject of name to textValues for this retailer, overriding the shared ones.
customerCodeIdentifierTypetextProduct identifier type printed as the customer code for this retailer.
incoTermstextInco Terms template for this retailer.
instructionstextDelivery instructions template for this retailer.
descriptiontextDescription template for this retailer.
customerCodetextCustomer code template for this retailer.