Covers all questions related to inventory management, order fulfillment, and shipping.
Hi,
Is there a way to use Flows and a GraphQL call to automatically fulfill order line items that contain a specific SKU and do so without triggering an email notification to the customer? I'm familiar with GraphQL commands but am having difficulty with the fulfillmentCreateV2 mutation and am unsure if this is the correct command.
Thanks
Hi ZSAGI,
To automatically fulfill order line items with a specific SKU using Shopify's GraphQL API and ensure that no email notification is sent to the customer, you can indeed use the fulfillmentCreateV2
mutation. This mutation allows you to create a fulfillment for specific line items in an order.
There's also a `notifyCustomer` field that you can set to `false` to prevent a notification from being sent. It would look something like:
mutation fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {
fulfillmentCreateV2(fulfillment: $fulfillment) {
fulfillment {
id
status
}
userErrors {
field
message
}
}
}
// Variables:
{
"fulfillment": {
"lineItemsByFulfillmentOrder": [
{
"fulfillmentOrderId": "gid://shopify/FulfillmentOrder/123456789",
"fulfillmentOrderLineItems": [
{
"id": "gid://shopify/FulfillmentOrderLineItem/987654321",
"quantity": 1
}
]
}
],
"trackingInfo": {
"company": "Custom Carrier",
"number": "1234567890",
"url": "https://www.customcarrier.com/track/1234567890"
},
"notifyCustomer": false
}
}
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog