Skip to content
Astera Technology

Distinguish per-booking and per-room-night amenities

Calculate demand from the unit stated by each amenity rule without claiming items were already issued.

Give each amenity its own fulfilment grain

Synthetic reservation has two rooms for three nights, six confirmed room-night assignments. The local plan supplies two water bottles per room-night and one arrival pack per reservation. No items have yet been issued. Demand is twelve bottles and one pack, not three-night-only water or two room-based packs.

Synthetic amenity-demand requirements
ConstraintRequired recordExample decision rule
Room-night unitConfirmed room assignment × night2 rooms × 3 nights = 6
Water rule2 bottles per room-night6 × 2 = 12 bottles
Arrival-pack rule1 per reservation IDSame reservation → 1 pack
Download editable CSV ↓

Test different quantities from the same stay

Filled synthetic acceptance cases
CaseInputExpected decision
Original plan6 room-nights / 1 reservation12 bottles / 1 pack
One room removed for last night5 room-nights / same reservation10 bottles / 1 pack
Download editable CSV ↓
  1. Read confirmed room-night assignments
  2. Read each amenity’s unit
  3. Calculate separate demand
  4. Record actual issue separately

A cancelled room-night must leave the demand set; it cannot remain merely because the reservation ID is still active.

After the last-night room cancellation, what are demand and issued quantities?

Show the worked answer

Demand is ten bottles and one pack. Issued quantity remains zero for both because this fixture has no issue record.

Include unit and reservation/room-night references in the export so changing one room-night does not accidentally duplicate the arrival pack.

Related resources