Hi @JMD , you’re definitely on the right track! If you’re just looking to send Profile Properties to Klaviyo, you should use the identify endpoint. Any timestamped action (like when somebody places an order or starts a checkout) would be what the track endpoint is for.
Since Klaviyo has a schema-less database (noSQL), you don’t have to pre-define the custom properties inside Klaviyo before you send those API requests. So you could start right away by sending your CRM data to Klaviyo via the identify endpoint as soon as you’d like. An example payload might look like this:
{
"token": "ABC123",
"properties": {
"$email": "connor.test@klaviyo.com",
"$first_name": "Connor",
"$last_name": "B",
"Total Number of Purchases": 3,
"Loyalty Points": 200,
"Language Preference": "EN"
}
}
The identify endpoint was designed for very high throughput and low latency, and is an asynchronous endpoint. Because of this, we don’t have a way to bulk-upload this data, but you can essentially make API requests as fast as you’d like and you will almost certainly not hit any rate limits.
Hi @cbarley,
That’s great, thanks very much for confirming and going through the effort of sending the examples, I had got a bit confused around the different property types but it seems there are properties, customer as defined by Klaviyo, then custom as defined by you.
I’ve read a little about the responses indicating whether the request is valid but not going so far as to tell you that it’s been processed. Is there a place to pull status or errors at all? Or will it be a case of comparing segments on our end against those that we have pulled back out of Klaviyo to compare?
Thanks!
Hey @JMD , yeah exactly - we have properties that Klaviyo auto-populates under certain circumstances like location based off of our cookie placed on your website (if somebody has done some activity on your site to become known), as well as a “How They Last Found You” section which will tell you how a person last landed on your website. And then we have everything else that you can decide to send to Klaviyo that will show up under the “Custom Properties” section. Those fields can be anything (string, number, array, object, boolean, etc.). Harkening back to the noSQL data schema, we will also interpret the data type for you.
As for the responses, we only return a 1 (if successful) or 0 (if the request fails) and we don’t have a place to pull statuses at this point. What we would recommend is that if you do receive a 0 back from any API call (this is almost always due to improper JSON formatting or encoding), that you save those requests and attempt to retry them. But generally, yes you’ll want to just check both locations to see if they match