API Limit Background
To ensure service levels and quality, Salesforce.com (SFDC) restricts the number of API calls made to their services.
For Salesforce Professional and Enterprise, each organization receives a total of 1,000 API calls per User in a 24 hour period, up to a maximum of 5,000,000 API calls.
Salesforce Unlimited has a 5,000 API call per User limit, up to a maximum of unlimited API calls.
Example: If your organization using Professional edition has 50 Users, SFDC allows the organization to make 50,000 API calls per 24 hr period. When an organization exceeds a limit, applications that access the APIs will be temporarily blocked from connecting to Salesforce. This will not have an impact on users accessing Salesforce.com in their browser.
You can review the limits in place here: Salesforce.com API Limit and Usage Metering
Deployment Considerations
Riva implements as many SFDC recommendations as possible to minimize the number of API call made. However, as Riva is a synchronization engine, the number of API calls expected to be used can be high - depending on the sync policy configuration. During each synchronization poll, a number of API calls will be made. At minimum, three API calls per enabled module per poll.
Example: For a single user with a 10-minute peak poll interval, peak being from 8:00 AM to 4:00 PM for a total of 8 hours (480 minutes), a total of 48 synchronizations would occur. At a minimum of 3 API calls per module, including Contacts, Tasks, Events, there is a total of 10 API calls per sync. The synchronization of this account account would use 480 API calls during peak hours - well below the 1,000 API call limit.
When changes are detected during a regular polling cycle, by default, up to 500 changes are retrieved at once. This upper limit is configurable for up to a maximum of 2,000 changes. If more changes than the limit are detected, additional API calls will be required to retrieve the remaining changes.
By understanding the way API calls are limited by SFDC, a combination of different policies can be created to provide the level of synchronization needed.
The API limitation may create a problem is during the first initialization if a large number of contacts, calendar events, opportunities, etc. are being synchronized. It is important not to enable ALL users at once if a large number of items are being synched in order not to run out of API calls. If you do exceed your API daily limit, Riva will pick up where it was prior to the limit being reached.
It is a best practice during your testing to enable a single user and monitor the API usage. Using the number of API calls made by that user as an API count base, you can calculate how many users you can enable at once. The number of API requests made during the initialization depends on the number of modules that were enabled and the number of items in each module that are being synchronized from Salesforce to Exchange.
Once you have your policy synchronizing daily, the number of API calls will be significantly fewer than during the initial synchronization.
Note: If there are multiple applications making use of the SFDC WebService / APEX API, the API count usage is not per application, but organization wide. In some situations, it may be desirable to purchase additional SFDC accounts to increase the daily API limit to a level needed for your services.
Resolution
There following strategies help reduce the number of API calls made:
- Reduce the historical initialization date in the policy to fewer in the past;
- Decrease the synchronization intervals. By changing the synchronization policy from polling every 5 minutes to every 10 minutes, the number of API calls made will be reduced by 50%.
- Increase the Blackout Period during which Riva will not communicate with Salesforce.
If you receive a REQUEST_LIMIT_EXCEEDED or "TotalRequests Limit exceeded" error,
- Stop the Riva CRM Service, wait 4-8 hours for the number of API used to go back down.
- Edit the sync policy and increase the sync interval on your policies.
- Start the Riva CRM Service. Continue to monitor the API count in SFDC.
Riva 2.4.25+ now includes and App.Setting that permits assigning a higher value for the Riva query retrieve limit per API call.