Abandoned Cart - Coupon Link leading to broken page.
I have been working on my abandoned cart flow, and for the final email, I want to give the customer a coupon code for 20% off their order. I have changed the URL on the button to: https://www.scamperandco.com/52837908680/checkouts/{{ event.extra.token }}?discount={% coupon_code 'ABANDONCART20' %}, but that leads to the following error:
Any idea what I am doing wrong?
Page 1 / 1
Hello @amanns1901,
Welcome to the Klaviyo Community!
In my experience, this sort of behavior is commonly caused by any of the following reasons:
Misspelled your dynamic coupon code
There is an integration issue preventing the coupon from being generated
Testing the hyperlink through a preview email instead of a live email
To alleviate this issue, I would suggest double checking to make sure the dynamic hyperlink built is correct. If you’ve done any copy and pasting, it’s recommended that you paste without formatting to ensure any additional formatting isn’t leaking over.
When Klaviyo generates coupons, we leverage the ecommerce’s own coupon API. This means that if there were any integration errors occurring, this could potentially impact the ability to generate those codes through your ecommerce store’s backend.
Lastly, because we’re working with a unique coupon code in a flow, codes would only be generated at the time of send in a live email. For this reason, if you were still in the testing phase and previewing the email through Klaviyo or sending yourself preview emails, it’s expected that the coupon/link would not work since no coupon codes has been generated and issued. Since you’re missing a part of the dynamic URL, hence why you’re being led to a broken URL page.
You can also check out some of our past Community posts on this topic that has proved helpful to others:
I hope this helps!
David
is there an easy way to set up a flow that would only send emails to me so I can test it? I did one with a list sign up trigger, but that gave me an error too. Can I force a Checkout Started trigger somehow?
Hey @amanns1901,
If your integration is working correctly, you should be able to trigger your own Checkout Started by going through as a purchaser and abandoning the checkout process.
I already see what's happening. It's not the discount code but the unique url that's not configured correctly. If I remove the whole part after and including ?discount= I still get the same error.
So please review and make sure you're using the following variable to bring people back to their checkout
Hmmm, that just seems to lead me back to my home page. When I check the cart, the discount is not applied.
Can you share the output of the data that's in the {{ event.extra.checkout_url }} variable?
What is the best way I can go about doing that?
The easiest way would be to:
go to the klaviyo homescreen
click on activity feed
click on checkout started
This will bring up all the checkout started events
click on the timestamp on the right for one of the records
This will bring up the activity detail and in that list there is the extra: checkout_url
Please copy the contents there (whole string) and paste it in a incognito browser window and see what happens. Is this bringing you to a checkout page with contents?
Make sure you're using a checkout URL of someone that did not place an order yet.
If that works - add the discount part to it and check it again.