function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
aezellaezell 

Accessing the API

We are looking at doing some integration here and are anticipating an issue with API access. Here's the setup: Each of our clients is a Salesforce user, they provide our system with their credentials and we sync some data between our system and theirs.

Here's the potential issue: Even if we are batching these updates, we are still potentially logging in and out of the API for each client. So, if a batch of records is 100 updates, but it's 10 updates for 10 different clients, then we would be logging in and out of the API 10 times.

Is there anyway to avoid this? Can a Salesforce user grant our system access somehow, so that our system could make a single connection and update several Salesforce accounts?

Maybe this whole design is wrong. I am open to ideas. :)
SteveBowerSteveBower

Are they different *users* within the same organization, or different organizations.

If it's different users, but one organization, you could always log in once, get the user id's for the various users, set the ownership of the records you're going to create, and create them all during that one session. 

However, if you're serving different organizations then you're stuck with logging in for each one.  There's no way to cross organizational boundaries.

Bear in mind however, do you really care?  The burden to you to log in and out is pretty trivial.  You might be able to architect your code in a "one thread per organization" fashion to minimize code changes.   While logging in and out again may not be the most efficient, most of the cost is on Salesforce's side.

Best, Steve.

aezellaezell
Thanks for the reply, Steve.

They would be different organizations, so it looks like I am stuck. I understand that must of the login/logout cost is on Salesforce's side, but I'd like to be as nice of a user as possible.

But, if it's not possible, then, it's not possible.

Thanks again.