Skip to main content

cloneProduct

Requires permission products:product:create.

Creates an independent copy of a product with its variants, quantity tiers, packs, tax settings and categories. The copy gets new SKUs and zero stock. Sending the same idempotency key again returns the original copy. Requires permission to create products.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation CloneProduct($input: CloneProductInput!) {
cloneProduct(input: $input) {
id
name
status
createdAt
basePrice
baseUOMId
baseUOM {
id
code
colorCode
name
pluralName
createdAt
}
}
}

Variables:

{
"input": {
"idempotencyKey": "string",
"sourceProductId": "id"
}
}

Response:

{
"data": {
"cloneProduct": {
"id": "id",
"name": "string",
"status": "ACTIVE",
"createdAt": "2025-01-15T00:00:00Z",
"basePrice": 0,
"baseUOMId": "id",
"baseUOM": {
"id": "id",
"code": "string",
"colorCode": "string",
"name": "string",
"pluralName": "string",
"createdAt": "2025-01-15T00:00:00Z"
}
}
}
}
cloneProduct(
input: CloneProductInput!
): Product!

Arguments​

cloneProduct.input ● CloneProductInput! non-null input​

The product to copy, an optional name and status for the copy, and the idempotency key.

Type​

Product object​

A product: the master record with its variants, categories, units of measure and stock.