Covers all questions related to inventory management, order fulfillment, and shipping.
The documentation states that for FulfillmentOrderLineItem.lineItem:
As of API version 2023-01, this field has been deprecated. The order line item associated with a FulfillmentOrderLineItem shouldn't be used to determine what to fulfill. Use the FulfillmentOrderLineItem and FulfillmentOrder objects instead. An order LineItem represents a single line item on an order, but it doesn't represent what should be fulfilled.
How am I supposed to get to
Can you at least copy those over to the FulfillmentOrderLineItem object? Otherwise I'll have to poke through the entire order and try to "guess" (by SKU and quantity) at which lineItem corresponds to which fulfillmentOrderLineItem, which is error-prone if an order has been split into multiple fulfillments.
Ideally order-level discounts would be distributed into the proposed fulfillmentOrderLineItem.discountedUnitPriceSet as well for customs declarations.
@Nicholas_P Any answer from Shopify? They are adding `inventoryItemId` in 2023-04, but that still doesn't help.
No, I was ignored for six months on fetch_stock simply not working and only got it resolved by pestering one of my Shopify Plus clients to keep hounding their representative.
It should be about a year before that field is actually removed from the GraphQL API, and I'm too busy finishing up migrating a bunch of legacy clients to fulfillment orders.
I'll just tell my clients that depend on customAttributes "your integrations will stop working unless you start hounding Shopify" maybe six months down the road when it's clear we're approaching the cliff.
I totally agree with you.
It's a major issue that they decided to deprecate FulfillmentOrderLineItem.lineItem
At least they should keep the variant id so it can be uniquely matched to the corresponding item on the order object.
Adding inventoryItem id in 2023-04 is a small step, but it means that we have to operate with both variant id and inventoryItem id for different things.
It's no way to guarantee that match on sku/title will be correct. What if the SKU or title has changed on the product, and you want to look up the product?
Please fix this Shopify!!!
Thanks for your feedback!
I've just left a reply to a similar question over here that i think you will find useful.
In summary, all data that is required to fulfil an item will be added to the FulfillmentOrderLineItem resource. This will include custom attributes and the data required for customs declarations. Deprecation warnings are added as soon as possible to spark feedback / questions, just like this, that will enable us to consider as many use cases as possible before functionality is actually changed.
To learn more visit the Shopify Help Center or the Community Blog.
Hi,
My issue with removing line item id from fulfilment order line item is that because of this I cannot determine which order line is this fulfilment order line for when there are duplicate variants in the order.
Shopify doesn’t think about all cases when making changes. What about duplicate variants in the order. The inventory item id and other values will be same. So there is no way to even guess which line item is the fulfilment order line for.
At the moment I am using quantity but even this is same. So my code has to do major acrobatics to determine which order line to assign for the fulfilment order line.
Please let me know your thoughts at the earliest.
Thanks.
I have the exact same issue.
This deprecation will make it almost impossible or us to fulfil partial line item since we wont be able to identify which FulfillmentOrderLineItem is reference to which LineItem ID.
Without CustomAttibutes the FulfillmentOrderLineItem is truly disconnected.
Imagine the same product with different personalization names. There is no way to know which fulfillment lineitem should have what printed.
Removing this linkage will become a disaster for those leveraging CustomAttributes... and even when there is no productVariantId for the lineitem.
Will those fields be added before lineItem is removed? There doesn't seem to be an easy way to get product metafields either without using that field:
lineItems(first: 200) {
edges {
node {
id
sku
totalQuantity
lineItem {
product {
metafields(keys: "amazon_alias", namespace: "jlab") {
edges {
node {
value
}
}
}
}
}
}
}
}
To me it would be obvious to include the barcode in the FulfillmentOrderLineItem object. FulfillmentOrderLineItem.lineItem is what I use currently to get the barcode of an item, not to mention its variant id, and product id, and consequently the products tags and metafields. I suppose all this can still be reached by fetching the inventoryItem object using the inventoryItemId, however.