Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

Using Identify Profile API #7

Open
kidzzz opened this issue May 23, 2022 · 4 comments
Open

Using Identify Profile API #7

kidzzz opened this issue May 23, 2022 · 4 comments

Comments

@kidzzz
Copy link

kidzzz commented May 23, 2022

Hello,

I am able to use the Identify Profile API to create profiles. But it can only create one at a time. How do I batch import data from our system?

Perhaps what would be the best way to do this on a regular basis?

Thanks,

@kidzzz kidzzz changed the title Possible bug in TrackIdentifyApi Using Identify Profile API May 23, 2022
@jon-batscha
Copy link
Collaborator

Great question!

We do not currently support batch Identify operations, though it is on our roadmap.

That said, there is a nice solution for you: the PHP pthread library, and pooling in particular.

This will allow you to send Identify requests N times faster, where N is your # of threads. I recommend setting the rate limit on your end to 350 requests/second.

The reason this works is that these endpoints have a higher rate limit than you could hit with a single thread, because there is naturally some ping time between requests. By parallelizing your requests, you can approach our rate limit (~350/second).

Hopefully this helps! If you have any further questions, feel free to reach out, we greatly appreciate any and all feedback towards improving our developer experience.

@kidzzz
Copy link
Author

kidzzz commented Jun 26, 2022

Hi there,
Thank you for the response. I have a follow up question: Since the API call appears to be async'ed and only returns 0/1, what would be the best way for me to retrieve and the profile ID after the profile is created, to store on my local database?

Thanks.

@jon-batscha
Copy link
Collaborator

Currently, the best way to do this is to make a request to the getProfileId endpoint, with which you can retrieve a profile ID given an identifier (email/phone_number/external_id).

You do however bring up a great point that our API should be returning that data from the get-go. With that in mind, I am happy to share that we are pretty far along in developing our new and improved API, which resolves this issue among its many other improvements.

This upcoming API is currently in closed Alpha, but if you are interested in learning more, feel free to connect with our team here: [email protected] . You can also sign up for our developer newsletter in the footer of our developer site: developers.klaviyo.com .

And do please reach out with any additional questions or suggestions. The quality of our APIs and SDKs is a core focus for us, and your feedback is a key component of that. Cheers!

@kidzzz
Copy link
Author

kidzzz commented Jun 27, 2022

Hi Jon,

Thank you for the instructions and more!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants