POS - Integration Flow

%%{init: {'theme': 'base', 'themeVariables': {'background': '#ffffff', 'mainBkg': '#ffffff'}}}%%

sequenceDiagram
    participant Retail as Retail POS
    participant DR as Deliverect Retail
    participant CB as Catalog Builder
    participant CH as Retail Channels
    participant QA as Quest App

    Retail->>DR: Catalog items (Item Upload )<br> POST /catalog/accounts/{accountId}/itemsUploadUrl
    Retail->>DR: Location inventory (Inventory Update)<br> POST /catalog/accounts/{accountId}/locations/{locationId}/inventoryUpdateUrl
    DR->>CB: Build catalog
    CB->>CH: Publish catalog

    CH->>DR: Create order<br> POST /{channelName}/order/{channelLinkId}
    DR->>QA: Order sent for picking

    QA->>CH: Start picking
    QA->>CH: Picking finished

    alt Order change?
        QA->>CH: Update amendments / subs
    end

    QA->>DR: Finalized order
    DR->>Retail: Order webhook (Order Notification)
    Retail->>DR: Order status update<br> POST /orderStatus/{orderId}