Skip to content

Example: choose the printer from meta information

Want each packing station’s labels to come out of its own printer? A pipeline can do that with conditions on the job’s meta information. In this example, two packers send Billbee jobs: Jonas Becker’s go to “Versand-Etiketten”, Aylin Yildiz’s to “Lager Laserdrucker”. The user is in the meta field UserName.

Open the printer’s automatic pipeline under Pipelines. It was created together with the printer. It looks like this, with your own printer name.

The graph of the comrce cloudprint pipeline "Autopipeline for Versand-Etiketten" as comrce cloudprint created it for the printer. Two queues on the left, "Input for Versand-Etiketten [21] (Manuelle Warteschlange)" and the same name as "API Warteschlange", lead into the "Start" tile. From Start a single line runs to the printer output "Printeroutput for Versand-Etiketten". The highlighted plus on that line inserts a step between Start and the printer output.
The starting point: one automatic pipeline that prints everything on one printer.
What this screenshot shows
Highlighted
inserts the first condition before the printer output
Also visible
Two automatic queues; Start, then one printer output
Purpose
the pipeline before the change

Every job from the two queues “Input for Versand-Etiketten [21]” goes straight to the printer output.

  1. Select the plus on the line between Start and the printer output.
  2. Choose Bedingung (condition).
  3. Name it “Filter auf Jonas Becker” and write the rule in “Bedingung 1”. All the options are on Filters and conditions.
  4. Select Ok.
The comrce cloudprint dialog "Bedingung verändern" (edit condition) for the step "Filter auf Jonas Becker". "Bedingungsart" (condition type) is "Eine der Bedingungen muss erfüllt sein." (one rule must be met). The highlighted field "Bedingung 1" holds the text rule "jonas.becker@example.com" == {MetaInformation.UserName}, cut off by the narrow field. The switches "numerisch" (numeric) and "Ergebnis invertieren" (invert result) are off. At the bottom are "Abbrechen" and "Ok".
The first condition lets through only jobs that Jonas Becker sent.
What this screenshot shows
Highlighted
compares the user in the meta information with one address
Also visible
Text rule on {MetaInformation.UserName}; numerisch off
Purpose
filter on the first user

The rule in “Bedingung 1”:

"jonas.becker@example.com" == {MetaInformation.UserName}

It checks whether the meta field UserName holds “jonas.becker@example.com”. If it does, the job goes on to the printer. If not, the job stops in this branch.

  1. On the Start tile, select the plus at the bottom right. Start already has a successor, so the new step begins a second, parallel branch.

  2. Choose Bedingung and set it up the same way for “aylin.yildiz@example.com”.

    The comrce cloudprint dialog "Bedingung verändern" (edit condition) for the step "Filter auf Aylin Yildiz". "Bedingungsart" (condition type) is "Eine der Bedingungen muss erfüllt sein." (one rule must be met). The highlighted field "Bedingung 1" holds the text rule "aylin.yildiz@example.com" == {MetaInformation.UserName}, cut off by the narrow field. The switches "numerisch" (numeric) and "Ergebnis invertieren" (invert result) are off. At the bottom are "Abbrechen" and "Ok".
    The second condition does the same for Aylin Yildiz.
    What this screenshot shows
    Highlighted
    compares the user in the meta information with a second address
    Also visible
    Text rule on {MetaInformation.UserName}; numerisch off
    Purpose
    filter on the second user
  3. On the tile “Filter auf Aylin Yildiz”, select the plus at the bottom right and choose Druckerausgabe (printer output).

  4. Name the output and choose “Lager Laserdrucker” under Verknüpfter Drucker.

The pipeline now looks like this:

The finished comrce cloudprint pipeline "Autopipeline for Versand-Etiketten". The two queues "Input for Versand-Etiketten [21]" (manual and API) lead into "Start". From Start, two branches run in parallel. The upper branch goes through the condition "Filter auf Jonas Becker" to the printer output "Printeroutput for Versand-Etiketten". The lower branch goes through the condition "Filter auf Aylin Yildiz" to the printer output "Ausgabe Lager Laserdrucker". Every connecting line carries a plus.
Each job runs through both branches. Only the condition that matches lets it through to its printer.
What this screenshot shows
Highlighted
shows the two condition branches with their printers
Also visible
Two queues, Start; Branch: Filter auf Jonas Becker → Versand-Etiketten; Branch: Filter auf Aylin Yildiz → Lager Laserdrucker
Purpose
the pipeline after the change

Every job that arrives in one of the two queues runs through both branches. The condition that matches lets the job through to its printer. A job from any other user isn’t printed at all, because neither condition lets it through.

To send jobs from more users to one of the two printers:

  1. Select the icon at the top left of the condition’s tile.
  2. Select the plus in the dialog and write a further rule in the same pattern.
  3. Keep Bedingungsart on Eine der Bedingungen muss erfüllt sein., so any one user is enough.

From your next job on, comrce cloudprint uses the updated pipeline.