How do I export the last 4 characters of the purchased gift card code from a Shopify order?

Once the gift card in the Shopify order is fulfilled, the last 4 characters of the purchased gift card code will show up in the fulfillments data of the Shopify order.

To export this data with EZ Exporter, you can use this formula in the Calculated Fields section of the Data Settings:

get_attribute_value(get_attribute_value({{ fulfillments.successful_fulfillments }}, "gift_cards", return_raw_results=True), "masked_code").replace("•", "").replace(" ", "")

If there are multiple gift cards purchased, the values will be separated by a comma.


Related Articles:


App: EZ Exporter

Tags: advanced features, gift card