%%{init: { "theme": "base", "themeVariables": { "fontSize": "18px", "background": "transparent", "actorBkg": "#038851", "actorTextColor": "#ffffff", "actorBorder": "#026139", "actorLineColor": "#94a3b8", "signalColor": "#64748b", "signalTextColor": "#059669", "noteBkgColor": "#e6f4ee", "noteTextColor": "#02502f", "noteBorderColor": "#038851", "activationBkgColor": "#c6ebdc", "activationBorderColor": "#026139", "sequenceNumberColor": "#ffffff" }, "sequence": { "useMaxWidth": true, "actorMargin": 70, "width": 150, "height": 60, "boxMargin": 12, "noteMargin": 14, "messageMargin": 50, "diagramMarginX": 20, "diagramMarginY": 20, "actorFontSize": 18, "actorFontWeight": 700, "noteFontSize": 15, "noteFontFamily": "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace", "messageFontSize": 16, "messageFontWeight": 700, "noteAlign": "left", "mirrorActors": false } }}%%
sequenceDiagram
participant C as Retail Channel
participant D as Deliverect
participant P as Picking Partner
C->>D: New retail order
D->>P: POST {orderWebhookUrl}/picking/order (filtered order, HMAC)
P->>D: POST /picking/order/{id}/start
P->>D: POST /picking/order/{id}/item/{itemId}/suggestSubstitute
D-->>P: 200 [substitute candidates] (synchronous — pulled, not pushed)
P->>D: POST /picking/order/{id}/item/{itemId}/pick
P->>D: POST /picking/order/{id}/updateOrderItems (ADJUST / REPLACE / REMOVE / PICK)
Note over D: amendments/substitutions forwarded to the CHANNEL
P->>D: POST /picking/order/{id}/done
D->>P: POST {orderWebhookUrl}/picking/order/{id}/update (lifecycle events, e.g. CUSTOMER_APPROVAL_SUBSTITUTION)