Skip to main content

Hi,

I’m trying to setup a custom flow where we can email the customer once their order has been refunded.  We have integration setup with Magento2 and other flows work properly at this time.

What event tag to use that will pull the refund confirmation # from Magento?  I can’t figure this out in Klaviyo.  

 

Thank you,

Hi @MikeH,

 

You have the ability to pull properties directly from the triggering event (refunded order). In order to identify which properties you can include on a flow template, you will need to maneuver to the template editor view within the flow (click the email card in the flow > click edit > click edit content). Once you are on the editor page, you will want to click the preview button with the eyeball icon. From here, you will see the 10 most recent refunded order events. You can scroll through the payload of data associated with one of these refunded order events to locate the refunded confirmation number. I often use the ‘command f’ shortcut and search based on key words rather than combing through each event property. Once you locate the correct event property, you will click on it which will then display the syntax that you’ll need to copy and paste onto the email template to have the property display.

 

Here is our help center article that provides more visuals and step by step on how to use event variables to personalize flows. Also, if you haven’t already, it may be worth checking the flows library within your account to see if there is already a prebuilt Magento 2 refunded order flow template that may already have this data pre-populated.

 

Best,

Julie


Hi Julie,

I’ve set it by going through the resources on Klaviyo.com.  I’m sort of stuck at the point where we want to show the Payment Method the client used.  The website allows for a few different methods of payment, but in Klaviyo there are about 14 different options. 0-13, most of them are blank. How do we know which field is for what purpose? 

For example, I want to show the payment type the customer used to pay: (credit card, paypal, amazon pay).  Do all of these populate in the {{ event.Extra.Payment.Method }}. 

Some transactions have data in option 13 of “extra.payment” fields but other transactions done. So if we put all of these options in there, most will show up as “Undefined” on the email.  How do we know which field is for what purpose and how can we dynamically pull information from these fields ONLY if there’s data to be shown?  


Hi @MikeH,

Thank you for your follow-up note and thank you @julie.accardo for your input.

Yes. All of the payment methods you described will populate if you use the following tag:

{{ event.Extra.Payment.Method }}

In the case that the field doesn’t exist at all, in order to avoid showing “undefined”, you will need to set up a conditional statement

{% if event.Extra.Payment.Method %} ​Payment method: {{ event.Extra.Payment.Method }} {% endif %}

Thanks and have a great day.


Hi Dov.

Thanks for the reply. So this conditional statement would replace the event.extra.payment.method I have now?

 


Hi @MikeH,

Yes, that is correct!


Reply