How can I put each line item property into its own column?
The field line_items.properties
is typically used to capture additional custom options or personalization data from the customer for each product/line item in the order.
Selecting this field in the app will export all of them combined in 1 column in JSON format.
If you need to place them in separate columns, we have function called search_attributes(data, property_name) you can use for this purpose.
For example, let's say you have Line Item Property called "Birthday" that you want to include in your report as a separate column.
To do so, in the Calculated Fields section of the Data Settings of an Order data export, simply use this formula:
search_attributes({{ line_items.properties }}, "Birthday")
If you have other properties you'd like to place into their own columns, simply repeat the formula above in additional Calculated Fields and replace "Birthday" with the name of the other properties.
Here's a screenshot of what this looks like in the app:
You can find the name of each line item property from the Shopify Admin's order detail page as shown below:
Using the search_attributes() formula for each of the line item property will output something like this:
Related Articles:
- Can I export custom product attributes created with apps such as Infinite Options and Product Options as part of my Shopify order CSV export?
- Can I export line item properties from my Shopify orders?
- Can I export the product customization data that were added by the Customily app?
- How do I export all the line item properties of a Shopify order in a single column in Name: Value format separated by a line break?
App: EZ Exporter
Tags: faq, line item properties, advanced features