Product Duplicate Operation
Requires 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 ,
, or
.
The product
field provides the details of the original product.
The field provides the details of the new duplicate of the product.
The field provides mutation errors that occurred during the operation.
Anchor to FieldsFields
- •ID!non-null
A globally-unique ID.
- Anchor to newProductnew•Product
Product The newly created duplicate of the original product.
- Anchor to productproduct•Product
The product on which the operation is being performed.
- Anchor to statusstatus•Product
Operation Status!non-null The status of this operation.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null Returns mutation errors occurred during background mutation processing.
Anchor to MutationsMutations
- •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
.
Metafield values are not duplicated if the unique values capability is enabled.
- Anchor to includeImagesinclude•BooleanDefault:false
Images Specifies whether or not to duplicate images.
- Anchor to includeTranslationsinclude•BooleanDefault:false
Translations Specifies whether or not to duplicate translations.
- Anchor to newStatusnew•Product
Status Status The new status of the product. If no value is provided the status will be inherited from the original product.
- Anchor to newTitlenew•String!required
Title The new title of the product.
- Anchor to productIdproduct•ID!required
Id The ID of the product to be duplicated.
- Anchor to synchronoussynchronous•BooleanDefault:true
Specifies whether or not to run the mutation synchronously.
Arguments
- Anchor to imageJobimage•Job
Job The asynchronous job that duplicates the product images.
- Anchor to newProductnew•Product
Product The duplicated product.
- Anchor to productDuplicateOperationproduct•Product
Duplicate Operation Duplicate Operation The product duplicate operation, returned when run in asynchronous mode.
- Anchor to shopshop•Shop!non-null
The user's shop.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields