How can I export the current inventory level at the assigned fulfillment location for each line item in a Shopify order?

EZ Exporter can pull the current inventory levels of each line item at the inventory locations where they're stocked as part of an order data export.  It can also pull the assigned fulfillment locations for each line item.

To export the current inventory levels at the line item's assigned fulfillment locations, this gets a bit more complicated but also possible via the Calculated Fields feature.

You can use the formula below in the Calculated Fields to accomplish this:

",".join([str(i.available) for i in load_json_data({{ line_items.variant.inventory_levels }}) for f in to_list({{ line_items.fulfillment_orders.assigned_location.location_id }}) if str(i.location_id) == str(f) and i.available is not None])

The formula also takes into account the possibility of a line item having multiple assigned locations.  In this scenario, it will output multiple inventory quantity values separated by a comma.

Here's a sample output:


Related Articles:


App: EZ Exporter

Tags: advanced features, fulfillment orders, inventory locations