> ## 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.

# removeProductAttributesFromProductWorkflow

> Detach attributes from a product, deleting product-scoped ones.

Handles the `remove` portion of the attribute batch engine (`createAndLinkProductAttributesToProductWorkflow`). Rejects required attributes, dismisses the product's value links for every listed attribute, detaches the mirror `ProductOption` for shared axis attributes, and runs `deleteProductAttributesWorkflow` for product-scoped (inline) attributes so their exclusive options are deleted too.

## Usage

```ts theme={null}
import { removeProductAttributesFromProductWorkflow } from "@mercurjs/core/workflows"

await removeProductAttributesFromProductWorkflow(container).run({
  input: {
    product_id: "prod_123",
    remove: ["pattr_color", "pattr_custom_size"],
  },
})
```

## Input

<ParamField body="product_id" type="string" required>The product to detach the attributes from.</ParamField>
<ParamField body="remove" type="string[]" required>Ids of the attributes to detach; attributes with `is_required: true` cause the workflow to throw.</ParamField>
<ParamField body="additional_data" type="object">Custom data passed through.</ParamField>

## Result

<ResponseField name="result" type="void">No return value.</ResponseField>
