> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mercurjs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Change statuses, revision requests, and auto-confirm

> The four ProductChangeStatus values, how a revision request fits in, and when a change confirms without review.

Every product change has a status that says whether it’s waiting for review or already resolved. A change starts `pending` and is resolved exactly once: confirmed, declined, or canceled. Whether a seller’s edit waits for an operator at all depends on the `product_request` feature flag and on the `auto_confirm` input.

## The status lifecycle

The `status` field takes one of the four `ProductChangeStatus` values, exported from `@mercurjs/types`. Each resolution has its own workflow, which checks that the change is still `pending`, stamps the actor field, and emits an event.

![The ProductChangeStatus table: a change enters pending through stageProductChangeWorkflow, then confirmProductChangeWorkflow, rejectProductChangeWorkflow, or cancelProductChangeWorkflow moves it to confirmed, declined, or canceled, each emitting its own event and stamping its own actor field.](https://mintcdn.com/mercur/KNc3NtbZ9cUlitbx/images/figures/product-edit-lifecycle-light.svg?fit=max\&auto=format\&n=KNc3NtbZ9cUlitbx\&q=85\&s=38990db1f1e2f973d7a215f0920c3b64)

| Status | Meaning | Product touched |
| - | - | - |
| `pending` | Staged and waiting for review. The default | No |
| `confirmed` | Approved, or recorded as an audit change | Yes, its actions are applied |
| `declined` | Rejected by an operator, with an optional `declined_reason` | No |
| `canceled` | Withdrawn, by the seller or an operator, before review | No |

Confirming, declining, or canceling a change that isn’t `pending` fails with a `NOT_ALLOWED` error. Each resolution step saves the previous values, so if a later step fails, the workflow restores the change to `pending`.

> [!NOTE]
>
> The model also has `requires_action_by`, `requires_action_at`, and `requires_action_reason` columns, but `ProductChangeStatus` has no `requires_action` value and no workflow writes those columns.

## Revision requests

A revision request sends a proposed product back to its seller without approving or rejecting it. `requestProductChangeWorkflow` checks that the product status is `proposed`, records an audit change with a `CHANGE_REQUESTED` action, and emits `product.change-requested`. The product stays `proposed` for the seller to revise.

A revision request isn’t a fifth status, and it doesn’t resolve any pending change. It’s an already-`confirmed` entry in the product’s history. The operator’s message is stored twice: in the action’s `details.message` and in the change’s `external_note`.

## Auto-confirm

Staging always runs `autoConfirmProductChangeWorkflow` right after the change is created. It runs `confirmProductChangeWorkflow` in the same workflow run when either condition holds:

* **The flag is off**: the `product_request` feature flag is disabled
* **Forced**: the caller passed `auto_confirm: true`, which reaches the workflow as `force`

Otherwise the change stays `pending`. The flag is on by default. Turn it off with an environment variable:

```bash title=".env" theme={null}
MEDUSA_FF_PRODUCT_REQUEST=false
```

With the flag off, every seller edit applies immediately and still leaves a confirmed change in the trail. The same flag also controls product creation: while it’s on, a seller can only create products as `draft` or `proposed`.

## When Mercur forces auto-confirm

There’s no risk scoring: Mercur doesn’t classify edits as low or high risk. It forces auto-confirm in three places:

* **Unpublished edits**: `stageProductChangeWorkflow` confirms changes to a `draft` or `proposed` product, because the product is reviewed as a whole when it goes live
* **Draft deletes**: `productEditDeleteProductWorkflow` defaults `auto_confirm` to `true` when the product is a `draft`
* **Operator deletes**: the admin product delete route always passes `auto_confirm: true`

## Decide auto-confirm from a plugin

`stageProductChangeWorkflow` exposes a `setAutoConfirm` hook. It runs after the change and its actions are created, and before auto-confirm. Return `{ auto_confirm: true }` to confirm the change in the same run, `{ auto_confirm: false }` to keep it `pending`, or nothing to keep the default. An `auto_confirm` passed by the caller still wins over the hook.

```ts title="src/workflows/hooks/hold-catalog-edits.ts" theme={null}
import { StepResponse } from "@medusajs/framework/workflows-sdk"
import { stageProductChangeWorkflow } from "@mercurjs/core/workflows"

stageProductChangeWorkflow.hooks.setAutoConfirm(({ product }) => {
  if (product.status === "proposed") {
    return new StepResponse({ auto_confirm: false })
  }
})
```

The hook receives `product` (`id` and `status`), the created `product_change`, its `actions`, and `created_by`. Product, variant, and attribute edits all stage through `stageProductChangeWorkflow`, so the hook covers each of them. `productEditDeleteProductWorkflow` always passes its own `auto_confirm`, so the hook doesn't change deletes. A workflow hook takes one handler.

An auto-confirmed change goes through the same `confirmProductChangeWorkflow` as a manual approval. It emits `product-change.confirmed` and fires the same hooks, with `confirmed_by` set to the change’s author.

## Related

* [Confirm, decline, or cancel a change in code](https://docs.mercurjs.com/platform/product-edit/guides/confirm-or-decline-a-change.md)
* [Request a revision](https://docs.mercurjs.com/platform/product-edit/guides/request-a-revision.md)
* [The events each transition emits](https://docs.mercurjs.com/platform/product-edit/reference/events.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.