Hi,
I’m aware that there’s been activity surrounding this issue on WooCommerce, but wondered if it’d been tackled for custom integrations.
tl;dr - in Klaviyo emails, can we get a coupon code dynamically at send time from our own web service, providing a customer ID as an argument?
Many thanks,
Gareth
- o O o -
Detail:
Back ages ago when I handled all emails myself, I had a class that created single-use, customer-locked coupon codes with expiration dates. When I was generating emails, the process would call the class, get a code, and include it in the email.
We’re now looking to incorporate the same logic in a Klaviyo flow. We can do 90% of it just fine - import a list of single use codes as per documentation etc. Problem is we’d like them to expire three days after the email is sent. This means either that when the email is sent it needs to make a call to my server to say ‘please expire GXC34567dfghj in three days time’, or, much simpler, just request a 3-day-lifetime single use customer-locked code direct from my website via a web service call.
The current proposed workaround is to put a URL in the email, ‘go here to get your code’, which sends them to a page which creates a code for them that has an expiry date, but management aren’t happy with this: they want the code direct in the email with no intermediate steps.
I could do this as a dynamic image src, but that’s not copy-pasteable and would be subject to remote content being blocked in emails etc etc.