Cancel Orders with Expired Pickup Deadline
Automatically cancel orders where the customer pickup deadline has passed.
Overview
This task searches for orders whose customerPickupDeadline has passed and cancels them. It is intended for non-Click-and-Collect order types that use the Set Customer Pickup Deadline workflow step to set a deadline. Click and Collect orders are excluded automatically — those are handled by the separate Cancel Expired Click and Collect task.
Identifier
| Property | Value |
|---|---|
| Implementation Type | CancelOrdersWithExpiredPickupDeadlineScheduledTask |
| Group | Orders |
| Type | Delta |
When to Use
Enable this task when you need:
- Automatic cancellation of store-pickup orders not collected within the configured deadline
- Enforcement of pickup windows for non-C&C order types
- Automated inventory release from uncollected orders
Configuration Properties
| Property | Type | Required | Description |
|---|---|---|---|
CancelStatus | string | No | Status to set on cancelled orders. Defaults to OrderCanceled if omitted. |
OrderStatuses | string | No | Comma-separated list of order statuses to include in the search. If omitted, all statuses are included. |
Click and Collect orders are always excluded from this task regardless of the OrderStatuses configuration. Use Cancel Expired Click and Collect for those.
Behavior
What It Does
- Reads
CancelStatusandOrderStatusesfrom the task's configured properties. - Loads all non-Click-and-Collect order types configured for the tenant.
- Searches for orders of those types where
customerPickupDeadlineis in the past, optionally filtered to the specifiedOrderStatuses. - For each expired order: sets the cancel status, recalculates reserved inventory for all SKUs on the order, sends a cancel line notification if configured, and runs the cancellation workflow.
Prerequisites
- Orders must have
customerPickupDeadlineset, typically by the Set Customer Pickup Deadline workflow step.
Side Effects
- Sets orders to
CancelStatusif configured, otherwiseOrderCanceled. - Releases reserved inventory for all order line products on each cancelled order.
- Sends a
Canceled Order Linesnotification if one is configured. - Runs the cancellation workflow, which may trigger additional configured actions.
Example Configuration
Recommended Schedule
Run every 30 minutes (*/30 * * * *) to cancel expired orders promptly. Adjust based on how tight your pickup windows are.
Related Tasks
- Cancel Expired Click and Collect — Handles expiration for Click and Collect orders
Related Steps
- Set Customer Pickup Deadline — Sets the
customerPickupDeadlinethis task reads
