Cancel Expired Orders

Automatically cancel orders that have exceeded their expiration threshold

Overview

This task identifies and cancels orders that have passed their expiration date. It is primarily used for click and collect orders that have exceeded the maximum allowed time in the system, automatically transitioning them to a cancelled status and running associated workflow actions.

Identifier

PropertyValue
Implementation TypeCancelExpiredOrdersScheduledTask
GroupOrders
TypeDelta

When to Use

Enable this task when you need:

  • Automatic cancellation of orders past their expiration date
  • Cleanup of stale click and collect orders
  • Enforcement of order validity periods
  • Automated inventory release from expired orders

Configuration Properties

This task has no configurable properties. Expiration thresholds are typically configured in order settings.


Behavior

What It Does

  1. Queries for click and collect orders that have exceeded their expiration threshold
  2. For each expired order, updates the status to "Order Cancelled"
  3. Runs the cancellation workflow to perform associated actions
  4. Creates an event log entry documenting the cancellation

Prerequisites

  • Click and collect order configuration must be in place
  • Expiration thresholds must be defined in order settings
  • Workflow steps for the cancelled status should be configured

Side Effects

  • Changes order status to cancelled
  • Triggers cancellation workflow (may release inventory, send notifications, etc.)
  • Creates event log entries for each cancelled order

Example Configuration

{
    "ImplementationType": "CancelExpiredOrdersScheduledTask",
    "Schedule": "0 * * * *",
    "IsDisabled": false
}

Run hourly (0 * * * *) to catch expired orders without excessive processing overhead. More frequent execution may be appropriate for time-sensitive scenarios.


On this page