You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the Order API,
I want bot inventory in Cosmos DB to reflect stock changes published by the simulator,
so that order assignment can use a readable inventory view when selecting candidate bots.
Acceptance Criteria
Given a RobotStockUpdated event is received
When the event is processed
Then the Function App updates the inventory section of the corresponding bot document.
Given stock is reserved for an accepted or queued order
When the stock update is processed
Then quantity reserved and quantity available are updated in the bot document.
Given a delivery is completed
When the final stock update is processed
Then quantity on hand, quantity reserved, and quantity available reflect the completed delivery.
Given an inventory update event is older than the current inventory timestamp
When the Function App processes the event
Then the older event does not overwrite newer inventory values.
As the Order API,
I want bot inventory in Cosmos DB to reflect stock changes published by the simulator,
so that order assignment can use a readable inventory view when selecting candidate bots.
Acceptance Criteria
Given a RobotStockUpdated event is received
When the event is processed
Then the Function App updates the inventory section of the corresponding bot document.
Given stock is reserved for an accepted or queued order
When the stock update is processed
Then quantity reserved and quantity available are updated in the bot document.
Given a delivery is completed
When the final stock update is processed
Then quantity on hand, quantity reserved, and quantity available reflect the completed delivery.
Given an inventory update event is older than the current inventory timestamp
When the Function App processes the event
Then the older event does not overwrite newer inventory values.