Skip to main content
Solved

Can I check with web's database before send email?


Forum|alt.badge.img

Scenario is:
I have generate orderCode in my side. Now I have popup that user can submit their email and order code. Then Klaviyo will send email to recipients. 
 
Question:
How to check with database that orderCode is correct? In case someone have submit wrong code, Klaviyo won’t send email to.

Noted: orderCode storaged in database of website, not in Klaviyo. Klaviyo just storaged orderCode that recipient submitted.

Best answer by cdetdi

It sounds like you need to check the input with your INTERNAL database, not Klaviyo’s records.  If you are trying to check with Klaviyo you can do a GetEvent call with your parameters to see if there is a record with that ID.

https://developers.klaviyo.com/en/reference/get_event

View original
Did this topic or the replies in the thread help you find an answer to your question?

5 replies

Forum|alt.badge.img+5
  • Problem Solver III
  • 58 replies
  • June 6, 2024

You could use the Klaviyo API to set the order ID from your system as a custom property in the Klaviyo profile. The /identify endpoint was used for this, but the new API probably has a different endpoint for it.


Forum|alt.badge.img
  • Author
  • Contributor II
  • 4 replies
  • June 6, 2024

Hi @dartacus ,
Thank for answer, I thinking about this. But, User can have many orderID. How to storaged all orderID to doublecheck?


Forum|alt.badge.img+5
  • Problem Solver III
  • 58 replies
  • June 6, 2024

Klaviyo data storage has an array type which you can use, but personally I just store people’s most recent order ID.

Also, don’t forget that the Klaviyo ‘Placed Order’ event will probably contain your order ID. Here’s an example from my own site:

 


Forum|alt.badge.img+6
  • Problem Solver III
  • 38 replies
  • Answer
  • June 6, 2024

It sounds like you need to check the input with your INTERNAL database, not Klaviyo’s records.  If you are trying to check with Klaviyo you can do a GetEvent call with your parameters to see if there is a record with that ID.

https://developers.klaviyo.com/en/reference/get_event


Forum|alt.badge.img
  • Author
  • Contributor II
  • 4 replies
  • June 10, 2024

Hi @cdetdi ,

But soon after user submitted, they will receive email from Klaviyo because engage a list. How can I double check in same time to prevent if they submitted wrong code?