Skip to main content
In this guide, you’ll learn how to resolve a pending change from your own server code. Each resolution has a dedicated workflow so the side effects (applying actions, events, compensation) run consistently.

Confirm a change

confirmProductChangeWorkflow marks the changes confirmed, applies their pending actions to the product, and emits product-change.confirmed.
src/api/custom/confirm/route.ts
Confirmation only applies actions that aren’t already applied, so re-running it never writes the same edit twice.

Decline a change

rejectProductChangeWorkflow moves a pending change to declined without touching the product, and emits product-change.declined.

Cancel a change

When the change should be withdrawn rather than judged (for example the vendor retracting their own submission), use cancelProductChangeWorkflow:
Confirm, decline, and cancel all require the change to be pending. Resolving an already-resolved change fails validation. A change is resolved exactly once.

React to resolutions

To run your own side effects when a change resolves, subscribe to the events these workflows emit rather than polling. See the Event reference.