I’m the CTO of a software that allow customers to download loyalty cards (via apple and google native wallet application) and I try to create a custom integration with klaviyo.
One of the scenario is to send an email to customers that don’t have their loyalty card installed. This email will contains a customized secured link to let them download their loyalty card. The link is unique for each customer, it contains a JWT token to guarantee that only the recipient of the email can download the loyalty card.
From what I understand, there is no way to compute JWT token (nor hmac) while we send an email. The only solution I found is to add a custom property for each profile.
How can I sync this custom property with an external system ?
The only solution I found is the following :
- Create a segment with profile without the custom property
- For new profiles :
- Create a flow that is triggered from this segment
- Send a webhook to our API
- call the Klaviyo update profile API ( https://developers.klaviyo.com/en/reference/update_profile )
- Create a flow that is triggered from this segment
- For initial setup
- From our application : download all profiles from the segment
- use Klaviyo segment API https://developers.klaviyo.com/en/reference/get_segment_profiles
- I acknowledge that this API is limited to 150 call/ minutes with 100 profiles per call (15 000 profiles / minutes). We have existing customer that already have 500k customers on their database. It results in +30 min operation and the implementation is not straightforward
- Generate a CSV with custom property from this list
- MANUALLY upload the CSV to klaviyo
- From our application : download all profiles from the segment
- For new profiles :
Is there any other solution ?
This solution require each of our customer to do plenty of operation with klaviyo
- Configure a new segment
- Configure a new flow
- Configure the webhook (which require 2FA)
- Manually upload a CSV for initial import
Are they any API to automate these tasks ?
It looks like other software editor already sync data https://help.klaviyo.com/hc/en-us/articles/115005253208-How-often-integrations-sync-reference but I can’t find how to make the same things. Is there any documentation on how to create a similar integration ?