Salesforce Bulk API 2.0
The Salesforce Bulk API 2.0 destination writes data to Salesforce objects using Salesforce Bulk API 2.0. To write to Salesforce with the SOAP or Bulk API, use the Salesforce destination. For information about supported versions, see Supported Systems and Versions.
When you configure the Salesforce destination, you define connection information, including the API version and authentication type to use. You can also use a connection to configure the destination.
You specify the Salesforce object to write to by entering the object name or by defining an expression that evaluates to the object name.
You can write Salesforce platform events as you write to any Salesforce object by using
the platform event API name, for example, Notification__e
, rather than
a Salesforce object type API name such as Account
or
Widget__c
.
The Salesforce Bulk API 2.0 destination can use CRUD operations defined in the
sdc.operation.type
record header attribute to write
data. You can define a default operation for records without the header
attribute or value. You can also configure how to handle records with
unsupported operations.
For information about Data Collector change data
processing and a list of CDC-enabled origins, see Processing Changed Data.
By default, the Salesforce Bulk API 2.0 destination writes data to a Salesforce object by matching case-sensitive field names. You can override the default field mappings by defining specific mappings that the CRUD operation requires. For update and delete operations, the incoming record must contain the record ID.
You can optionally use an HTTP proxy to connect to Salesforce. When enabled in Salesforce, you can configure the destination to use mutual authentication to connect.
CRUD Operation Processing
- CRUD operation header attribute
- The destination
looks for the CRUD operation in the
sdc.operation.type
record header attribute.
- Operation stage properties
- If there is no CRUD operation in the
sdc.operation.type
record header attribute, the destination uses the operation configured in the Default Operation property.
Hard Deleting Records
By default, when the Salesforce Bulk API 2.0 destination deletes records, the records move to the Salesforce Recycle Bin. They remain in the Recycle Bin for 15 days. During that time, you can restore those records. After 15 days, the records are purged from the Recycle Bin and can no longer be restored.
You can configure the Salesforce Bulk API 2.0 destination to bypass the Salesforce Recycle Bin and permanently delete records that are flagged for deletion. You might hard delete records to recover storage space.
To bypass the Salesforce Recycle Bin and permanently delete records, select the Hard Delete Records property on the Salesforce tab.
Field Mappings
When you configure the Salesforce Bulk API 2.0 destination, you can override the default mapping of case-sensitive field names by mapping specific fields in the record to existing fields in the Salesforce object.
- SDC Field - Name of the field in the record that contains the data to be written.
- Salesforce Field - API name of the existing field in the Salesforce object that receives the data. Enter a field name or enter an expression that defines the field.
- Delete
- To delete data, map only the Salesforce record Id to delete. Create a single
field mapping that maps the field in the record that contains the value of
the Salesforce record Id to the Salesforce field named
Id
. - Insert, update, or upsert
- To insert, update, or upsert data, you can create multiple field mappings. When you define the Salesforce fields, use a colon (:) or period (.) as a field separator.
<ObjectType>:<RelationshipName>.<IndexedFieldName>
.
Because a polymorphic field can have more than one type of object as a parent, you must
define the parent object type in the field name syntax. For example, a case field can
have either a user or a queue as the parent. To set a case owner to a user through their
username, specify the User:Owner.Username
Salesforce field.