Salesforce Data-Out FAQ
PremiumThis feature is available on our Premium and Enterprise plans. UpdatedSalesforce OAuth connection limits
You should not create more than five Salesforce connections (between data-in and data-out) per user.
Salesforce enforces a limit of five connections per OAuth-enabled Connected Application, per user. When you hit this limit, Salesforce revokes the oldest connection. This limit is not configurable and Customer.io is not notified when Salesforce revokes a connection.
Because this limit is per user, you can circumvent the limit by creating multiple Salesforce integration users and carefully managing their connections—no more than five connections per user.
What counts towards the limit?
Salesforce counts an “authorized connection” when you click Connect and set up your Salesforce integration. Even if you don’t complete the connection flow, Salesforce counts it towards the limit!
How do I enable a sandbox instance?
To send data to a Salesforce sandbox instance, go to your integration’s Settings, enable the Sandbox Instance setting and click Connect. If you already connected to a different Salesforce instance, you’ll need to disconnect and reconnect with your sandbox username.
Your Salesforce sandbox username is your Salesforce production username with your sandbox name at the end. For example, if your username for a production instance is user@example.com
and your sandbox is named test
, your sandbox username is user@example.com.test
.
How do I add custom fields?
You can add additional, custom fields to any action under Additional Fields. You must define fields in Salesforce before you send them from your source data. When you set up custom fields in Salesforce, the names of your custom fields should end with __c
(for example, My_Custom_Field__c
). You should include the __c
in your mapping.
You can see Salesforce API names in Salesforce under Setup > Objects and Fields > Object Manager > Select your object > Fields & Relationships > FIELD NAME.
See Salesforce’s Create Custom Fields documentation for more information.
How do I associate a Contact with an Account?
To associate a Contact with an Account, you must include the AccountId
on the Contact record. The AccountId
is a Salesforce-generated ID assigned to the account when you create it (i.e. 0018c00002CDThnAAH
). Salesforce only accepts a single AccountId
as the Contact’s primary account; you can’t pass an array of IDs.
How do I send data for Person Accounts?
A Person Account is a special type of account that represents an individual rather than a business. Our standard Account action isn’t designed for Person Accounts, so you’ll need to use our Custom Object action if you want to map data to Person Accounts.
Person Accounts have specific field requirements. For example, Name
is required for Accounts, but LastName
is required for Person Accounts. Hard code the Salesforce Object to Account
and define other standard and custom fields, such as LastName
and FirstName
, in the Other Fields mapping.
How many API calls do you make to Salesforce?
The update
and upsert
operations take two API calls per action—one as a query to determine whether a record already exists in Salesforce or not and a second API call to update or create that record.
All other operations are a single call. To check how many API calls you have left in Salesforce, go to Setup > Company Settings > Company Information, and you’ll find a field labeled: API Requests, Last 24 Hours
.
How does Salesforce Bulk API work?
When you enable Use Salesforce Bulk API is enabled for an action, we send data to Salesforce’s Bulk API 2.0 rather than their streaming REST API. We’ll collect source data in batches of 1000 calls before we perform actions in Salesforce. You can only use the bulk API for upsert
or update
operations.
For bulk update
, if a record in a batch is missing a Bulk Update Record ID, we still send it to Salesforce. Salesforce will reject the individual record because it won’t find a record to update. But Salesforce will still process other records in the batch.
When records fail this way, the Data Out tab won’t report it. We’ll show the entire batch as successful because we only know if the bulk request is successful or not; we don’t know the status of individual records in the batch.