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
| Property | Value |
|---|---|
| Implementation Type | CancelExpiredOrdersScheduledTask |
| Group | Orders |
| Type | Delta |
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
- Queries for click and collect orders that have exceeded their expiration threshold
- For each expired order, updates the status to "Order Cancelled"
- Runs the cancellation workflow to perform associated actions
- 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
Recommended Schedule
Run hourly (0 * * * *) to catch expired orders without excessive processing overhead. More frequent execution may be appropriate for time-sensitive scenarios.
Related Tasks
- Cancel Expired Click and Collect - Detailed click and collect expiration handling
- Delete Old Orders - Permanent removal of old orders
- Update Overdue Orders - Mark orders as delayed
