|Salesforce Status Page
|Default Historical Sync
|Default Replication Frequency
Connecting your Salesforce data to Stitch a six-step process:
- Whitelist Stitch’s IP Addresses
- Add Salesforce as a Stitch data source
- Define the Historical Sync
- Define the Replication Frequency
- Authorize Stitch to access Salesforce
- Select tables and columns to sync
* Completing this step may not be necessary depending on how your Salesforce instance is configured.
Before you begin setting up your Salesforce integration, you’ll need to complete the following:
- Verify your Domain type. Currently, only Production domains can be connected to Stitch. If you’re interested in connecting a Sandbox domain, please reach out to support with your use case to file a feature request.
- Verify your object access. Stitch will only be able to access and replicate the objects that the user setting up the integration has access to. Before beginning, we recommend verifying that you have access to everything you want to replicate.
Verify your API access. To use Stitch’s Salesforce integration, your Salesforce account must have API access enabled. Some editions of Salesforce have API access enabled by default while others don’t:
- Enterprise, Unlimited, Developer: If you’re using one of these editions, API access should be enabled by default.
- Performance, Group, Professional, Contact: If you’re using one of these editions, refer to Salesforce’s documentation for guidance in determining if API access can be added to your Salesforce instance. Reach out to Salesforce Support if you need help enabling API access.
Whitelisting Stitch’s IP Addresses
Depending on how your Salesforce instance is set up, you may need to whitelist Stitch’s IP addresses. In Salesforce, this is referred to as “setting trusted IPs”.
The instructions in this Salesforce article will walk you through how to do this in Salesforce; below are all the Stitch IP addresses that must be added to the trusted list:
Complete this step before proceeding with the rest of the setup, or you may encounter connection issues.
Add Salesforce as a Stitch Data Source
- On the Stitch Dashboard page, click the Add an Integration button.
Click the Salesforce icon.
Enter a name for the integration. This is the name that will display on the for the integration; it’ll also be used to create the schema in your data warehouse.
For example, the name “Stitch Salesforce” would create a schema called
stitch_salesforcein the data warehouse. This schema is where all the tables for this integration will be stored.
Defining the Historical Sync
The Sync Historical Data setting will define the starting date for your Salesforce integration. This means that data equal to or newer than this date will be replicated to your data warehouse.
Change this setting if you want to sync data beyond Salesforce’s default setting of 1 year. For a detailed look at historical syncs, check out the Syncing Historical SaaS Data article.
Define the Replication Frequency
The Replication Frequency controls how often Stitch will attempt to replicate data from your Salesforce integration. By default the frequency is set to 30 minutes, but you can change it to better suit your needs.
Before setting the Replication Frequency, note that:
- The more often Salesforce is set to replicate, the higher the number of replicated rows.
The number of rows in the source may not equal the number of rows replicated by Stitch. Tables that use Full Table Replication will result in a higher number of replicated rows.
Salesforce’s API enforces usage limits. Higher Replication Frequencies may exceed these limits and impact Stitch’s ability to replicate data. See the Replication section below for more details.
- If you’re using a data warehouses that doesn’t natively support nested structures, you’ll see a higher number of replicated rows due to the de-nesting Stitch performs.
To help prevent overages, we recommend setting the Replication Frequency to something less frequent - like 6 hours instead of 30 minutes. For tips on reducing your row count, check out the Reducing Your Row Count section of our Billing Guide.
After selecting a Replication Frequency, click Save Integration.
Authorizing Stitch to Access Salesforce
Next, you’ll be directed to Salesforce’s website to complete the setup.
Stitch will only have access to the objects that the user you’re using to connect has permissions to. If an object is restricted to the user, it will be restricted to Stitch as well.
Before beginning the authorization process, verify that user completing the process has access to the objects you want to replicate.
- Enter your Salesforce credentials and click Login.
- A screen asking for authorization to Salesforce will display. Note that Stitch will only ever read your data.
- Click Allow.
- After the authorization process successfully completes, you’ll be redirected back to Stitch.
- Click All Done.
Selecting Tables & Columns to Sync
To complete the setup, you’ll need to select tables and columns you want to sync to your data warehouse.
Check out the Schema section to learn more about the available tables in Salesforce.
- In the Integration Details page, click the Tables to Replicate tab.
- Locate a table you want to replicate.
To sync a table, click the checkbox next to the table’s name. A green checkmark means the table is set to sync.
To sync a column, click the checkbox next to the column’s name. A green checkmark means the column is set to sync.
- Repeat this process for all the tables and columns you want to replicate.
Salesforce’s Intial Sync
After you finish setting up Salesforce, you might see its Sync Status show as Pending on either the Stitch Dashboard or in the Integration Details page.
For a new integration, a Pending status indicates that Stitch is in the process of scheduling the initial sync for the integration. This may take some time to complete.
Replicating Salesforce Data
Replication Key Selection
While Stitch generally uses Incremental Replication to replicate data from Salesforce, the Replication Key used to identify new and updated data may vary from object to object.
Stitch’s Salesforce integration dynamically selects a column to use as the Replication Key based on the columns that are available in the object. This means that Stitch will loop over the fields below, in order, and select the first one found to use as the Replication Key:
If none of these fields are found, the object will be replicated using Full Table Replication.
Because this approach may lead to data freshness issues with formula fields due to the nature of how these fields are updated, we recommend implementing these workarounds to prevent discrepancies.
Sync Time & API Quota
Usage of Salesforce’s API is determined by how much API quota you have. An API quota refers to the total number of API requests that can be made in a given period of time.
Due to the volume of data and the daily API quotas imposed by Salesforce, an initial sync of your Salesforce data can take awhile.
- If a single replication attempt uses 20% of your daily quota, replication will stop.
- If more than 80% of your daily quota has been used - this includes usage from Stitch as well as any other apps you may be using - replication will stop and resume once more is available.
Continually hitting these limits can cause an initial sync to take several days. Check out this Salesforce article for more info on calculating and increasing your total API calls.
In Salesforce’s API, “object” is synonymous with “table.” When Stitch replicates data from a Salesforce object, a table for that object will be created in your data warehouse. The “fields” contained in an object are the same as columns in a database table.
Note that tables won’t automatically be created in your data warehouse. You must set tables and columns to sync in the Integration Details page first.
Stitch will replicate the majority of Salesforce objects (with the exception of those listed here). To ensure we can provide you with up-to-date docs, we won’t dive into the specifics of the hundreds of Salesforce objects Stitch can replicate.
Obects Stitch Replicates
Below you’ll find the objects and fields Stitch can replicate, a brief description, and how different table and column types will be named in your data warehouse.
|Standard objects are those that are created by Salesforce and included in your account by default.
|Custom objects are tables created by you that enable you to store info unique to your organization. For detailed info, check out the Custom Objects section in the Object Reference guide.
|Fields are attributes that describe an object. A Standard field is created by Salesforce.
|A Custom field is a field created by you. For detailed info, check out the Custom Fields section in the Object Reference guide.
Objects Stitch DOESN’T Replicate
Stitch will not replicate:
- Objects that the authorizing user doesn’t have permission to access,
- External objects (which are objects created by you to map to data stored outside of your organization), and
- The objects listed in the table below. These objects are unsupported due to the limits required while querying.
Object/Field Names & Collision Errors
In Salesforce, it’s possible to have objects and fields with names that use both upper and lower case. For example:
If the uniqueness of the field name is only in the case - meaning that the only difference between them is upper and lower case characters - you may encounter field collision errors if:
- The data warehouse you’re using is case insensitive AND doesn’t maintain case, and
- There’s more than one field in the table with the same name
You can check out the Destination Comparison Rollup for more info on how your data warehouse implements case sensitivity.
orders table contains two columns:
salesorder. These columns are different only in that one has an upper-case
O and one has a lower-case
If the data warehouse doesn’t maintain the case, these field names will canonicalize - or be converted - into the same name. Because Stitch won’t know where to insert the data if both field names are the same, this will result in a
field collision error.
You can resolve this error by changing the name of the field in Salesforce to something unique.
Did this article help? If you have questions or feedback, please reach out to us.