Skip to main content

I’d like to use variable syntax in a flow email to communicate how many orders a customer has placed with us during a certain time period. (“Congratulations! You’ve placed X orders with us since DATE.”) I’m having a difficult time figuring out A) if this is possible; and 😎 which variables to use.

Any ideas? Or if you know of another way to do this other than variable syntax, I’m all ears.

Hi @CKeast 

Thank you for posting your question in the community! 

This is a question that I have seen come up more often recently, but unfortunately, there is not straightforward way to insert the number of orders a customer has placed within the body of the email without creating a custom profile property. 

Once you have the custom profile property created and populated with the value of orders, then you can simply pull that embed that custom profile property into the email.

The challenge is getting that value populated. As of right now (and I’ve had some discussions with Klaviyo’s team about this prior), you could create some flows that update a profile property when an order is placed. You’d have to create multiple flows to update the property based on the number of orders a customer as placed. For example:

Flow 1:

Trigger: Placed Order = 1 over all time - Update Property Step - Set “Number of Orders” to 1

Flow 2:

Trigger: Placed Order = 2 over all time - Update Property Step - Set “Number of Orders” to 2

Flow 3:

Trigger: Placed Order = 3 over all time - Update Property Step - Set “Number of Orders” to 3

Etc.

Then, in your email, you would use the “Number of Orders” property to dynamically show the value that was saved. 

I’ve asked for a way to use their tags to dynamically show orders based on the event data saved to a profile, but this functionality is not yet available.

I hope this helps!

@In the Inbox 


Reply