Salesforce Connection Management
Add Salesforce Connection
The SLAM_add_connection command validates, stores and activates a Salesforce connection for use by the SQL Server Service Account. The connection details include the Salesforce API version, which is used for all future Speediful operations with this username.
By default, a connection test is performed and the connection will only be stored if this test passes. The connection test can be skipped.
The added connection is automatically activated for use in all future operations. The active Salesforce username is stored in field SLAM_Settings.Username
Orgs created since October 2025 must enable SOAP API login() before attempting to add a connection.
EXEC dbo.SLAM_add_connection
@username = 'your_username@company.com', -- Required
@password = 'your_password', -- Required
@token = 'your_security_token', -- Required
@domain = 'login', -- Optional (default: 'login') - One of: login, test (for sandboxes), or the Salesforce custom domain. Developer orgs use login
@environment_name = 'alias', -- Optional (default: NULL)
@api_version = 60, -- Optional (default: 60)
@skip_test = 0 -- Optional (default: 0)
SELECT * FROM SLAM_Settings -- Username is set to your_username@company.com for all future operations
Custom Domains can be specified by providing the login subdomain that preceeds the ".salesforce.com" portion of the URL, for example:
- Sandboxes:
@domain = 'acmecorp--partial.sandbox.my'to log into acmecorp's sandbox named 'partial' - Production:
@domain = 'acmecorp.my'
Object, record, field and data access depends on the policies applied to Salesforce, which is usually administered via Profiles, Permission Sets and Permission Set Groups. Certain feature licenses or user attributes may also be required. Troubleshooting of access should be in consultation with the Salesforce administrator and Salesforce documentation. It is recommended to review and apply these permissions where appropriate:
- Object level permissions
- View All Data permission
- Modify All Data permission
- Field level security
- View Encrypted Data
List Available Connections
Prints the available connections
EXEC dbo.SLAM_list_connections
Set Active Connection
Activating a connecting sets it as the Salesforce user for all future operations. This simply updates the value Username in table SLAM_Settings
EXEC dbo.SLAM_use_connection_username @username = 'your_username@company.com'
SELECT * FROM SLAM_Settings -- Username is set to your_username@company.com for all future operations
Test Connection
Confirms a stored credential is valid by performing a login operation. The connection test will fail if the credentials are invalid or if the password has expired.
EXEC dbo.SLAM_test_connection @username = 'your_username@company.com'
Remove Connection
Deletes a stored credential
EXEC dbo.SLAM_remove_connection @username = 'your_username@company.com'