+ Start a Discussion
Dan RobinsonDan Robinson 

Need to make 2.8 million API requests? What is the optimal way to achieve this?

I am attempting to upload 1.4 million contacts/leads. I need to use the api to determine if they belong to an active account before determining if they are a lead or contact. Once that is complete, I would like to add them to salesforce as the appropriate object type,  which would require an additional call per record. What is the best way to achieve this?
JLA.ovhJLA.ovh
Don't process record per record. Do this bulk, reading multiple records at a time and writing multiple together. This will reduce the quantity of api calls, pushing the limits and making everything faster.
buyan thyagarajanbuyan thyagarajan
HI Dan,
 I would advise the following approach so that you are not dinged on the governor limits. Here is what you do.
1. Download all the accounts to an external database and do a matching on your 1.4 million leads and determine if they are lead or contact.
2. Once you have matched them internally, you can create 2 files one file for leads, one file for contacts  Do an upsert with lead and contact using an external id and use bulk loading option.
This would help you to get done quickly rather than bogged down by governor limits. Please feel free to email me at buyan@eigenx.com if you need any questions..
Just curious. How would you determine if the account is active and how would you know if it is a lead or contact?
Buyan