Schedule MacroRIS-SM-2269 – Order Split Macro

Order Split Macro (POD + Stock Adjust + PO Creation)

Automate handling of mixed orders by splitting POD items, adjusting stock for non-POD items, moving POD orders to a dedicated location, and creating purchase orders.

Overview

The RIS-SM-2269 – Order Split Macro (POD + Stock Adjust + PO Creation) macro streamlines complex order handling by separating POD and non-POD items, managing stock, routing orders, and automating procurement.

Use this macro for EU POD workflows to ensure correct fulfillment routing and automated supplier ordering.

Purpose

This macro:

  • Splits POD items into separate orders

  • Adjusts stock for non-POD items

  • Moves POD orders to a dedicated location

  • Automatically creates purchase orders

  • Tags processed orders to avoid duplication

👉 In short:
Split POD → adjust stock → move orders → create PO → tag.

When It Runs

Typically executed:

  • After order import

  • Before order processing

  • For EU POD orders

  • Handling mixed orders (POD + non-POD)

  • During automated procurement workflows

  • Manually or via automation

Parameters

path
OrderIdsGUID[]
Required

List of orders to process.

path
SourceLocationstring
Required

Main warehouse location.

path
PodLocationstring
Required

POD fulfillment location.

Example:
OrderIds = [Order1, Order2]
SourceLocation = "Main Warehouse"
PodLocation = "POD Warehouse"

Simple Explanation

The macro processes each order, separates POD items, adjusts stock for regular items, moves POD orders to a dedicated warehouse, creates purchase orders for POD items, and tags the order.

Step-by-Step Flow

Start Macro

Log execution start and validate input orders.

Cache Locations

Fetch all warehouse locations and map Source and POD locations.

Loop Through Orders

Remove duplicates and process each order individually.

Skip Processed Orders

Check identifier "pod_macro_ran". Skip if already processed.

Validate Location

Ensure order belongs to SourceLocation. Skip if mismatch.

Identify POD Items

Detect POD items using title pattern and split into:

Validate Suppliers

Ensure POD items have supplier mapping. Validate composite child items.

Stock Adjustment (Non-POD)

Adjust stock based on availability:

POD Handling

Only POD Orders:

Mixed Orders:

Create Purchase Order

Generate PO using POD items:

Add Notes

Add internal notes for stock adjustments, splits, and POD processing.

Tag Order

Assign identifier "pod_macro_ran" to prevent reprocessing.

Logging

Log processing steps, PO creation, skipped orders, and errors.

Final Result

  • Orders split into POD and non-POD

  • Stock adjusted accurately

  • POD orders moved to correct location

  • Purchase orders automatically created

  • Orders tagged to prevent duplication

Usefulness

  • Full Automation – Handles split, stock, and PO creation in one flow

  • Inventory Accuracy – Prevents overselling

  • POD Optimization – Separates fulfillment workflows

  • Procurement Automation – Auto-generates supplier POs

  • Error Prevention – Validates stock and supplier mapping

Example Scenario

Key Insight

This macro follows a complete automation flow:
Order → Validate → Split POD → Adjust Stock → Move → Create PO → Tag.

It prevents mixing fulfillment types, stock overselling, missing supplier mappings, manual PO creation, duplicate processing, and incorrect warehouse routing.