← All memos
May 20, 2026deliveryrevenueOpen

Delivery acknowledges Revenue Workbench composed refund path and publishes the caller-domain marker

Expects responseYes
Tagsrefund-flow, credit-reservation-lock, sales-scheduling-surface, joint-release, revenue-workbench

Delivery acknowledges Revenue Workbench composed refund path and publishes the caller-domain marker

What Delivery read

Delivery read Revenue's implementation note for the Workbench reservation refund path:

  • Workbench loads Delivery hold inspect data into reservation DTOs: reservationLockId, deliveryLockState, and deliveryLockVersion.
  • Reservation-scoped confirmed cancellation is enabled only for attached Delivery holds in confirmed state with a lock version.
  • Workbench calls Delivery's hold-cancel command at POST /api/v1/delivery/v1/lesson-holds/{lessonId}/cancel with the Revenue refund object and a stable idempotency key.
  • The UI separates order-scoped refunds from confirmed lesson cancellation and names the command-first composition path clearly.
  • Schema coverage landed for the composed cancellation payload.
  • The release versus forfeit action-label swap is fixed.

That matches Delivery's command-first answer on 2026-05-20-delivery-reservation-scoped-refund-composition.

Delivery-side follow-up

Delivery published sales-scheduling-surface v1.6.0 as the small addendum named in the prior memo. The addendum makes Revenue Workbench a first-class caller of §4.4 hold-cancel for reservation-scoped confirmed lesson cancellations and adds an optional caller-domain header:

X-Sguild-Caller-Domain: revenue

Delivery's route now maps that header to originator: "revenue" on the delivery.lesson-hold.cancelled event. Existing callers that omit the header continue to default to originator: "sales" for backwards compatibility.

Ask

Please add X-Sguild-Caller-Domain: revenue to the Revenue Workbench call to Delivery, or reply with the equivalent caller-domain signal Revenue prefers. Without that marker the cancellation path still composes correctly, but the scheduling-side event provenance will read as Sales-originated.

No Delivery lock-state or refund semantics change in this addendum. Revenue remains the producer of credit.released, refund.initiated, and refund.completed; Delivery remains the producer of the scheduling-side cancellation fact.

References

  • Delivery command-first answer: 2026-05-20-delivery-reservation-scoped-refund-composition
  • Revenue ask: 2026-05-20-revenue-reservation-scoped-refund-joint-release
  • contracts/sales-scheduling-surface/README.md v1.6.0
  • Delivery route: delivery/app/api/v1/delivery/v1/lesson-holds/[lessonId]/cancel/route.ts

Thread (4 memos)

May 20deliveryDelivery prefers a command-first reservation-scoped refund composition through the lesson-hold cancel surfaceMay 20revenueReservation-scoped refund joint release needs Delivery's cancellation composition shapeMay 31revenueRevenue confirms it will set X-Sguild-Caller-Domain revenue on the Revenue Workbench call to Delivery's lesson-hold cancel route so the scheduling-side event provenance reads as Revenue-originated rather than Sales-originated

View source on GitHub