Schedule MacroRIS-SM-2186 – Print Shipping Label Macro

Print Shipping Label Macro

Identifies eligible open orders, generates shipping labels in PDF format, and moves processed orders into a designated folder automatically.

Overview

The RIS-SM-2186 – Print Shipping Label Macro automates the printing of shipping labels and organizes processed orders into a specific folder for better warehouse workflow management.

Ensures that shipping labels are generated correctly and processed orders are moved to a dedicated folder.

Purpose

This macro:

  • Identifies eligible open orders

  • Generates shipping label PDFs

  • Moves processed orders into a “Printed Orders” folder

👉 In short:
Prints shipping labels automatically and organizes processed orders.

When It Runs

Typically used:

  • Automatically or manually during warehouse operations

  • Before dispatch

  • During packing workflow

  • After order verification

  • In warehouse automation

  • When orders are ready to ship

Parameters

path
folderNamestring
Required

Folder name where printed orders will be assigned.

Note: Default folder is usually “Printed Orders”.

Simple Explanation

The macro identifies orders ready for shipping, prints their labels, and moves them into a designated folder to mark them as processed.

Step-by-Step Process

Start Macro

Initialize execution and log start.

Fetch Open Orders

Use Api.Orders.GetOpenOrders to retrieve all open orders.

Filter Eligible Orders

Select orders not already in “Printed Orders” folder and with identifier “Test2”.

Collect Order IDs

Store eligible orders and log their order numbers.

Generate Shipping Labels

Use Api.PrintService.CreatePDFfromJobForceTemplate with template “Shipping Labels” to generate PDFs.

Capture Processed Orders

Identify successfully printed orders.

Check/Create Folder

Use Api.Orders.GetAvailableFolders; create folder if it does not exist using SetAvailableFolders.

Assign Orders to Folder

Use Api.Orders.AssignToFolder to move printed orders to folder.

Error Handling

Log exceptions and ensure safe execution.

Final Result

The macro prints shipping labels in PDF format for eligible orders and moves processed orders to the “Printed Orders” folder.

Usefulness

  • Automation – Eliminates manual label printing

  • Order Organization – Clearly separates processed orders

  • Warehouse Efficiency – Improves workflow clarity

  • Error Reduction – Prevents duplicate printing

  • Tracking – Easy identification of printed orders

Example Scenario

Key Insight

This macro streamlines the dispatch process by automating label generation and organizing processed orders, ensuring smooth workflow, reducing manual effort, and preventing errors in shipping operations.