How can I add a column in the Shopify order export to determine whether a customer is "new or returning"?
The Shopify Order API endpoint doesn't have a field for "new or returning customer".
However, there's a field called customer.orders_count which will return the current total order count for the customer at the time of export. So we can use this data to determine whether a customer is new or returning.
In EZ Exporter, you can use the following formula in the Calculated Fields to create a custom column that will export the text "New" if there's exactly 1 order count, otherwise export "Returning":
"New" if {{ customer.orders_count }} == 1 else "Returning"
In case you'd also like to know the position of the current order within the customer's order history, you can select the field:
-
customer_journey_summary.customer_order_index
Note that the order index starts at 1 and excludes test orders.
Related Articles:
App: EZ Exporter