WORKFLOW / ROUTER / RULES

Print the Right Label for Each Product, Automatically

Add a Router node: each branch tests one field of the record (weight_kg gt 5, country in DE, AT, CH, sku starts with CH-) and sends the record to its design. The first matching branch wins, a default branch catches the rest, and the table below shows the real decisions for a 5-row sample file.

FREE PLAN · NO CREDIT CARD · WINDOWS / MAC / ANDROID / WEB
PRINT CONTROLPRINTER READY
Print the Right Label for Each Product, Automatically — LabelInn

THE PROBLEM

A desk with a laptop, a tablet and a desktop label printer

Most companies do not print one label. They print a small one for light items and a large one for heavy ones, a hazard label for chemicals, a German label for Germany and an English one for the UK. When people choose the template by hand, the wrong one gets picked on a busy afternoon.

A LabelInn workflow chooses for them. A Router node looks at each record and sends it to the design that matches.

The data decides the label. Write the rule once; every record follows it. Start free →

01 / CONDITIONAL PRINTING

How the Router decides

Each branch of a Router has a condition on a field of the record. The comparisons available are:

ComparisonExample
equals / not equalschannel equals amazon
greater / less than (or equal)weight_kg greater than 5
contains / starts with / ends withsku starts with CH-
in list / not in listcountry in DE, AT, CH
exists / does not existlot exists
matches a patternserial matches a regular expression

By default the record goes down the first branch that matches, which is what you want when exactly one label applies. Switch the Router to all and every matching branch fires, for example to print a label and send a notification. A default branch catches anything no rule matched, so no record silently disappears.

02 / ROUTER

Examples

01

By size. weight_kg greater than 5 → large carton label; default → small label.

02

By market. country in DE, AT, CH → German design; country equals FR → French design; default → English.

03

By hazard. sku starts with CH- → GHS chemical label built by the Compliance Pack node; default → standard product label.

04

By customer. customer equals a key account → that customer's branded label.

03 / TEMPLATES

Choosing the printer the same way

The Print node can take the printer from a field of the record, so the same rule set can send warehouse A's labels to warehouse A's printer. Combined with the Router, one workflow covers every product, design and site.

04 / RULES

With an operator in the loop

If people print from a Print Dialog, the dialog can switch to a different design when a value such as a lot number comes in, so the operator never chooses the template either. See the operator printing station.

RUN ON A SAMPLE

Five shipments, five decisions

The rules below were run through the workflow engine's own Router code (execRouter) on 17 October 2026. Rule order is the order of the list.

  1. sku starts with CH- goes to ghs
  2. customer equals key-account-nord goes to key_account
  3. weight_kg greater than 5 goes to heavy
  4. country in DE, AT, CH goes to de_at_ch
  5. everything else (default) goes to small
order_idskuweight_kgcountrycustomerFirst match (default mode)All matches (mode "all")
SO-10442004170.25DEretailde_at_chde_at_ch
SO-10443004206.5TRretailheavyheavy
SO-10444CH-22101.2FRretailghsghs
SO-104450100612ATkey-account-nordkey_accountkey_account, heavy, de_at_ch
SO-10446010080.05GBretailsmallsmall

SO-10445 is the case that shows why order matters: it is heavy, Austrian and a key account. In the default mode only the first branch fires, so put the most specific rule first. Switch the Router to "all" only when you want several outputs (a label and a notification, say).

TESTED TRAPS

Where a rule that looks right does not match

Rule and dataResultWhy
weight_kg gt 5 with the value 6.5matchesCompared as numbers.
weight_kg gt 5 with the value 6,5 (decimal comma from a European Excel or CSV)does not match: falls to the default6,5 is not a number, so the comparison is false. Export with a decimal point, or add a Transform step first.
sku starts with CH- with ch-2210does not matchThe standard comparisons are case-sensitive. The engine also has case-insensitive variants (equals, contains, starts with, in list), which do match.
country in "DE,AT" written as one text valuedoes not matchThe standard in-list needs a list. The case-insensitive in-list variant also accepts a comma-separated text.
lot exists with an empty cell from a CSVmatchesAn empty cell is an empty text, not a missing field. Use "not equals" with an empty text to test for blanks.
lines[0].sku equals A on a JSON ordermatchesField paths may index into lists: lines[0].sku.
equals 5 against the number 5 and against 5.0matches 5, not 5.0Equality compares text.

PLAN

What this needs

A Router is part of a workflow: workflows are included from Starter ($7.99/month, up to 2 saved workflows); Pro removes the limit. The data source decides more: an Excel or CSV source is Starter, a database or webhook source needs Pro. See print labels from Excel for how a spreadsheet's numbers and blanks arrive, which is what the rules above see.

QUESTIONS / FAQ

Frequently asked questions

Can LabelInn choose the label template automatically?

Yes. A Router node checks fields of each record (weight, country, SKU prefix, customer and so on) and sends the record to the matching label design.

What happens to a record that matches no rule?

Add a default branch. It catches every record no other branch matched, so nothing is dropped without a label.

Can one record print two different labels?

Yes. Set the Router to fire every matching branch instead of only the first.

Can the printer be chosen by rule as well?

Yes. The Print node can read the printer from a field of the record.

Why does my weight rule send everything to the default label?

Check the decimal separator. A value like 6,5 is not a number to the comparison, so greater than 5 is false and the record falls through to the default branch.

Is the Router case-sensitive?

The standard comparisons are. CH- does not match ch-2210; the case-insensitive variants of equals, contains, starts with and in-list do.

NEXT STEP / LABELINN

One workflow, every label

Stop asking people to pick the right template. Let the data pick it. · 14 comparison types · First-match or all-match routing · Design and printer chosen from data

Start free →