Set Customer Pickup Deadline

Calculate and set a customer pickup deadline based on a configured number of working days and store opening hours.

Overview

The Set Customer Pickup Deadline step calculates a deadline by which the customer must collect their order from the store. It counts a configured number of working days forward from the order creation date, respecting the store's regular and special opening hours.

Identifier

PropertyValue
KeySetCustomerPickupDeadline
GroupEnrich
Applicable StatusesNew, InProgress, Confirmed

Configuration Properties

PropertyTypeRequiredDescription
WorkingDaysintYesNumber of store working days from order creation to set as the deadline

Behavior

What It Does

  1. Reads the WorkingDays property from the workflow step configuration. Returns an error if the value is missing or not a positive integer.
  2. Loads the store assigned to the order. Returns a warning and skips if no store is found.
  3. Counts forward WorkingDays working days using the store's configured opening hours, skipping closed days and special-closed dates.
  4. Applies the store's Pickup Deadline Offset if configured. The offset is subtracted from the store's closing time on the target day — for example, a 1-hour offset on a store closing at 21:00 results in a deadline of 20:00.
  5. Sets customerPickupDeadline on the order.

Pickup Deadline Offset

Each store can have an optional offset configured under Stores → Edit Store → Opening Hours → Pickup Deadline Offset. This shifts the deadline earlier within the closing hour of the target day. If no offset is set, the deadline is the store's closing time on the N-th working day.

Prerequisites

  • The order must have a storeId referencing a configured store.
  • The store must have at least one open day configured in its opening hours.
  • The WorkingDays property must be set on the workflow step.

Side Effects

  • Sets customerPickupDeadline on the order.
  • If the deadline cannot be calculated (store has no open days), a warning is returned and customerPickupDeadline is not set.

Business Cases

When to Use

  • Click & Collect: Set a deadline after which uncollected orders are automatically cancelled by the Cancel Orders with Expired Pickup Deadline scheduled task.
  • Pickup slot enforcement: Give customers a clear window to collect before inventory is released.

Example Scenarios

Weekend skipping

  • Order placed Friday, store open Mon–Fri, WorkingDays = 2
  • Saturday and Sunday are skipped
  • Deadline set to Tuesday at store closing time

Pickup Deadline Offset

  • Store closes at 21:00, offset configured to 1 hour
  • Deadline set to 20:00 on the target day

Error Handling

ConditionResultContinues Workflow?
WorkingDays missing or invalidErrorYes
Store not foundWarningYes
Store has no open daysWarningYes
Deadline set successfullySuccessYes

On this page