Skip to content

Salesforce Salesforce Best Practices

Recommendations for getting reliable results from a Salesforce datastore without straining your org's daily API allowance.

Plan the connection

Give Qualytics its own app and its own Run As user. A dedicated External Client App or Connected App, acting as a user that exists only for Qualytics, makes it clear in Salesforce's own logs and API usage reports which requests came from Qualytics. Changing its secret or its access then affects nothing else. A shared integration user mixes Qualytics' usage with other tools', and losing that user's access breaks both. See Authentication.

Grant read access through one permission set. Give the Run As user API Enabled, read access on each object you monitor, and read access on their fields, all in a single permission set. A field the user cannot read is silently left out of the container, so access granted piecemeal tends to leave gaps nobody notices. See Permissions.

Use the My Domain URL, and connect sandboxes separately. Client credentials sessions are issued only on My Domain URLs. A sandbox has its own URL and its own app, so give it its own connection and datastore rather than editing the production one.


Choose what to read

Set Objects to the objects you monitor. With Objects empty, a Sync lists every eligible object, which in a large org can mean hundreds of containers. Each one spends API requests at every Sync and every scan that includes it, and adds containers nobody checks. Naming the objects keeps the inventory focused and the API usage proportionate to what you monitor.

Run a Sync after changing fields or access in Salesforce. A container's fields are read at Sync. A field your admin adds, or one the Run As user gains access to, is not profiled or checked until a Sync picks it up.


Keep API usage low

Prefer incremental scans. An incremental scan reads only the records changed since the previous scan, on SystemModstamp. A full scan of the same objects reads every record and costs many times more requests. Keep full scans for occasions that need them, such as after a data migration.

Estimate before a large full scan or profile. On the Read Settings step of the Scan Operation or Profile Operation dialog, click Estimate API usage to see what the operation would spend against what your org has left today. An operation that runs out of allowance partway fails, and the requests it already spent are gone. See API Usage.

Keep Maximum Parallel Jobs at the default. The default of 4 suits most orgs. Raise it only when reads of large objects are slow and your org has spare Bulk API query jobs, since each extra job counts against the daily Bulk API allowance other integrations share. Lower it if scans fail because too many query jobs are running at once.

Schedule heavy scans for quiet hours. The daily allowances are rolling 24-hour windows shared with every integration. Running large scans when other integrations are idle leaves headroom for both.

Filter scans where you can. Filters are passed to Salesforce wherever it can apply them, so a filtered scan reads fewer records and fewer pages of results.


See Also