Recipe: Bakery Daily Capacity by Delivery Date
Bakery Daily Capacity by Delivery Date
This recipe caps each delivery date at what your kitchen can make, and stops shoppers booking dates you can't serve. Customers pick a delivery date on the product page or cart. OrderRules checks the date's capacity, your lead time, cutoff, weekdays and blackout dates, and blocks checkout if any of them fail. Delivery dates and daily caps by delivery date need the Advanced plan ($19.99/month).
Use the capacity calculator first to turn staff and oven time into a daily number.
Requirement spec
The numbers below are examples. Use your own.
- The kitchen can fill 40 orders per delivery date, or bake 120 loaves of one product per date.
- Orders need 1 day of lead time.
- After 14:00, today no longer counts toward the lead time.
- Delivery runs Tuesday to Saturday.
- Shoppers can book up to 14 days ahead.
- No delivery on public holidays or a planned closure.
- Every order must carry a delivery date, including Shop Pay orders.
Configuration
Pick Option A (orders per date, storewide) or Option B (units per product per date). You can use both.
| Where | Screen β field | Value |
|---|---|---|
| OrderRules | Settings β Timezone β Store Timezone | Your bakery's timezone |
| OrderRules | Delivery Dates β Delivery dates β Offer delivery date selection on your storefront | On |
| Shopify | Online Store β Themes β Customize β App embeds | OrderRules Delivery on |
| OrderRules | Delivery Dates β Availability rules β Applies to | All products |
| OrderRules | Availability rules β Fulfillment method | Delivery only, or Delivery & pickup |
| OrderRules | Availability rules β Lead time (days) | 1 |
| OrderRules | Availability rules β Cutoff (HH:MM) | 14:00 |
| OrderRules | Availability rules β Max days ahead | 14 |
| OrderRules | Availability rules β Deliverable weekdays | Tue, Wed, Thu, Fri, Sat |
| OrderRules | Availability rules β Require a delivery date at checkout | On |
| Option A | Delivery Dates β Delivery date behavior β Maximum orders per delivery date | 40 |
| Option B | Product Limits β + Add Product Limits β product β Quantity Limits β Daily | 120 |
| Option B | Same product β Count daily limits by | Delivery date |
| OrderRules | Delivery Dates β Delivery blackout dates β Add date, or Copy store holidays | Your closed dates |
| OrderRules (optional) | Schedule β Weekly Schedule | Hours you take orders, if you don't take them around the clock |
Option A counts orders across the whole store, one figure for every date. Option B counts units of one product. Delivery and pickup share the same cap. Only the daily limit switches to delivery date; weekly and monthly limits still count by order date.
Store hours close checkout for the whole store. Skip the Schedule step if you want to take orders overnight for later dates.
Test cases
| # | Input | Expected result |
|---|---|---|
| 1 | Order before 14:00 for the earliest date offered | Order goes through. The date's count rises by 1 (A) or by the units ordered (B). |
| 2 | Same check after 14:00 | The earliest date offered moves one day later. |
| 3 | Shopper tries to pick a Sunday or Monday | Not selectable. |
| 4 | Shopper tries to pick a blackout date | Not selectable. |
| 5 | A date reaches its cap | The date shows as unavailable in the picker. A checkout for it is blocked. |
| 6 | Cart for 10 loaves when the date has 6 left (B) | Blocked with a message naming the date and the number left. |
| 7 | Shop Pay from the product page with no date chosen | Blocked: a delivery date is required. |
| 8 | Guest checkout with a valid date | Order goes through. No customer limits are on, so guests are allowed. |
| 9 | Same customer places a second order for the same date | Allowed if the date has room. It counts again. |
| 10 | You fully cancel an order | Its place returns to the date it was booked for. |
| 11 | You refund an order without cancelling | The place is not released. |
Edge cases and limits
- Near-simultaneous checkouts for the last place. Validation reads a snapshot of bookings and can't reserve. Two shoppers checking out in the same second for the last place on a date can both get through. Where capacity is small, leave a place of headroom.
- POS isn't blocked. Point of Sale orders skip checkout validation. Keep counter sales for a date in mind when you set the cap.
- Refunds don't release capacity. Neither do partial cancels. Cancel the order fully to free the place.
- Same cap every day. No per-weekday caps and no per-date overrides. A busy Saturday gets the same number as a quiet Tuesday.
- One storewide per-date figure. Maximum orders per delivery date applies to all products together. Use Option B for item-level caps.
- Checkout-page date picker needs Shopify Plus. The product and cart pickers work on any plan, and enforcement at checkout works on any plan.