Automatic Reallocation

  • Updated

Why use automatic reallocation?

Automatic reallocation ensures orders are fulfilled when the initial store cannot process them on time. This is especially useful for businesses with multiple stores, as it reallocates unprocessed orders to another location with available inventory. This reduces delays, prevents cancellations, and improves customer satisfaction by ensuring orders are handled efficiently.

Key components of automatic reallocation

Automatic reallocation consists of three main components:

  1. Setting a deadline
    • A workflow step that defines the timeframe for reallocating shipments that haven't been processed.
  2. Removing the deadline
    • A workflow step that removes the deadline once the shipments are successfully processed.
  3. Scheduled task
    • A task that identifies shipments past their deadline and attempts to reallocate them. Shipments/products that cannot be reallocated will be canceled.

Setup instructions

Follow these steps to set up Automatic reallocation.

Step 1: Configure “Try reallocate on cancel”

To enable automatic reallocation, add the “Try Reallocate on Cancel” workflow step to an order status with the “Order is canceled” status. This step works as follow: 

  • Line item allocation: Allocates line items to the nearest warehouses based on their zip codes.
  • Priority for stock: Prioritizes minimizing splits by choosing warehouses with the largest stock of the requested products.
  • Product cancellation: Cancels products that cannot be reallocated.


     

Alternate Setup

If your stores use geo locations, you can use the “TryReallocateOnCancelUsingGeoLocation” step instead.

 

Step 2: Add workflow steps

Setting the deadline

  • Add the "Set deadline for reallocate" step to the first status in your workflow.
  • By default, this step sets a 3-day deadline for each shipment.
  • Customization: You can edit the step to set a custom deadline in dd.HH:mm:ss format.
  • Optional: If your stores have opening hours configured in Omnium, enable the option to align deadlines with store opening hours.






     

Removing the deadline

  • Add this step to the status where shipments or orders are marked as picked or processed.
  • Note: This step is unnecessary for statuses like "Delivered" or "Canceled," as the reallocation job ignores these statuses.



 

Step 3: Configure the scheduled task

You’ll need to configure a scheduled task to automate the reallocation process. Here’s how:

  • Go to Configuration > Advanced and locate the scheduled tasks section.
  • Adding a new task: Click the menu in the top-right corner and select “TryReallocateOrdersScheduledTask”.


     
  • Scheduling:
    • Set the task to run on a crontab schedule.
    • Recommended: Every hour (0 * * * *).
    • Minimum interval: Every five minutes (*/5 * * * *)




       

Key notes

  • Verify that all workflow steps and the scheduled task are set up correctly to ensure the system works as intended.
  • Test the setup in a staging environment before deploying to production.

Was this article helpful?