Improve Scalability of Salesforce User Sync (Delta Processing & Filtering Support)
Background
When Activity Timeline Job Runs, GainSight runs the following query on the Salesforce side:
SELECT Id, SmallPhotoUrl FROM User
This query is used to retrieve Owner/User information required for logging timeline activities. At present:
- No filters are applied
- All user records are retrieved
-
The system validates existence of respective owner/user records
While functionally correct, this approach presents scalability and performance concerns for customers with a large number of Salesforce users.
Problem Statement
Fetching all User records without filters is not scalable for large Salesforce orgs. It can impact performance and increase API consumption unnecessarily when only incremental changes are required.
Proposed Enhancements
-
Support delta processing (e.g., based on
LastModifiedDate) -
Allow configurable filtering (e.g., active users only)
-
Introduce basic caching to avoid full reloads
Business Impact
-
Improved performance and scalability
-
Reduced Salesforce API usage