Add a Client ID (Name) to all API requests to Salesforce for API Usage tracking

Salesforce limits the number of API calls that can be made to an org. It would be nice if the Domo integration included a name as part of their API calls so Salesforce Admins could understand how refresh rates impact API usage.

 

Implementation is done through a CallOptions.client value that can be passed as part of the SOAP call, or as a header in the REST API.  This allows the API usage Last 7 Days report to show usage for Domo vs a rolled up number for the login id (and prevents the need to allocate a VERY EXPENSIVE single purpose user for domo).

 

REST API: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/headers_calloptions.htm

SOAP API: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_header_calloptions.htm

 

0
0 votes

· Last Updated

Comments

  • I agree completely, keeping an eye on SF API call count is a very expensive topic, either from the standpoint of a single purpose user being created for the Domo connectors or from the standpoint of upping a SF subscription to allow more API calls per hour.  In most cases I've seen, the Domo admin is a SF user, so they just use that account for the Domo connection and can identify API usage from there.  Plan B is use an API service account, if the expense is warranted.

     

    If you have multiple users or platforms making SF API calls from the same SF account, here's a way to identify approximately how many of those are coming from Domo (credit to a rockin SF admin I know who worked backward through the numbers to figure this out based on the REST API limitation of 2,000 rows per call)

     

    1. Using the Domostats connector, identify all of your SF powered datasets and their respective row counts (download in csv)
    2. Review their scheduling methods to identify how many times per day each SF dataset runs and put that in the csv (the Domostats doesn't provide a count, it just says "advanced" or "daily", etc)
    3. Calculate approx daily API calls for each dataset using this formula::  CEILING(Dataset Row Count / 2000)  *  count of dataset refreshes per day = API Calls Per Day

     

    Once you go through this, you'll quickly identify which datasets are really getting under the skin of your admins based on quantifying the Domo API calls being made with that account.  Remember since row counts change through the day and the Domostat row count only provides the most recent count, this is only an approximation (but has always been close in my experience).  You round/ceiling up to nearest whole number because if your dataset is pulling 1500 rows, that still counts as 1 API call.

     

    From there you can reduce the frequency of your nastiest datasets, or reduce their row counts via recursive ETL w/ append (whether you base it on Created.Date or Last.Modified.Date would depend on the SF object and the nature of your usage)

This discussion has been closed.