A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
We are having trouble finding query parameters to match our fulfillment query to identify fulfillment status by line item. We need to be able to retrieve fulfillment status to identify partially fulfilled orders. The current query from the query from the fulfillment center is:
{
orders(analyze: false, order_number: "#18081-M") {
request_id
complexity
data(first: 1) {
edges {
node {
id
legacy_id
partner_order_id
order_number
shop_name
fulfillment_status
order_date
profile
shipping_lines {
carrier
method
price
title
}
line_items(first:10) {
edges {
node {
id
sku
quantity
product_name
fulfillment_status
}
}
}
shipping_address {
first_name
last_name
address1
address2
city
state
state_code
zip
country
phone
}
}
}
pageInfo {
hasNextPage
startCursor
endCursor
}
}
}
}
Would not be better off working with the fulfillment orders assigned to an order? They are a record of all the items fulfilled and to be fulfilled and have a query parameter handy for your cause: status. With that, you should have no trouble identifying partial fulfillments. You do have to be careful of locations with this, too, but nonetheless, they are complete objects with helpful properties. I don't think your GraphQL is optimal for working with fulfillment status, even though line items do carry with them a status.
Currently, the orders pass through our IM system's API (they use GraphQL) into our shipping system. The developer with our shipping system getting that query - posted above - to update Shopify. Do you have any sample code for your suggestion that I might be able to pass along to him? Thanks for your help!
Shopify published up to date documentation that completely describes how to use Shopify with GraphQL, including fulfillments. Your developer obviously has the skills to navigate to those in a web browser, read them and then implement/test them. Beats have a copy and paste competition here in the forums.
The problem is that we only have SKUs to work with through our fulfillment API and not the item IDs. Shopify support confirms that there is no documentation that match SKUs with global ID. At this point, we would welcome a developer who thinks they can tackle this job. Anyone interested can DM me.