Skip to content

Use the Read Model for Order Candidate Selection #70

@DakotaCondos

Description

@DakotaCondos

*Note: This user story heavily overlaps with Order Service, but this is how its requirements are built into the Readable Bot Network Representation. Can adjust as needed.

As the Order API,
I want to use the Cosmos DB bot read model to select candidate bots for new orders,
so that orders can be routed to bots that appear available and stocked.

Acceptance Criteria

  • Given a customer submits an order
    When the Order API evaluates candidate bots
    Then it reads bot availability, location, and inventory from the Cosmos DB Bots container.

  • Given multiple bots can fulfill the order
    When the Order API selects a target bot
    Then it chooses a bot based on defined selection rules such as availability, stock, distance, or priority.

  • Given the Order API selects a target bot
    When it creates the order assignment
    Then it publishes the assignment to the robot-input Event Hub.

  • Given the readable bot state may be slightly behind the simulator
    When the simulator receives the order assignment
    Then the simulator performs final stock and availability validation before accepting the order.

  • Given the simulator accepts, queues, or rejects the order
    When the response event is published
    Then downstream processing updates the readable bot representation as needed.

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