How to require a delivery date before Shopify checkout
Short answer: Block checkout when the shopper chose local delivery or pickup but didn't pick a date in the cart, so every order arrives with a slot. In Checkpost, choose “Require a delivery or pickup date” from Templates, adjust the values, test it, then save and enable the rule.
The problem
A delivery-date picker can be skipped when a shopper enters checkout directly. If the cart records delivery or pickup but no date, staff receive an order without the scheduling information they need.
Related merchant discussion on Shopify Community
How to set it up
- Install Checkpost from the Shopify App Store.
- Open Templates and choose Require a delivery or pickup date.
- Rename Delivery-Date / Pickup-Date to the attribute your date picker app saves.
- Use Try this rule to test a sample cart, then click Save rule.
The rule
Checkout is blocked when any of these conditions are true:
- (Cart attribute "Checkout-Method" is any of delivery AND Cart attribute "Delivery-Date" is empty)
- (Cart attribute "Checkout-Method" is any of pickup AND Cart attribute "Pickup-Date" is empty)
Shoppers see: “Please go back to your cart and choose a date for your order.” at the top of checkout, in the cart and at checkout.
Rule definition (JSON)
{
"name": "Delivery date required",
"match": "any",
"conditions": [
{
"kind": "group",
"match": "all",
"conditions": [
{
"kind": "attribute",
"key": "Checkout-Method",
"op": "equals_any",
"values": [
"delivery"
]
},
{
"kind": "attribute",
"key": "Delivery-Date",
"op": "is_empty",
"values": []
}
]
},
{
"kind": "group",
"match": "all",
"conditions": [
{
"kind": "attribute",
"key": "Checkout-Method",
"op": "equals_any",
"values": [
"pickup"
]
},
{
"kind": "attribute",
"key": "Pickup-Date",
"op": "is_empty",
"values": []
}
]
}
],
"message": "Please go back to your cart and choose a date for your order.",
"target": "cart",
"runOn": "always"
}Examples with the default settings
These outcomes apply to this rule alone. Other enabled rules may also affect checkout.
| Test cart | Expected outcome |
|---|---|
| Delivery chosen and Delivery-Date saved | Allowed by this rule |
| Pickup chosen without Pickup-Date | Checkout blocked |
Where this rule works
These are cart and checkout validations, including supported accelerated checkouts. They are current-cart policies; they do not track previous purchases of a SKU. Shopify excludes POS, recurring subscription orders and native pre-order/Try Before You Buy flows from this API. See Shopify's validation compatibility.
Tips
- Verify the exact Checkout-Method, Delivery-Date and Pickup-Date attributes in your date-picker integration.
- This checks presence only. A nonempty date is accepted even if it is in the past, unavailable or malformed; the scheduling app must check slot validity.
- A missing Checkout-Method does not match delivery or pickup, so the rule cannot prove that a completely skipped picker was used. Configure method selection in the integration as well.
- The shopper message sends them back to the cart because this rule does not add a date picker to checkout.
FAQ
Does it check available time slots or capacity?
No. It requires a nonempty date attribute for the recorded cart method. Availability, capacity and date format belong to the scheduling integration.
Will a shipping order need a pickup date?
No. Only Checkout-Method values delivery and pickup trigger the preset, and each requires its corresponding date key.
Related rules
Pickup location must match the address
When a shopper chooses store pickup in the cart, block checkout if the address entered at checkout is not the chosen pickup location.
Pickup chosen, but shipping selected
If the shopper chose pickup in the cart, block checkout when they then select a shipping rate instead of pickup.