Product Set Operation
Requires access scope.
An entity that represents details of an asynchronous ProductSet mutation.
By querying this entity with the productOperation query using the ID that was returned when the product was created or updated, 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 created or updated product.
The field provides mutation errors that occurred during the operation.
Anchor to FieldsFields
- •ID!non-null
A globally-unique ID.
- Anchor to productproduct•
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•
Errors [ProductSet User Error!]!non-null Returns mutation errors occurred during background mutation processing.
Anchor to MutationsMutations
- •mutation
Creates or updates a product in a single request.
Use this mutation when syncing information from an external data source into Shopify.
When using this mutation to update a product, specify that product's
id
in the input.Any list field (e.g. collections, metafields, variants) will be updated so that all included entries are either created or updated, and all existing entries not included will be deleted.
All other fields will be updated to the value passed. Omitted fields will not be updated.
When run in synchronous mode, you will get the product back in the response. For versions
2024-04
and earlier, the synchronous mode has an input limit of 100 variants. This limit has been removed for versions2024-07
and later.In asynchronous mode, you will instead get a ProductSetOperation object back. You can then use the productOperation query to retrieve the updated product data. This query uses the
object to check the status of the operation and to retrieve the details of the updated product and its variants.
If you need to update a subset of variants, use one of the bulk variant mutations:
If you need to update options, use one of the product option mutations:
See our guide to sync product data from an external source for more.
- Anchor to identifieridentifier•
Specifies the identifier that will be used to lookup the resource.
- Anchor to inputinput•Product
Set Input!required The properties of the newly created or updated product.
- Anchor to productPreferencesproduct•
Preferences The default preferences in the product create form.
- Anchor to synchronoussynchronous•BooleanDefault:true
Whether the mutation should be run synchronously or asynchronously.
If
true
, the mutation will return the updatedproduct
.If
false
, the mutation will return a.
Defaults to
true
.Setting
synchronous: false
may be desirable depending on the input complexity/size, and should be used if you are experiencing timeouts.Note: When run in the context of a bulk operation, the mutation will always run synchronously and this argument will be ignored.
Arguments
- Anchor to productproduct•
The product object.
- Anchor to productSetOperationproduct•
Set Operation The product set operation, returned when run in asynchronous mode.
- Anchor to userErrorsuser•
Errors [ProductSet User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields