Salesforce Publisher

On this Page


The Salesforce Publisher Snap is a Write-type Snap that publishes Salesforce Platform Event records to a given event custom Salesforce object. Salesforce Platform Events are part of Salesforce’s enterprise messaging platform and help deliver secure and scalable custom notifications within Salesforce or from external sources.

  • In Bulk API mode, the Snap publishes multiple platform event records in batches.

  • In REST API mode, the Snap publishes only one platform event record per each request, for each input document.

Refer the Salesforce Platform Event Allocations document before configuring this Snap. 



Limitations and Known Issues

  • In Salesforce 44.0, when an input document contains extra fields which are not part of the list of fields defined in a given Platform Event object, the error handling of in REST API and Bulk API is different. REST API throws the error: "No such column ...". However, Bulk API ignores all extra fields and successfully publishes records as long as the mandatory fields are present.
  • 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.

Support for Ultra Pipelines

Works in Ultra Pipelines.

Snap Views

TypeFormatNumber of ViewsExamples of Upstream and Downstream SnapsDescription
Min: 1
Max: 1
  • JSON Parser
  • Mapper
A stream of documents whose data schema is the same as the schema that is defined in the selected Platform Event custom SFObject. Each document contains one Salesforce Platform Event record. The Snap supports the input schema suggest functionality that shows the input schema in the Target path of the Mapper Snap if the Mapper Snap is connected to the input view.
Min: 0
Max: 1
  • JSON Formatter
  • Mapper
 A stream of documents that contain the success field for the event record that is published, and the original field for the corresponding input record.
ErrorThe error view contains error, reason, resolution and stack trace. For more information, see Handling Errors with an Error Pipeline.

Snap Settings

FieldField TypeDescription

Specify the name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your Pipeline.

Default ValueSalesforce Publisher
ExampleSalesforce Publisher

Service Version*String

Specify the version number of the Salesforce service that you want to connect to.

Salesforce platform event is supported in version 44.0 or later.

Default Value: 44.0 
Example: 44.0


Specify the name of the Salesforce platform event custom object. All Salesforce platform event object names end with __e. You can select the name from the suggested list in the drop-down menu.

The supported Salesforce Events are:

  • Platform events: User-defined read/write events. These events end with "_e".

Default Value: None
Example: Printer_Event__e

Salesforce APIDropdown list

Select the Salesforce API mode. The available options are:

  • Bulk API

In REST API mode, the Snap publishes one record at a time and returns the results in the output. REST API is simpler and faster if the number of records to be published is small.

Default Value: REST API
Example: Bulk API

Batch sizeInteger

Specify the batch size in records.

  • In Bulk API mode, you can enter any value between 1 and 10,000. Each input document forms one Salesforce Platform Event record to be published. The Snap stores the records in memory until the number of records reaches the specified batch size and sends the request to SFDC in a single batch. Increasing the batch size increases the amount of memory that is used during data load. Decreasing the batch size increases the number of API calls against Salesforce.

  • In REST API, the Snap can insert only one record per each request regardless of the Batch size value.

Default Value: 200
Example: 700

Batch timeoutInteger

Specify the batch timeout in seconds. The Snap sends a batch write request to SDFC when the number of input documents in the buffer reaches the given Batch size. However, sometimes, input documents may not arrive for a long time. In such cases, a Batch timeout value helps send a batch write request in a specified time interval even if the number of input documents in the buffer is less than the buffer size. 

If you set Batch timeout to 0, the Snap waits until the number of input documents in the buffer reaches the Batch size. 

Default Value: None
Example: 60

Number of retriesInteger

Specify the maximum number of retry attempts in case of a network failure. 

Default value: 1
Example: 3

Ensure that the local drive has sufficient free disk space to store the temporary local file.

Retry interval (seconds)Integer
Specify the minimum number of seconds for which the Snap must wait before attempting recovery from a network failure.

Default Value: 1
Example: 3

Pass throughCheckbox

Select this checkbox to pass the input document through to the output view under the key original.
If you deselect this checkbox, the input document is not passed and there is no original key in the output document.

Default Value:  Selected

Snap Execution

Dropdown list

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, 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.

The field labels for this Snap are updated to title case. If you have existing Pipelines that include the field names in the error messages, you must update those Pipelines to use the new field labels.


Processing Different Input Documents

This Pipeline demonstrates how the Salesforce Publisher Snap processes three different input documents. The first document is a valid record. The second document has one required field that is missing. The third document contains an extra field that is not a part of the field that is defined in the Event object. 

Download this Pipeline.

 Understanding the Pipeline

The JSON Generator Snap is used to provide the input document. The input document contains different values for a printer. The input data preview is as follows:

We use the Salesforce Publisher Snap to publish the values. The following image displays the Snap configuration in REST API mode

All the expression properties in the Snap use Pipeline parameters. The following image displays the Pipeline parameters that are used in this example:

After you validate the Pipeline, you can see that the first document is successfully published in both the modes. The second input document produces an error document in the error view in both REST and Bulk API modes. The third document produces an error document in the error view in REST API, but is successfully published in Bulk API.

Following is the output preview in the Bulk API mode:

Following is the output preview of the error document in Bulk API mode:

Following is the output preview in the REST API mode:

Following is the output preview of the error document in the REST API mode:


Important steps to successfully reuse Pipelines

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

  File Modified

File Example_Salesforce_Publisher.slp

Mar 10, 2022 by Subhajit Sengupta

Snap Pack History

 Click to view/expand
Release Snap Pack VersionDateType  Updates
September 2022430patches18036 Latest

The Salesforce Read Snap now correctly parses the 2-byte UTF-8 characters in Windows OS in the PK chunking mode.

August 2022main17386 Stable
  • Updates in Salesforce Subscriber Snap:

    • CometD version upgrade from 5.0.9 to 7.0.6 (latest).

    • The simplified logging provides useful diagnostic information without logging any sensitive data.

    • The Snap asynchronously makes callbacks or listens to the CometD API to identify and respond to specific events.

    • The Snap processes the most recent message so that it can send that replay ID if there is a need to resubscribe. If the server responds with an invalid replay ID, the Snap automatically sets the Replay ID value to -2 to get all available messages.

  • You can select the Null Setting with Bulk API checkbox in the Salesforce Update, Salesforce Create, and Salesforce Upsert Snaps to format null values in the input document.

4.29 Patch

429patches16708 Latest
  • Updates in Salesforce Subscriber Snap:
    • Upgraded the Cometd version from 5.0.9 to the latest 7.0.6 version.
    • Fixed an issue where the Snap reported an error and stopped only at the next resubscribe attempt when it encountered the daily limit exceeded error. Now, the Snap displays the error and stops immediately when it encounters the daily limit exceeded error.
    • Simplified the logging that provides useful diagnostic information without logging any sensitive data.
    • Enhanced the Snap design to make the callbacks or listeners asynchronously by the Cometd API when there is a specific event, and the Snap responds accordingly.
    • Enhanced the tracking of replay ID of the most recent message processed so that Snap can send that replay ID if there is a need to resubscribe. If the server responds that the replay ID is invalid, Snap automatically sets the Replay ID value to -2 to get all available messages.
  • Made the Null Setting with Bulk API checkbox in the Salesforce Update, Salesforce Create, and Salesforce Upsert Snaps visible, to format a null value.

4.29main15993 StableUpgraded with the latest SnapLogic Platform release.
4.28 Patch428patches14355 


Fixed an issue with Salesforce Snaps where the Service Version could not be retrieved from SFDC due to a blocked URL, failing the Snap execution.

4.28main14627 StableUpgraded with the latest SnapLogic Platform release.
4.27 Patch



Fixed an issue with the Salesforce Subscriber Snap where the Snap was unable to re-subscribe to a topic if it did not receive any message for 72 hours —stopped and displayed an error message. With this fix, the Snap automatically sets the Replay ID value to -2 when:

  • the specified Replay ID is invalid or outside the retention window.

  • the most recently received Replay ID for an event is outside the 72-hour retention window.

4.27 Patch427patches13944 LatestFixed an issue with Salesforce accounts, where an account password containing special characters and an empty security token was not properly encoded and the account was not validated.
4.27 Patch427patches13789 Latest

Fixed the following issues with Salesforce Snaps:

  • High memory use due to leaked resources.

  • Hung Pipelines due to blocked threads.

4.26 Patch426patches12054 Latest

Enhanced the Salesforce Subscriber Snap with improved resilience to network failures and fixed an issue with duplicate documents.

4.26main11181 StableUpgraded with the latest SnapLogic Platform release.
4.25 Patch425patches10182 LatestFixed an issue with the Salesforce Read Snap where the retry fields do not work as expected when a Pipeline has more than ten Snaps. 
4.25 Patch425patches9609 LatestEnhanced the Salesforce Read Snap to allow you to add an optional second output view that exposes the schema of the target object as the output document. The output view of the Snap has a minimum of one output and a maximum of two outputs. 
  • Enhanced the Salesforce Upsert Snap to support CSV payload using the new field Bulk Content Type in Bulk API mode as Salesforce API has recently been supporting CSV payload as well. Earlier, this Snap supported only XML data type; you can now select CSV content type from the Bulk Content Type drop-down list. The default content type is set to XML to preserve backward compatibility. 
    This enhancement also addresses the null values issue during Bulk API mode. 
  • Enhanced the Snaps in the Salesforce Snap Pack by updating the field labels to title case. If you have existing Pipelines using Salesforce Snaps that include the field names in the error messages, you must update those Pipelines to use the new field labels.
4.24 Patch 424patches9024 Latest
4.24 Patch 424paches8569 Latest

Fixes an issue in Salesforce Bulk Upsert, Salesforce Bulk Update, and Salesforce Bulk Create Snaps that fail to process Related object and Related external ID values by modifying the input schema that formats the CSV data.

Potential Breaking Change

This Salesforce Snap patch contains an issue affecting the Salesforce Subscriber and Salesforce Publisher Snaps. If you do not use these Snaps in your Pipelines, then you can use this patch version. Else, we recommend you to not use this patch version as Pipelines will fail. We will fix this issue soon in an upcoming patch.

StableUpgraded with the latest SnapLogic Platform release.
4.23 Patch 423patches7888 Latest
StableUpgraded with the latest SnapLogic Platform release.
StableUpgraded with the latest SnapLogic Platform release.
4.21 Patch salesforce8829 Latest

Fixed the Salesforce Create, Update, Bulk Create, Bulk Update, and Bulk Upsert Snaps, enabling you to upload files containing duplicate values across multiple fields.



StableUpgraded with the latest SnapLogic Platform release.
4.20 Patch salesforce8814 Latest

Fixed the Salesforce Create, Update, Bulk Create, Bulk Update, and Bulk Upsert Snaps, enabling you to upload files containing duplicate values across multiple fields.

4.20 Patch salesforce8797 Latest

Fixed the Salesforce Subscriber Snap wherein the Salesforce Subscriber and Mapper Snap combination generates Null output for Array object type.


Added the Salesforce Bulk Query Snap, which enables you to perform bulk SOQL queries on Salesforce.

4.18 Patch salesforce7832 Latest

Enhanced the Salesforce Subscriber Snap to capture Change Data Capture (CDC) events.

StableUpgraded with the latest SnapLogic Platform release.
4.17 Patch salesforce7474 Latest

Added Order by clause and Limit clause properties to the Salesforce Reader Snap to fix an issue wherein the Snap throws an error while fetching records.


Pushed automatic rebuild of the latest version of each Snap Pack to SnapLogic UAT and Elastic servers.


Added the Snap Execution field to all Standard-mode Snaps. In some Snaps, this field replaces the existing Execute during preview check box.

4.16 Patch salesforce6889 LatestAdded two new properties, Number of retries and Retry interval, to the Salesforce Read, SOQL, Publisher, and Subscriber Snaps. These properties let you handle retry attempts and intervals in case of a network failure.
  • Added two new Snaps: 
    • Salesforce Publisher: Publish Salesforce platform event records to a given event custom sObject (Salesforce Object).
    • Salesforce Subscriber: Subscribe to Salesforce platform event records for a given event custom sObject.
4.15 Patch salesforce6405 Latest

Fixed an issue with resource leak in PK Chunking in Salesforce Read and SOQL Snaps.

4.15 Patch salesforce6349 Latest

Fixed an issue with the Salesforce SOQL Snap timing out while waiting for a connection from the pool.

StableUpgraded with the latest SnapLogic Platform release.

4.14 Patch 


 LatestFixed the Salesforce SOQL Snap that fails to execute if the parameter values of a SOQL query expression contain the WHERE clause.
StableUpgraded with the latest SnapLogic Platform release.


  • Fixed an issue where the Salesforce Read Snap fails to download the PK-Chunking CSV file due to network failure or running out of disk space.
  • Fixed an issue where theSalesforce Lookup Snap does not match the datatype with the Bulk API; for instance, boolean data returns string.
  • Fixed an issue where the Salesforce SOQL Snap does not preview data in pipelines. 
  • Fixed an issue where PK Chunking files are not deleted from the temp directory.
4.12 Patchsalesforce4839 Latest

Fixed a defect that occurs when downstream Snaps are slow in processing documents downloaded from SFDC.

4.12 Patchsalesforce4773 Latest

Added a new option in Advanced properties - "Validate record count downloaded in Bulk API" that compares the number of records processed vs downloaded and routes output to Error View (if Error View is enabled) if there is a mismatch.



  • Updated Salesforce SOQL and Lookup Snaps to ensure that they are consistent with SnapLogic guidelines of writing Snap data exceptions to error views and continuing to process next documents vs. hard stopping.
  • Enhanced the Salesforce read operations for the Read, SOQL, and SOSL Snaps to display the original Salesforce error cause, reason, and resolution.
4.11 Patchsalesforce4299 Latest
  • Fixed an issue wherein the Salesforce SOQL Snap did not get an input stream from the next records URL.
  • Fixed an issue with the Salesforce SOQL Snap querying deleted records using Bulk API.

Polling timeout property's default value increased to 3000 from 300 for Salesforce Lookup, Salesforce Poller, Salesforce Read, and Salesforce SOQL Snaps.

4.10 Patchsalesforce4005 Latest

Salesforce Poller Snap: Includes the success field in the output.



StableUpgraded with the latest SnapLogic Platform release.
4.9.0 Patchsalesforce3218 Latest

Fixed the error in PK Chunking when a downstream Snap is blocking the pipeline

4.9.0 Patchsalesforce3247 Latest

Addressed an issue withSalesforce Poller Snap causing JSON Formatter to throw ConcurrentModificationException.

4.9.0 Patchsalesforce3225 Latest

Addressed a null pointer exception in the Salesforce Update Snap. This exception was present in both salesforce3082 and salesforce3122.


Updated the Salesforce Create, Batch Create, Delete, Poller, Update and Upsert Snaps with Pass through property.

4.8.0 Patchsalesforce2884 Latest
  • Addressed an issue with inconsistent behavior between Preview and Execution.
  • Addressed an issue with Salesforce SOQL Snap failing to download PK-Chunking.


  • Updated the Salesforce Lookup Snap with Correlation ID property. This property is an ID field name which the Snap uses to correlate input document to the output record when users want to pass through input data to the output view.
  • Updated the Salesforce Read Snap with Output field limit and Output field offset properties. Output field limit is the number of fields to return in the order of Salesforce describe object field index. Output field offset defines a starting field index for the output fields.
  • Info tab added to accounts.
4.7.0 Patch salesforce2284  Latest

Added log to troubleshoot a deploy issue.

4.7.0 Patch salesforce2255  Latest

Addressed SFDC SOQL Snap routing to the error view & validate PK Chunking record numbers.

4.7.0 Patch salesforce2244  Latest

Addressed possible leak with threads waiting to download PK Chunking responses.

4.7.0 Patch salesforce2218 Latest

SFDC SOQL Snap route to the error view & validate PK Chuning record numbers.

4.7.0 Patch salesforce2209 Latest

SOQL Snap now correctly routes to the error view & validates PK Chunking record numbers.



  • Updated the Salesforce SOQL, Read, & Lookup Snaps with Match data type field.
  • Updated the Salesforce Upsert, Update, Create and Delete Snaps with 'Standardize error output' field.
4.6.0 Patch salesforce1931 Latest
  • Implemented a new property "Match data type in XML"
  • Implemented a new entry "SFDC_SESSION_TIMEOUT_MINUTES" so that users can reduce the frequency of logins.
  • Doc Enhancement: Examples added to Salesforce Snap documentation.
  • Resolved an issue in Salesforce Snaps that prevented extraction of access tokens.


  • Salesforce Read Snap is updated to support Output fields and Where clause specifications. For more information, see Salesforce Read.
  • Salesforce Read & SOQL Snaps are updated to support JSON representation of Bulk API result data and a parsing issue encountered (in Bulk API mode) has been rectified.
  • Fixed errors around upload and output preview for Salesforce Wave Analytics Snap.
  • Pass through and Ignore empty results added to Salesforce SOQL, Read and SOSL Snaps.
  • Resolved an issue in Salesforce Batch Create Snap to appropriately create multiple records in REST API.
  • Resolved an issue with Connection pool times out with Salesforce Snaps.
  • Salesforce Lookup: Resolve a 'The session ID or OAuth token used has expired or is invalid' exception when running in an Ultra Task.

Resolved an issue with Salesforce Query returning inconsistent result sets.

  • SalesForce Lookup Snap: Implemented Pass-through on no lookup match property
  • Resolved an issue with Salesforce Upsert Snap failing with an error 'not valid for the type xsd:double'.
  • Resolved an issue with Salesforce SOQL Snap returning fewer results than SFDC returns.
  • Performance improvements made to Salesforce Read/SOQL Snaps with Bulk API in PK Chunking mode.
  • NEW! Salesforce Batch Create added in this release.
  • Salesforce Wave ID field suggestions now include upstream schema.
  • Resolved an issue in Salesforce Lookup Snap failing to generate an output schema if more than 50 records are found.
  • NEW! Salesforce Batch Create added in this release.
  • Resolved an issue with Salesforce Wave analytics throwing an error when metadata contained a hash symbol in number format.
  • Resolved an issue the failing to validate the account if the password contained a colon (:).
  • Salesforce Snaps now default to the latest Salesforce API version.
  • Create/Update/Upsert Snaps did not support related object mappings.

  • Salesforce Upsert - intermittently throws ViewChannelException since document was send to the closed output view
  • Salesforce Delete not using passthrough platform service

  • Salesforce Account: added custom login URL (for support of CipherCloud)
  • Salesforce Read: various updates for errors and performance improvements for > 1m rows being retrieved in Bulk API
  • Salesforce Write in Bulk API: enhanced batching support

  • NEW! Salesforce Wave Analytics added in this release.
  • Salesforce Upsert: External ID field is now suggestible.

  • Salesforce Read & Salesforce SOQL now accept 200 as a batch size.

  • Snaps with a Polling timeout property no longer have a maximum timeout limit.

  • Addressed the following issues:
    • Salesforce Account: Could not login to Salesforce, Endpoint Exception Error message is displayed.
    • Salesforce Analytics null pointer
    • Salesforce Attachment: NPE is displayed for Invalid Account.

  • The account settings for now gives you the choice of either entering a token or entering an IP while list address range. If you need to create a token, you will need a non-admin user to generate the token for SnapLogic.
  • The Security Token is no longer required for accounts.