Major issue with fulfillmentOrder

Since the FulfillmentOrderLineItem.lineItem was deprecated, it’s no way of making absolutely sure to match the correct item on the order, or the correct productVariant.

Reading the fulfillmentOrder will be not be enough, we also have to load the corresponding order, and guess which product on the order it belongs to.

SKU and title are NOT unique identifiers (even combined), and can change at any point if trying to look up the productVariant.

Let say we look up an order using fulfillmentOrders. It says that the SKU is “123”. In the meantime the SKU on the product has been changed to “222”, or has changed several times since. Then there is no way of finding this product.

Using the inventoryItem id in 2023-04 is one step in the right direction, but it also makes it very difficult for us since we are referencing the variant id everywhere else. At least keep the variant id also.

Why does Shopify force us to move to a useless endpoint, and not explaining why you think removing the lineItem is good for the API users or the merchant?

BTW: All the required info is still in the REST endpoint. How come?

Shopify: Please fix this major issue!

Thanks for your detailed feedback!

We are currently working on this at the moment.

All data that is required to fulfil an item will be added to the FulfillmentOrderLineItem resource. 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.

Hopefully, by making this and similar other changes, we will not only be able to be keep the fulfilment API up to date with the latest functionality offered by the Shopify platform, but also be able to reduce the amount of data that needs to be shared in order to fulfil orders on behalf of merchants.

The REST API will be a updated as part of this process as well.

Hi Marcusturner,

This seems to be good news. Just keep in mind that many of us will not use a version of the API that is not released yet in a production environment. So we also need time after the release to implement.

In our case the FulfillmentOrder will not have enough data anyway, so we need to read some data from FulfillmentOrder, and the rest from the corresponding Order object (like order tags, order custom attributes etc). So for us, it’s critical that the FulfillmentOrderLineItem.lineItem contains the variant id so we can match it uniquely to the variant on the order (and not by SKU/title), or if the FulfillmentOrderLineItem.lineItem is linked to a specific Order.LineItem it would be perfect with the LineItem id

BTW: We plan to use webhooks to keep a copy of parts of the FulfillmentOrder in our database, to implement Shopify location support. Then it’s really important that the data we get from the webhook also has the variant id in the LineItem

Thanks @marcusturner ! Good to hear. Since this is pretty core to everything, I hope we get EARLY heads up (not close to 2024 when 2023-01 deprecation actually happens). The changes needed are huge since this impacts everything.

Essentially, all the attributes of lineItem are needed, such as discountAllocations and related fields; product related attributes; variant related attributes; and inventoryItem related attributes such as unitCost.

Hi,

I have an existing public app where I look at the FulfillmentOrderLineItem.lineItem object (see specific parameters below) to check whether a given line has a given product. If so I accumulate lines for selected products and fulfill only those lines, and potentially capture an amount for only those lines - that’s why I need currency and the money parameters.
With 2023-01 I cannot see how I can determine which product is related to which fulfillment line item - which means I cannot determine which lines to fulfill. Is there a way to do that in 2023-01 where the order line item is deprecated from fulfillment order line items?

lineItem {
                    id
                    product{
                      id
                    }
                    quantity
                    discountedTotalSet {
                      shopMoney {
                        amount
                        currencyCode
                      }
                      presentmentMoney {
                        amount
                        currencyCode
                      }
                    }
                  }

I’d like to both give a +1 to this thread generally, but also add an additional usecase that I haven’t seen mentioned yet.

When dealing with customizable products, various custom attributes are typically attached to an Order’s LineItem using custom attributes. This could be for a gift message, engraving instructions, integrating with apps like ThreeKit, etc.

The SKU doesn’t change based on these custom choices of course, so when Shopify creates the FulfillmentOrder, and associated FulfillmentOrderLineItem objects, there is currently no way to reference back to what custom choices were made without the lineItem property.

Thank you for commenting on this thread @marcusturner , and looking forward to hearing more about how this will be solved before this deprecation is acted on.

Hey :waving_hand: I just wanted to clarify a few bits for some of the recent responses.

Thanks again for all the feedback about the data and use cases which you have for the order lineItem connection! :tada:

When will i need to stop using the order lineItem connection on the FulfillmentOrderLineItem resource?

We’re currently in the planning phase for this change. This means that we are collecting feedback and use cases and investigating what data will be needed to replace this field. As part of this phase, we added the deprecation warning to the GraphQL API in the 2023-01 release.

The new deprecation message that was added in the 2023-01 API version will not remove access to the order lineItem connection.

Once we have a suitable replacement for the order lineItem connection, it will be removed from the release candidate at that time. At that time, anyone wishing to use the release candidate API version will need to migrate away from using the order lineItem connection. However, this change will not immediately impact users if they are using previous versions.

Any API version which has the order lineItem connection will continue to be available for a year after the date that the version was released and will continue to give access to the order lineItem connection as it did previously. The order lineItem connection is currently available in the 2023-01 and 2023-04 API versions.

What data will replace the order lineItem connection

Here’s what we have so far.

The following information is still subject to change because we are still early in the planning phase. There may also be more fields which we have received feedback for but which i am not currently aware of.

But with this we still don’t know which order line this belongs to. Especially when multiple lines with the same variant. We need a LOT of order line item/variant information in our app, and this will make it extremely difficult to identify the order line, and with multiple calls that will exhaust the query cost limit (which we’re already struggling big time with), and slow down the user experience.

I guess we all wonder about Shopify’s reasoning for this change??? It’s not to the app developers or the users advantage.

As a side note, Shopify is pushing more and more data and properties at us, and still the query cost limit has not been raised in 10 years! Probably enough for simple apps, but for complex apps with lots of order data it’s getting close to impossible to support this. A typical get order data query for us has a query cost of around 100. So when you have 10 people working at the same time, it really slows down.

@marcusturner there is way more data that our apps need than the ones you listed out in your reply.

We make extensive use of Variant metafields which we won’t be able to access anymore. If variantId would be added, that would help as well. Or just variantMetafields, that would be the best.

Hi there, there still doesn’t appear to be any more information on what data was added to make up for the removal of the lineItem field. Is this field going to be gone on Oct 1st, or, is it going to be there for about a year longer? Currently it’s still listed as deprecated in the 2023-10 api docs, which according to this answer means we should be expecting it to be there until 2024-10? This is causing a lot of headaches and I also really don’t understand why you are taking this away. Thanks!

For the sake of conversation:

This change is likely about information system architecture.

The key phrase is this:

“All data that is required to fulfil an item will be added to the FulfillmentOrderLineItem resource.” - Marcusturner

For better or for worse: The actual price the line items sold for, custom attributes, metafields, whatever… All of that information is not required to fulfill a fulfillment order, so it’s not included. You can still get that information through another route, but it’s not going to be as easy.

The first priority is to make sure the system is fine-tuned. The second priority is to make our lives easy.

A summary for future readers:

Continue using the deprecated fields until a suitable replacement is ready. And you may continue to use the deprecated fields for a year after the date that the API was released.

This means that the deprecated FulfillmentOrderLineItem.lineItem field in the 2023-10 API will continue to be accessible through October, 2024.

Another use case coming from me. We are subscribed to orders/paid webhook which have a payload with the line items containing line item id, e.g.


{
"id": 11116620221559,
"admin_graphql_api_id": "gid://shopify/LineItem/11116620221559",
}

On our system when we fulfil an item we use exactly this line item id to get the remainingQuantity for the fulfilment order line item and create the fulfilment.

What’s the workaround to get that map line item id and fulfilment order line item?

Thanks Marcus,

The 2024-07 release has been super helpful by adding variant to FulfillmentOrderLineItem. However, how do we access customAttributes which was in lineItem?