Skip to main content
Salesforce logo

Overview

Use Salesforce as a destination in Mage to export records into standard or custom Salesforce objects. Mage supports both OAuth 2.0 and username/password/token authentication methods, and enables insert, update, upsert, delete, and hard_delete actions. You can also configure behavior for bulk failures, define external ID fields for upserts, and optionally override the source-to-object mapping using table_name.

Configuration Parameters


Authentication Options

You can authenticate to Salesforce using either of the following methods:

Option 1: OAuth 2.0

  • Set client_id, client_secret, and refresh_token.
  • Recommended for connected apps and secure access with refreshable tokens.
  • How to obtain credentials →

Option 2: Username / Password

  • Set username, password, and security_token.
  • Recommended for sandbox/testing environments.
  • Ensure that IP restrictions are disabled or add your Mage IP to the trusted IP list.

Limitations

To map a non-default source stream to a specific Salesforce object, you must explicitly set the table_name parameter in your configuration.
  • The value of table_name must match the API name of a Salesforce object (e.g., Account, Lead, Opportunity, or custom objects like MyObject__c).

Allow Failures Behavior

When allow_failures is set to true:
  • Records that are eligible (i.e., match the Salesforce object schema and are valid for the selected action) but fail to commit will be skipped.
  • The pipeline will continue processing other records.
When allow_failures is set to false:
  • Any failed record will raise an error and halt the pipeline.