How to Create a Detailed Salesforce API Usage Report and Manage your API Calls
Share on:

There is nothing more aggravating than hitting your Salesforce API usage limit.

Your company grinds to a halt. Apps stop talking to each other. Data is blocked from being added to your CRM. Maybe certain pieces of your sales software stack stop working altogether.

Then you’re forced to buy more and increase your API limit, just to keep the wheels turning. Or sit around and wait for the 24-hour window to expire, losing valuable time and tanking your productivity — who wants to deal with that?

For many organizations — and especially those who use a lot of apps that make many API calls — this can be a huge source of aggravation.

So naturally, you’ll try to take steps to monitor and manage API calls. You have to. The cost of hitting that ceiling is just too much for any company to stomach.

Now you have to estimate (often this means taking wild guesses) at which apps and integrations are using the most API calls. Then, you can remove the integration and cut back on Salesforce API usage.

Unfortunately there is no easy way to determine what apps and integrations are costing you, in terms of Salesforce API allocation. These are critical components in your business. You want to make a data-driven, informed choice here.

Any app on the Salesforce AppExchange is going to make API calls. After installing an app , it could run through tens of thousands of API calls in minutes without you knowing, and therefore you need the ability to review API usage by each app.

There is a way to generate a Salesforce API usage report with a full app-by-app breakdown of your API usage. It’s not the simplest solution, but following this guide we'll show you how to accomplish that.

Make smarter, data-driven decisions about your Salesforce API usage and management.

  1. API Usage within the Last 24 Hours
  2. API Usage within the Last 7 Days
  3. Detailed App-By-App Breakdown of Salesforce API Usage Report
  4. API Limits by Plan
  5. How Insycle Helps you Manage and Monitor API Usage
  6. Improve Your Salesforce API Usage with Detailed Reporting

Salesforce API Usage Overview Reports

Salesforce make some API usage reports available through its main reporting system.

Salesforce API Usage within The Last 24 Hours 

In Salesforce Lightning, navigate to Setup -> System Overview for a quick snapshot of API requests made in the last 24 hours.

How to Create a Salesforce API Usage Report and Manage your API Calls-2

Salesforce API Usage within The Last 7 Days

For this report you'd need to switch to Salesforce Classic mode as it is not available in Lightning at the moment.

Navigate to Reports -> Administrative Reports. Find the “API Usage in the Last 7 Days” report.

This report shows the API usage by users for the last 7-days, including the current day.

These reports represent a good start and provide a way to monitor overall usage, but they don’t really provide the full breakdown that you need to make smart business decisions.

salesforce api usage report last 7 days

Detailed App-By-App Breakdown of Salesforce API Usage Report

Salesforce does not offer a standard, out-of-the-box report that allows you to see an app-by-app breakdown of your Salesforce API usage.

But, there is a workaround and it’s not too difficult. The benefits of being able to see this kind of breakdown vastly outweigh the alternatives.

To do this, we’ll use event logging data. You’ll need access to Salesforce Workbench.

1. Log into Salesforce Workbench:

Here is the Workbench login URL: https://workbench.developerforce.com/login.php

2. Navigate to Queries -> SOQL Query

This is where we will query the event logging data on a per-app basis.

workbench-screenshot-1-1

 

3. Run A Query

Now we are going to ask Workbench to pull data about API usage on a per-app basis.

In the Object dropdown select "EventLogFile" and then paste the query below into the "Enter or modify a SOQL query below:" text area. No need to select or change anything else in this screen.

SELECT ApiVersion,CreatedById,CreatedDate,EventType,Id,IsDeleted,LastModifiedById,LastModifiedDate,LogDate,LogFile,LogFileContentType,LogFileFieldNames,LogFileFieldTypes,LogFileLength,SystemModstamp FROM EventLogFile

workbench-screenshot-2-2

 

4. Scroll right to the "LogFile" column, double-click on the very long string to copy it to the clipboard.

5. Paste that String into Base64 Decoder, and click “Decode.”

Paste the long string into your Base64 Decoder. Code Beauty is an excellent and free web-based Base64 decoder.

Once you click “Decode,” the app will translate the string into a standard plain-text CSV format. Copy and paste the CSV into a file log.csv

decode-base-64

 

5. Open log.csv in Excel or similar, look at the last column named “SOURCE_IP.”

The “SOURCE_IP” column tells you the IP of the app that made the API call. Once you connect your IPs to apps, you have a full breakdown of which apps and integrations made what API calls and when.

Using that data, you can create all sorts of reports to analyze and manage your API data. For instance, you could aggregate and analyze your Salesforce API calls by date, time, and IP.

Salesforce API Limits By Plan

Learn more about Salesforce Salesforce API limits and allocations. When needed you can use Salesforce Checkout to buy additional APIs online.

How Insycle Helps you Manage and Monitor API Usage

Insycle is a customer data management tool for Salesforce. Using Insycle, you can deduplicate contacts, accounts, and leads, and then cleanse and standardize your Salesforce CRM data. It can also help you solve common problems with Salesforce and HubSpot integration, import from CSVs, and make routine bulk updates.

Insycle delivers deep API monitoring for any app that is connected to the platform.

Control API Usage Globally and Per-App

Insycle features two options for managing API usage in real-time with these controls:

  • Quota. Allocate a number of API calls for Insycle. Once the quota is reached, Insycle will stop utilizing Salesforce APIs for the 24 hour window.
  • Watermark. An additional safety net to help you avoid running out of APIs. Insycle will stop utilizing Salesforce APIs when the watermark is reached, even if the Insycle quota has not been used in full. For example, if other apps already consumed 95% of your APIs and the watermark is at 5%, Insycle will not make any API calls even if it hasn’t made any API call that day.

Audit API Calls

Insycle automatically meters and logs all API calls made through the system providing a complete audit trail so that you can see what calls happened, when they happened, and why they happened.

Monitor API Usage By App

Insycle shows a breakdown of API call usage for all apps connected to your Insycle account.

The “API Usage” screen shows you real-time API usage data across all of your apps. Data shown includes:

  • API calls used. The number of API calls consumed by Insycle that day.
  • Quota. The number of API calls allocated to Insycle in your API call settings.
  • Watermark . The minimal number of APIs that need to be available (so that other apps can continue making Salesforce API calls). If your remaining API calls are below that value, Insycle will pause and stop consuming API calls.
  • Overall API Calls Used . The number of Salesforce API calls used across all of your Salesforce-integrated apps, including Insycle. A great way to monitor overall API usage.
  • Overall Quota . The number of API calls that you have available for all apps within your organization in Salesforce. You can buy more API calls to increase this number. 
api-usage-screenshot

Improve Your Salesforce API Usage With Detailed Reporting

Monitoring and managing your Salesforce API usage across all of your apps is critical. You have to make sure that your most critical apps and integrations continue running at all times, or you risk big losses.

Using this simple guide, combined with Insycle’s advanced API management features, you can gain a top-down view of your Salesforce API usage and save yourself from API-related shutdowns.

If you’d like to improve your Salesforce data management, you can try Insycle on a 7-day trial by filling out the form below.

Share on:

Recent Posts