batch Add Items By Name
Requires access scope.
Adds items to the most recent open or in-progress batch with the given name. An item goes to a different batch with the same name when that batch is full or when the batch workflow's steps don't allow the item in that batch alongside the items it already has. A full batch's overflow goes to a new batch with the same name, never an older one. Concurrent requests with the same name don't create duplicate batches.
Supports an optional idempotency key using the @idempotent directive. For
more information, see the idempotency
documentation.
Arguments
- itemIds ([ID!])
- name (String!)
- workflowId (ID)
- Anchor to itemIdsitem•[ID!]
Ids The items to add. If omitted or null, the matching batch is returned, or an empty batch with the given name is created if none exists. An empty list returns a
NO_ITEMSerror.- Anchor to namename•String!required
The name of the batch to add items to. A batch with this name is created if no eligible batch with the name exists.
- Anchor to workflowIdworkflow•ID
Id The batch workflow to match. If set, only batches that use it are matched. If omitted, matching batches can use any batch workflow, and new batches use the shop's default batch workflow, which is created if it doesn't exist.
- batches ([Batch!])
- batchItemRejections ([BatchItemRejection!])
- createdBatches ([Batch!])
- userErrors ([BatchAddItemsByNameUserError!]!)
- Anchor to batchesbatches•[Batch!]
The batches that received items, in the order they were created. If no items were given, the matching batch.
Show fields
- Anchor to batchItemRejectionsbatch•[Batch
Item Rejections Item Rejection!] Items that weren't added to any batch, grouped by rejection reason.
Show fields
- Anchor to createdBatchescreated•[Batch!]
Batches The batches that this request created. A subset of
batches.Show fields
- Anchor to userErrorsuser•[Batch
Errors Add Items By Name User Error!]! non-null The list of errors that occurred from executing the mutation.
Show fields