Skip to main content
Anchor to ProductDuplicateOperation

ProductDuplicateOperation

object

Requires read_products access scope.

An entity that represents details of an asynchronous ProductDuplicate mutation.

By querying this entity with the productOperation query using the ID that was returned when the product was duplicated, this can be used to check the status of an operation.

The status field indicates whether the operation is CREATED, ACTIVE, or COMPLETE.

The product field provides the details of the original product.

The newProduct field provides the details of the new duplicate of the product.

The userErrors field provides mutation errors that occurred during the operation.

ID!non-null

A globally-unique ID.

Product

The newly created duplicate of the original product.

Product

The product on which the operation is being performed.

ProductOperationStatus!non-null

The status of this operation.

[UserError!]!non-null

Returns mutation errors occurred during background mutation processing.


Was this section helpful?

mutation

Duplicates a product.

If you need to duplicate a large product, such as one that has many variants that are active at several locations, you might encounter timeout errors.

To avoid these timeout errors, you can instead duplicate the product asynchronously.

In API version 2024-10 and higher, include synchronous: false argument in this mutation to perform the duplication asynchronously.

In API version 2024-07 and lower, use the asynchronous ProductDuplicateAsyncV2.

Metafield values are not duplicated if the unique values capability is enabled.

Arguments

BooleanDefault:false

Specifies whether or not to duplicate images.

BooleanDefault:false

Specifies whether or not to duplicate translations.

ProductStatus

The new status of the product. If no value is provided the status will be inherited from the original product.

String!required

The new title of the product.

ID!required

The ID of the product to be duplicated.

BooleanDefault:true

Specifies whether or not to run the mutation synchronously.


Fields

Job

The asynchronous job that duplicates the product images.

Product

The duplicated product.

Anchor to productDuplicateOperationproductDuplicateOperation
ProductDuplicateOperation

The product duplicate operation, returned when run in asynchronous mode.

Shop!non-null

The user's shop.

[UserError!]!non-null

The list of errors that occurred from executing the mutation.


Was this section helpful?


Was this section helpful?