Skip to main content

Salesforce Settings

Configure Salesforce adapter settings in Salto

Support avatar
Written by Support
Updated over a month ago

After adding a Salesforce application connection to an environment, users can customize various aspects according to their unique setup.

To do this, go to the Environment Settings -> Application Connections -> click the three dots next to your application -> Edit Configuration File.

For more information about changing settings, read the Salto Configuration File article.

Managing Data Records

Managing Salesforce data records is optional, and can be enabled by updating your Salto Configuration File.

​

By default, data records are not fetched. You can enable this feature by adding a data section to your configuration:

salesforce {
fetch = {
data = {
includeObjects = [
"Product2",
"PricebookEntry",
"Custom_Object__c"
]
}
}
}

For better data management, you can also configure how Salto identifies records across environments:

salesforce {
fetch = {
data = {
saltoIDSettings = {
defaultIdFields = [
"##allMasterDetailFields##",
"Name",
]
overrides = [
{
objectsRegex = "PricebookEntry"
idFields = [
"Pricebook2Id",
"Product2Id",
]
}
]
}
}
}
}

Note – Salto does not fetch all data records by default to avoid performance issues in large environments.

Managing CPQ and Advanced Approvals

If you are using Salesforce CPQ (SBQQ) and Advanced Approvals (sbaa), you can configure Salto to manage these components with the recommended setup:

salesforce {
fetch = {
data = {
includeObjects = [
"SBQQ__.*",
"sbaa__ApprovalChain__c",
"sbaa__ApprovalCondition__c",
"sbaa__ApprovalRule__c",
"sbaa__ApprovalVariable__c",
"sbaa__Approver__c",
"sbaa__EmailTemplate__c",
"sbaa__TrackedField__c"
]
excludeObjects = [
"SBQQ__ContractedPrice__c",
"SBQQ__Quote__c",
"SBQQ__QuoteDocument__c",
"SBQQ__QuoteLine__c",
"SBQQ__QuoteLineGroup__c",
"SBQQ__Subscription__c",
"SBQQ__SubscribedAsset__c",
"SBQQ__SubscribedQuoteLine__c",
"SBQQ__SubscriptionConsumptionRate__c",
"SBQQ__SubscriptionConsumptionSchedule__c",
"SBQQ__WebQuote__c",
"SBQQ__WebQuoteLine__c",
"SBQQ__QuoteLineConsumptionSchedule__c",
"SBQQ__QuoteLineConsumptionRate__c",
"SBQQ__InstallProcessorLog__c",
"SBQQ__ProcessInputValue__c",
"SBQQ__RecordJob__c",
"SBQQ__TimingLog__c"
]
allowReferenceTo = [
"Product2",
"Pricebook2",
"PricebookEntry"
]
saltoIDSettings = {
defaultIdFields = [
"CUSTOM_OBJECT_ID_FIELD"
]
}
brokenOutgoingReferencesSettings = {
defaultBehavior = "BrokenReference"
perTargetTypeOverrides = {
User = "InternalId"
}
}
}
}
}

Managing Concurrent API Requests

Salesforce enforces API rate limits that can affect fetch and deploy operations. You can adjust Salto's concurrency settings to optimize performance.

To configure rate limiting:

salesforce {
client = {
maxConcurrentApiRequests = {
total = 100
retrieve = 3
read = 2
list = 2
query = 4
describe = 2
deploy = 1
}
}
}

Excluding elements

You can exclude specific metadata types or named elements from being fetched by editing the Salto Configuration File. This helps reduce workspace size and improve performance, especially in large Salesforce orgs.

To exclude elements, use the exclude list under the metadata section of the fetch block.

For example, the following configuration excludes all custom objects with names starting with Test_, as well as all reports and dashboards:
​

salesforce {
fetch = {
metadata = {
exclude = [
{
metadataType = "CustomObject"
name = "Test_.*"
},
{
metadataType = "Report"
name = ".*"
},
{
metadataType = "Dashboard"
name = ".*"
}
]
}
}
}


Only metadataType, name, and namespace can be filtered using regex in this context. Filtering by other conditions (such as labels or field values) is not supported.
​

Handling Broken References

When fetching data records, Salto needs to handle cases where records have references to other records that weren't fetched. This is common with User references.

To configure how broken references are handled:

salesforce {
fetch = {
data = {
brokenOutgoingReferencesSettings = {
defaultBehavior = "BrokenReference"
perTargetTypeOverrides = {
User = "InternalId"
}
}
}
}
}

The possible behaviors are:

- "ExcludeInstance": Don't fetch instances with broken references

- "BrokenReference": Fetch the instance and create placeholder references

- "InternalId": Keep the existing ID value of the referenced instance

Managing Custom Settings

You can control whether all custom settings instances are fetched automatically:

salesforce {
fetch = {
fetchAllCustomSettings = false
}
}

When set to false, you can fetch specific custom settings by adding them to data.includeObjects.

Optimizing Fetch Performance

For large Salesforce orgs, you can tune fetch performance by adjusting various limits.

To set a limit on instances per type:


salesforce {
fetch = {
maxInstancesPerType = 5000
}
}


This will prevent fetching metadata types or custom objects with more instances than the specified number.

You can also optimize how metadata is retrieved in chunks:

salesforce {
client = {
readMetadataChunkSize = {
default = 10
overrides = {
Profile = 1
PermissionSet = 1
}
}
}
}

Did this answer your question?