EZ Exporter: get_attribute_value() and get_total() Functions Now Available
We've recently pushed an update to EZ Exporter to include two additional functions that can be used in the Calculated Fields: get_attribute_value() and get_total().
A couple use cases came up while talking to our customers and we thought the best way to handle them was to add these functions.
get_attribute_value(data, attribute_name, results_separator=",")
Retrieve an attribute's value from a list of attributes.
The data may look something like this:
"discount_codes": [ { "code": "SPRING30", "amount": "30.00", "type": "fixed_amount" } ]
Examples:
Retrieve just the value of the "code" attribute from the "discount_codes" data:
get_attribute_value({{ discount_codes }}, "code")
Retrieve the tax line "title" of the "line_items.tax_lines" data:
get_attribute_value({{ line_items.tax_lines }}, "title")
get_total(data, attribute_name)
Calculate the total value of a specific attribute from a list of attributes.
Example:
Retrieve the total quantity ordered of all line items in an order.
get_total({{ line_items }}, "quantity")
We hope these new functions will prove useful!
Tags: new features, shopify, csv export, ez exporter, reporting