WORKFLOW / FOR EACH / BATCHES

One Label for Every Line of the Order, Numbered and Counted

Use a For Each node on the order's line items, or send the lines as one API request and let a print plan turn each line's quantity into labels. Either way the label can say "3 / 12", and the next section shows exactly how many labels a sample order produces under each plan.

FREE PLAN · NO CREDIT CARD · WINDOWS / MAC / ANDROID / WEB
SMALL BUSINESSLAPTOP, TABLET, PRINTER
One Label for Every Line of the Order, Numbered and Counted — LabelInn

THE PROBLEM

LabelInn print screen next to a thermal printer feeding a finished label

An order with twelve lines needs twelve labels, and the packer wants to see "3 / 12" on each one so nothing is missed. Then someone wants to know: did all twelve print? Most automation fires one label per event and has no idea it was part of a batch.

LabelInn's For Each node handles the whole order as one unit. It runs the label steps once per line, numbers them, and finishes with a single summary.

Twelve lines, twelve labels, one confirmation. Start free →

01 / FOR EACH

How it works

01

Start from the order. A Marketplace node, a webhook or a data source delivers the order with its list of lines.

02

Add For Each and point it at the list. If the items arrive as one text field (for example A-1, A-2, A-3), For Each can split it.

03

Wire Design and Print to its item output. Inside the loop each line's fields are on the record, so {{sku}} and the other bindings work as usual.

04

Wire Notify to its done output. It runs once, after the last line.

02 / BATCH PRINTING

"3 / 12" on the label

Inside the loop, three extra values are available to the design:

ValueMeaningLine 3 of 12
_indexPosition, starting at 13
_index0Position, starting at 02
_totalNumber of items12

03 / 1 OF N

One summary, not twelve emails

When the loop finishes, the done output carries a summary of the batch: how many items, how many printed, how many failed. A Notify node on that output can send "12 of 12 labels printed for order {{order_id}}" by email, Slack or Discord.

04 / ORDERS

When one item fails

A failing item does not stop the batch. The rest still print, the failure is counted, and the error says which item it was (for example "[2/3]"), so the reprint is targeted.

05 / FOR EACH

Capacity

  • Up to 1,000 items per loop.
  • Loops can be nested two levels deep (for example pallets, then cartons).
  • Need running serial numbers across batches rather than per order? See sequential serial numbers.

RUN ON A SAMPLE

Six order lines: 15 labels, counted three ways

The print plan code the API uses (printPlan.js) was run over the sample file on 17 October 2026.

order_idlineskuqty
SO-104421004172
SO-104422004201
SO-104423010063
SO-104424010081
SO-104431004186
SO-104432010072
PlanLabelsCounter value per label
labels = field qty, copies = 1150, 1, 2 ... 14: every label is a different number
labels = 1, copies = field qty150, 0, 1, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4, 5, 5: copies of a line are identical
labels = field qty, reset on_change order_id150 to 6 for SO-10442 (7 labels), then 0 to 7 for SO-10443 (8 labels): numbering restarts for each order

Choose "different labels" when each carton or unit needs its own number, "copies" when the same label is simply repeated. The third plan is the one that gives "3 of 7" per order.

THE API ROUTE

The same order as one request

EXAMPLESHELL
curl https://labelinn.com/v1/print/jobs \
  -H "Authorization: Bearer sk_live_..." -H "Content-Type: application/json" \
  -H "X-Idempotency-Key: SO-10442:1" \
  -d '{
    "printer_id": "prt_abc123",
    "payload_type": "template",
    "design_id": "dsg_order_line",
    "data": [
      {"order_id":"SO-10442","line":1,"sku":"00417","qty":2},
      {"order_id":"SO-10442","line":2,"sku":"00420","qty":1},
      {"order_id":"SO-10442","line":3,"sku":"01006","qty":3},
      {"order_id":"SO-10442","line":4,"sku":"01008","qty":1}
    ],
    "plan": {"labels": {"field": "qty"}, "copies": 1, "reset": {"on_change": "order_id"}},
    "dry_run": true
  }'

data as an array prints one label per row (up to 1000) and the whole call is one request against your rate limit. dry_run: true returns what would print (the total, skipped rows and the first labels) without creating a job; remove it to print. The body was validated against the CreateJobRequest schema, and the plan was counted with the same code the API runs. API writes need Pro ($24.90/month) or the trial; see Label printing API.

GOTCHAS

Quantity columns from spreadsheets

  • The plan reads quantities the way people type them: 5, 5.0, 5,0, 5 adet and x5 all mean 5, and 1.000 means 1000 (a single separator followed by exactly three digits is a thousands mark).
  • A line whose quantity is 0 or empty prints nothing and is counted as skipped, not as an error.
  • In a workflow, items arriving as one text field (A-1, A-2, A-3) need For Each to split them; real JSON lists need no splitting.
  • An order that comes from a marketplace needs a Pro-plan source node; from a CSV or Excel file it needs Starter. For Each itself is a workflow node, included from Starter.

QUESTIONS / FAQ

Frequently asked questions

How do I print a label for each item in an order?

Use a For Each node on the order's list of lines. It runs the Design and Print nodes once per line and then continues once with a summary.

Can the label show "3 of 12"?

Yes. Inside the loop the design can use _index (position from 1) and _total (number of items).

What if one label fails?

The batch continues. The failed item is counted in the summary and named in the error so it can be reprinted.

How many items can one loop handle?

Up to 1,000 items, and loops can be nested two levels deep.

How do I print one label per unit when the order line has a quantity?

Use a print plan with labels taken from the quantity field. A line with quantity 3 prints three different labels; use copies instead for three identical ones.

How do I number labels "3 of 7" per order?

Reset the counter when the order id changes: "reset": {"on_change": "order_id"}. In a For Each loop use _index and _total on the label.

How many labels can one request print?

One print job takes up to 1000 rows in data, and a batch call takes up to 100 jobs.

NEXT STEP / LABELINN

Print the whole order, not one event at a time

Build the loop once and every order prints complete. · One label per line · "3 / 12" numbering · One summary at the end

Start free →