Salesforce bulk operation

You can use the Salesforce bulk operation step to perform bulk mutative operations (insert, update, upsert, and delete) on Salesforce objects using the Salesforce Bulk API 2.0.

The step reads data from the stream, buffers a CSV file of mutations, executes the bulk job, and (optionally) returns:

  • successful results

  • unprocessed records

  • failed results

Before you begin

You must have a Salesforce Client ID and Client secret to use this step.

General

  • Step name: Specify the unique name of the Salesforce bulk operation step on the canvas. You can customize the name or leave it as the default.

Connection tab

Use this tab to provide Salesforce credentials. The Client id and Client secret authenticate the service account, and Username and Password identify the user that the service account impersonates.

Salesforce bulk operation Connection tab
Field
Description

OAuth2 login endpoint

Endpoint used to retrieve a token from Salesforce.

Client id

Client identifier required for the OAuth endpoint.

Client secret

Client secret required for the OAuth endpoint.

Username

User name used to authenticate to Salesforce.

Password

Password for the user.

Test connection

Verifies that the connection can be made to the Salesforce web service URL.

Operation tab

Use this tab to define the bulk operation.

Salesforce bulk operation Operation tab
Field
Description

Salesforce object type

Target Salesforce object type.

Bulk operation

Operation type: Insert, Update, Upsert, or Delete. Some selections show additional fields.

Salesforce id stream field

Available for Update and Delete. Select an incoming field that contains the Salesforce ID of the object to update or delete.

External id stream field

Available for Upsert. Select an incoming field that contains an external (indexed) ID. If the external ID exists in Salesforce, the record is updated; otherwise, a new record is created.

External id object field

Available for Upsert. Salesforce object field that contains the external ID to match for upserts.

Fields tab

Use this tab to define which fields to write for Insert, Update, and Upsert operations. This tab is not available for bulk delete operations.

circle-info

You cannot include the external ID as a mapped field for upsert operations.

All incoming values (except dates) are converted to strings using the format masks of the Stream field.

Salesforce bulk operation Fields tab
Field
Description

Stream field

PDI stream field containing the value to write.

Object field

Destination Salesforce object field.

Clear nulls?

Select Yes to clear values in Salesforce when the incoming value is null. Select No (default) to leave existing Salesforce values unchanged.

Advanced tab

Use this tab to configure buffer files and API version.

Salesforce bulk operation Advanced tab
Field
Description

Path to buffer the bulk job payloads

Directory used to store temporary payload files and retrieve output records. Temporary files are deleted when the step finishes.

Maximum size of a buffered payload file (in bytes)

Maximum bytes to buffer/transmit per bulk job payload. Default and maximum is 100 MB (104857600). Lower this if needed to avoid locking errors.

Buffer payload only (do not upload in job)

Buffers payload files in the specified directory but does not upload them to Salesforce.

Cleanup bulk jobs once processed

Select to delete buffer files when the step finishes.

Salesforce API version

Salesforce Bulk API version to use.

circle-info

Sample transformations are available in /design-tools/data-integration/plugins/pdi-salesforce-bulk-plugin/samples:

  • Input SFBL.ktr

  • Delete SFBL.ktr

  • Update SFBL.ktr

  • Upsert SFBL.ktr

Metadata injection support

All fields of this step support metadata injection. You can use this step with ETL metadata injection to pass metadata to your transformation at runtime.

Last updated

Was this helpful?