Skip to main content

I’m using the new flows and trying to set up a flow that triggers a coupon code to be sent (already created within Klaviyo under the Shopify coupon tab) after a customer subscribes to a newsletter.  The flow works without including the coupon code, so the flow is fine.  I follow the instructions to insert a text block in the email within the flow to include {% coupon_code 'NAME_OF_YOUR_COUPON' %} with the name of the coupon there, and the flow won’t allow a test email to be sent because of invalid syntax. 

Is there a different way to insert the Klaviyo Shopify coupon code into an email flow? This coupon is not used in any campaign.

Thanks

Hey @alk123 

Thanks for asking the community for help with your coupon.

It looks like you are using the right syntax example. Can you share the exact syntax you are using that is getting the error? Also a screenshot of the coupon name from your coupon tab would be helpful to see if there is an error is how it’s being written.


Thanks for your response.  See the attached below.

 


Hi @alk123,

 

Thank you! 

 

I would try using this exact code from our documentation and copying your coupon code name into this. I have a feeling that the brackets around the name of the coupon in your screenshot might be the culprit. 

{% coupon_code 'NAME_OF_YOUR_COUPON' %}

 

-Taylor


Hi Taylor,

Thanks for that suggestion.  It looks like it worked as I did it, with the single quotes around the name of the coupon. I’m not sure why it initially didn’t work or take, and maybe it needed some set up time in the system, but after testing it did send out the coupons properly and they worked in the system.


Reply