Skip to content

Update Bot Inventory from Stock Events #67

@DakotaCondos

Description

@DakotaCondos

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for User Story.

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions