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

# linkSellersToProductWorkflow

> Add or remove seller eligibility links on a master product.

Updates which sellers are eligible for a master product by creating and removing `product_seller` links in one call. Triggered by `POST /admin/products/:id/sellers`. No events are emitted and the product record itself is untouched.

## Usage

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

await linkSellersToProductWorkflow(container).run({
  input: {
    id: "prod_01H...",
    add: ["sel_01H..."],
    remove: ["sel_01J..."],
  },
})
```

## Input

<ParamField body="id" type="string" required>
  Id of the product whose seller links are being updated.
</ParamField>

<ParamField body="add" type="string[]">
  Seller ids to link to the product.
</ParamField>

<ParamField body="remove" type="string[]">
  Seller ids to unlink from the product.
</ParamField>

## Result

<ResponseField name="result" type="void">
  Returns nothing; the links are created and removed in place.
</ResponseField>
