Schedule MacroRIS-SM-2292 – Change Packaging Type

Change Packaging Type (Dynamic Packaging Override)

Automatically assigns the correct packaging type based on shipping method keywords, applying accurate dimensions and weight for efficient and error-free fulfilment.

Overview

The RIS-SM-2292 – Change Packaging Type (Dynamic Packaging Override) macro automates packaging selection by mapping shipping methods to predefined packaging rules.

It ensures every order is assigned the correct packaging type with proper dimensions and weight.

Ensure KeywordsCsv matches packaging rules under the "Override" packaging group.

Purpose

This macro:

  • Detects shipping method keywords

  • Matches them with packaging rules

  • Assigns packaging type automatically

  • Calculates dimensions and weight

👉 In short:
Match shipping → select packaging → apply dimensions & weight.

When It Runs

Used for packaging automation and shipping preparation

Typically runs:

  • After order import

  • Before label generation

  • During shipping rule processing

  • When multiple packaging types exist

  • For courier-specific packaging

Parameters

path
KeywordsCsvstring
Required

Comma-separated keywords used to match shipping methods with packaging rules.

path
OrderIdsstring
Required

Comma-separated list of order numbers to process.

Only orders provided in OrderIds are processed, and keywords must match the "Override" packaging group.

How It Works

Start Execution

Logs macro start and validates input parameters.

Load Packaging Rules

Retrieves packaging groups and identifies the "Override" group.

Build Keyword Mapping

Maps provided keywords to packaging titles for matching.

Process Orders

Iterates through each order and skips invalid or already processed ones.

Apply DPD Logic

Applies special handling for DPD shipping:

  • Order value < £30 → Weight = 0.90 kg

  • Else → Weight = 15 kg

Match Shipping Method

Matches shipping method with keywords to determine packaging type.

Calculate Weight

Computes total weight including item weight and packaging weight.

Apply Packaging

Sets packaging type, dimensions (W, H, D), and total weight.

Mark as Processed

Assigns identifier to prevent duplicate processing.

Add Notes & Logging

Saves packaging details in notes and logs execution results.

Final Result

  • Correct packaging type applied

  • Accurate dimensions and weight assigned

  • Orders marked as processed

  • Internal notes added for tracking

Usefulness

This macro is highly beneficial for:

  • Automated packaging selection

  • Improving shipping accuracy

  • Reducing manual effort

  • Preventing courier-related errors

  • Standardizing packaging rules

  • Enhancing fulfilment efficiency

Important Notes

  • Keywords must match shipping methods correctly

  • Packaging group must be "Override"

  • DPD logic overrides standard weight calculation

  • Orders already processed are skipped

  • Missing shipping method results in skip

Example Scenario

Key Insight

By linking shipping methods with predefined packaging rules, this macro ensures consistent, accurate, and automated packaging assignment—eliminating manual effort and reducing shipping errors.