Hi there. We use a flow to send transactional order confirmation emails triggered by a “Placed Order” event. All good. Works perfectly. However, we regularly need to resend these emails because:
- a customer mistakenly deleted or somehow missed the email
- a customer mistyped their email address or wants a copy sent to their work address etc.
I would like to handle both cases using the “Render & Send” endpoint of the API but have run into a few problems.
- we needed to copy the flow template into the template library because flow templates aren’t available using the API. but we will forever more have to remember to keep the two in sync, which is not ideal. is there a better way?
- if the email address is different from the original, then we need to create a new Klaviyo profile and merge them. it would be nice to be able to simply edit the email address, but i understand the privacy implications of this probably make this a non-starter.
- no matter what we do, the “context” param in the render API call simply doesn’t replace the variables in the html that is returned. even the basic example provided in the docs won’t do the ticket. it seems extremely simple, but i don’t know where we might be going wrong.
- when trying to use the render & send (not just render) a 401 “Your account must be verified to perform this request” is returned. but we have already been verified. we could just use the render (if we could get it working) and send the resulting html using our own email relay, but the hope is that by using the Klaviyo api, the send would get logged to the user’s profile.
BTW, all testing has been done using the Klaviyo Postman collection which is an incredible resource. So fat-fingered typos are greatly reduced. I love it!
Any help would be appreciated.
Best answer by jpkmg
David, thanks for the suggestion but unfortunately that won’t solve the exact problems we’re having.
It’s simply too difficult for us to have customer service log in to Klaviyo and find the correct resend link. The flow history doesn’t have a search which would mean having to click through pages of results to find the right one. It just doesn’t scale.
And in the case where the customer entered an incorrect email address, there is no suitable workflow using the Klaviyo admin.
What we ended up doing was simply using the Render Template endpoint to fetch the html. Then we send with a 3rd-party email relay. It does the trick and can be accomplished with 1-click. Additionally we are working on updating the customer’s email in their profile within the same procedure.