Skip to main content

Hi everyone,

We’re using unique discount codes that are automatically applied at checkout when someone signs up through our form.

However, if the customer leaves the page, the code disappears — so we want to automatically include that same unique code in the welcome email they receive, so they can access it later.

Is there a way to automatically pull the same unique code shown at checkout into the email?

Would really appreciate any advice or guidance from anyone who’s figured this out!

Thanks so much!

Welcome to the community ​@LuxeHomesDirect 

I'll assume you're on Shopify; using a Klaviyo form; generating the unique codes in Klaviyo.

When a unique discount code is assigned by Klaviyo to a profile - whether that's via a form or within a campaign or flow message - that unique discount code is tied to only that specific profile.

As an example, say your unique coupon name in Klaviyo is called WELCOME25 and I sign up on your form. I get assigned my unique discount code of  WELCOME_XGHTSAK

If you then send me a welcome flow email that contains the placeholder snippet: 

{% coupon_code 'WELCOME25' %} 

I will  receive my unique code WELCOME_XGHTSAK where the placeholder is. That is true wherever you include {% coupon_code 'WELCOME25' %}, I will always receive WELCOME_XGHTSAK.

Hope that helps but, if not, let me know

Regards

Andy
 


It worked! Thank you so much for your help, Andy!


No problem ​@LuxeHomesDirect Happy to help.

Regards

Andy