Salesforce Bulk Update

In this article

Overview

You can use this Snap to uupdate object records in Salesforce object records using Salesforce using Bulk API 2.0.

  • The ID field is required. This Snap will update records only by record ID and not by its external ID.
  • To use newer Salesforce objects, use the latest API versions where those objects are available.

Prerequisites

None.

Support for Ultra Pipelines

Works in Ultra Pipelines.

In Ultra Pipelines, set the Batch Size as 1 for the Snap to process one document/record at a time.

Limitations

  • This Snap performs batch processing, that is, a batch of input documents are processed for each HTTP request sent to Salesforce. Values of all the expression-enabled fields must remain constant during the Snap execution or validation. Hence, all expression fields can support Pipeline parameters only when they are expression-enabled. The input data parameters are not supported for expression fields, for example, $serviceVersion.

Snap Views

TypeFormatNumber of ViewsExamples of Upstream and Downstream SnapsDescription
Input Document
  • Min: 1
  • Max: 1

Mapper

Each document contains Map data for an object ID, a record ID and key-value pairs for fields to be updated
OutputDocument
  • Min: 0
  • Max: 1

JSON Formatter + File Writer

Produces documents in the view.

Error

Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the Pipeline by choosing one of the following options from the When errors occur list under the Views tab:

  • Stop Pipeline Execution: Stops the current Pipeline execution when the Snap encounters an error.

  • Discard Error Data and Continue: Ignores the error, discards that record, and continues with the remaining records.

  • Route Error Data to Error View: Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Because of the potentially large size of the error messages, the Reason for the Salesforce error message in the error document field may be truncated.
The complete error is available in the field full_error under the original object containing copies of the failed input records or in the logs.

Snap Settings

Field NameField TypeDescription

Label*


Default ValueSalesforce Bulk Update
Example
: Salesforce Bulk Update

String

Specify a unique name for the Snap. 


Service Version*


Default Value
52.0 



Example
41.0

String/Expression/Suggestion

Specify the version number associated with the Salesforce service you want to connect to. Alternatively, click the Suggestion  icon to fetch the list of versions and select the desired version.





Object Type*


Default Value: 
Account
Example: 
Account

String

Specify the name of the Salesforce object or select one from the suggested list

This Snap does not support Net Zero Cloud Salesforce objects.

Related Object


Default Value: 
N/A
Example: 
Account

String

Enter or select a related parent object. This property does not affect the Snap operation on records in Salesforce. It is provided for the property suggestion and the input schema suggestion only.


Related External ID


Default Value: 
N/A
Example:
 AccountNumber__c

String

Enter or select an external ID of the related parent object. This property does not affect the Snap operation on records in Salesforce. It is provided for the property suggestion and the input schema suggestion only. 


Display null or empty values as null


Default ValueDeselected



Checkbox

Select this checkbox to display empty string or null data as null in the output preview.

When you deselect this checkbox, the Snap displays an empty string or null data as blank in the output preview.

For a better understanding, refer to this Example.

The output in the Salesforce application remains unaffected. Whether the checkbox is selected or deselected, the Salesforce record and its corresponding output continues to appear empty, as shown below: 


Polling Interval*


Default Value: 
5
Example: 
5

Integer

Define polling interval in seconds.


Polling Timeout*


Default Value: 
3000
Example:
 300

Integer

Define the maximum time in seconds to wait for the query to complete.


Maximum Retry Attempts


Default Value: 
5
Example: 
5

Integer

Define the maximum number of retries to attempt in case of connection failure.


Retry Interval (seconds)


Default Value:
 3
Example: 
3

Integer

Define the interval between retries in seconds.


Snap Execution


Default Value
:Execute only
Example:
Validate & Execute

String

Select one of the three modes in which the Snap executes. Available options are:

  • Validate & Execute: Performs limited execution of the Snap and generates a data preview during Pipeline validation. Subsequently, it performs full execution of the Snap (unlimited records) during Pipeline runtime.
  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.
  • Disabled: Disables the Snap and all Snaps that are downstream from it.


Example

Update Records in Bulk in Salesforce

This example demonstrates how to update records in bulk in a Salesforce object.


The JSON Generator Snap 
generates five new JSON documents. The output from the Snap displays the documents' names, IDs, and customized serial numbers.

The following images display the Snap configuration and output: 
 


The Mapper Snap transforms the incoming data using the given mappings and produces new output data. The Snap output displays the output documents' names and customized serial numbers. 
The following images display the Snap configuration and output:


The Salesforce Bulk Update Snap Updates Salesforce records in Salesforce.comThe output from the Snap displays the names, IDs, and customized serial numbers of the updated documentsThe following images display the Snap configuration and output: 

 

Downloads

Important steps to successfully reuse Pipelines

  1. Download and import the pipeline into the SnapLogic application.
  2. Configure Snap accounts as applicable.
  3. Provide pipeline parameters as applicable.

  File Modified

File Example_Salesforce_BulkUpdate.slp

Mar 10, 2022 by Subhajit Sengupta


Snap Pack History

 Click to view/expand
Release Snap Pack VersionDateType  Updates

May 2024

main26341

 

Stable

Updated and certified against the current SnapLogic Platform release.

February 2024436patches25626 LatestEnhanced the Salesforce Bulk Create, Bulk Delete, Bulk Query, Bulk Update, and Salesforce Bulk Upsert Snaps to include the complete error details under the original object that contains the copies of the failed input records.
February 2024436patches25192 Latest

Fixed an issue with the Salesforce Mutual Authentication Account where the 8443 port was not used while authorizing the account. Now, the access token request uses the 8443 port for authorizing the Mutual Authentication Account.

Breaking change

Prior to 436patches25192, the Salesforce Mutual Authentication Account supported default Login URLs such as https://login.salesforce.com and https://test.salesforce.com. From 436patches25192, this account no longer supports the default Login URLs—your existing pipelines using the Mutual Authentication Account with the default Login URLs might break.

To prevent this breaking change, you must provide a valid Salesforce Login URL as part of your account configuration.

February 2024main25112 StableEnhanced the Salesforce Bulk Query Snap with expression support for the Include Deleted Records checkbox.
November 2023435patches24747 LatestFixed an issue that caused the input stream to not close properly, which resulted in stale connections.
November 2023435patches24368 Latest

Enhanced the performance of the Salesforce Bulk Query Snap with a new Maximum threads field. This field enables you to download query results simultaneously in multiple threads.

November 2023435patches24006 Latest

Enhanced the Salesforce Read Snap by adding expression enablement to the following checkboxes:

  • Use PK chunking if supported

  • Include Deleted Records

November 2023main23721 StableUpdated and certified against the current SnapLogic Platform release.
August 2023434patches23646 LatestFixed an issue where a long-running pipeline containing the Salesforce Subscriber Snap would suddenly stop responding.
August 2023434patches22537 Latest

Improved the Salesforce Bulk Upsert Snap error messages by limiting the length of the reason displayed with the error.

August 2023main22460 StableUpdated and certified against the current SnapLogic Platform release.
May 2023433patches21367 Latest
  • The Salesforce SOQL Snap now honors the selection of the Match Data Type checkbox when the value entered for Batch Size is greater than 50,000.

  • The Salesforce Read Snap now honors the selection of the Match Data Type checkbox if the Use PK chunking if supported checkbox is also selected.

May 2023

main21015 

Stable

Upgraded with the latest SnapLogic Platform release.

February 2023432patches20586 Latest

Fixed an issue with the Salesforce SOQL and Salesforce Read Snaps where the Match Data Type checkbox selection was not honored if the Salesforce API field was set to Bulk API.

February 2023432patches20393 Latest
February 2023432patches20145 Latest