I am importing orders from our legacy e-commerce platform to shopify using graphql. I am import the orders just fine, but they show as “Unfulfilled” in shopify. I need them to show as “Fulfilled” as they are historical orders.
According to the FulfillmentOrder docs: “Shopify creates fulfillment orders automatically when an order is created.” and that I need to query the FulfillmentOrder with the order ID to get the Fulfillment Order, then once I have that, do a FulfillmentCreate mutation to mark the order as fulfilled.
The problem is, when I try to get the Fulfillment Order with the order id, no result is returned, so I can’t create the fulfillment. At first I was getting access scope errors, but I fixed those. When I run the fulfillmentOrders query for an order that DEFINITELY exists:
query GetFulfillmentOrdersForOrder {
order(id: "gid://shopify/Order/6670350909773") {
fulfillmentOrders(first: 10) {
nodes {
id
status
createdAt
fulfillAt
destination {
address1
city
province
zip
}
lineItems(first: 5) {
nodes {
id
totalQuantity
variant {
id
title
}
}
}
assignedLocation {
name
address1
city
province
zip
}
}
}
}
}
I get a response, but the fulfillmentOrders array is empty
{
"data": {
"order": {
"fulfillmentOrders": {
"nodes": []
}
}
},
"extensions": {
"cost": {
"requestedQueryCost": 47,
"actualQueryCost": 3,
"throttleStatus": {
"maximumAvailable": 2000.0,
"currentlyAvailable": 1997,
"restoreRate": 100.0
}
}
}
}
What am I missing?
If it is relevant, inventory tracking is not on for the products in our shop as most of them are drop shipped.