Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On this Page

Table of Contents
maxLevel2
excludeOlder Versions|Additional Resources|Related Links|Related Information

Overview

The Salesforce Subscriber Snap is a Read-type Snap that provides the functionality to subscribe to Salesforce Platform and CDC events for a given standard and custom Salesforce object. 

Note

Refer the Salesforce Platform Event Allocations and Subscribe to change events documents before configuring this Snap.

Supported Salesforce Events

  • Platform events: User-defined read/write events. These events end with "_e".
  • CDC events: Read-only events created when the Salesforce objects (standard or custom) change. These events end with "ChangeEvent" or "_ChangeEvent".

Input and Output

Expected inputA stream of documents that contain data to be published on a Salesforce object

Expected outputA stream of documents with Map data that contain the individual records published on the given Salesforce object and/or original fields.

Expected upstream SnapsAny Snap with a document output view. For example, JSON Parser, Mapper.

Expected downstream SnapsAny Snap with a document input view. For example, JSON Formatter, Mapper.

Prerequisites

  • Ensure that Change Data Capture is enabled for the target entities. To do so login to your Salesforce instance and go to Setup → Build → Develop → Change Data Capture. 
  • Ensure that Field Tracking is enabled for the selected entities.
  • Account must have valid access permissions.

Configuring Accounts

This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Salesforce Account for information on setting up this type of account.

Configuring Views

Input

This Snap has at most one input view. 

OutputThis Snap has at most one output view.ErrorThis Snap has at most one error view and produces documents in the view. Each document in the error view contains key/value pairs from the input view and an error message from Salesforce.com. The error message is in the value of the error key.Limitation and Known Issue

Limitations and Known Issues

  • For a Salesforce (Platform Events) Subscriber Snap, retry attempts are not logged, and currently retries are attempted only for authentication errors.
  • Salesforce imposes a limit on the number of subscriptions. See Change Data Capture Allocations for details.
  • Supports only Platform and CDC events.
Modes
  • This Snap might duplicate error documents for a single input when the Snap configuration is invalid. For example, invalid Snap settings (Replay ID or Events) or a non-existent event.

Support for Ultra Pipelines

Works in Ultra Pipelines.

Snap Input and Output

Input/OutputType of ViewNumber of ViewsExamples of Upstream and Downstream SnapsDescription
InputDocument

Min:0
Max:1

  • JSON Parser
  • Mapper
A stream of documents that contain data to be published on a Salesforce object
OutputDocumentMin:1
Max:1
  • JSON Formatter
  • Mapper
A stream of documents with Map data that contain the individual records published on the given Salesforce object and/or original fields.

Snap Settings


The Required.Required.The version Required. The Required. T.  The RequiredIf selected, Configuration for Http Long Polling. For example, maxNetworkDelay, maxBufferSize under Advanced Properties.
By default, the Snap does not require any advanced properties. 
FieldField TypeDescription
Label*StringSpecify 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.
Service versionVersion*String/Expression

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

Info

Salesforce platform event is supported in version 44.0 or later.

ExampleDefault value: 44.0
Default valueExample: 44.0

Events*String/Expression

The Salesforce Platform Event or CDC Event. This is a suggestible field that lists the Platform Events and CDC events available to you.  

Example:

  • Printer_Event__e
  • AccountChangeEvent

Default value:None

Replay ID*Integer/Expression

Specify the position of an event in the event stream. The Snap supports the following IDs:

  • -2: Receives events from the earliest event position in the stream.
  • -1: Receives events from the latest event position in the stream.
  • A specific positive value ID: Receives events after the specified positive ID value.
Note

If you stop a Pipeline execution, the Replay ID is lost and the Snap restarts from the position you input here.


Example
: 20

Default value: -2

Message count*Integer/Expression

Specify the number of messages required to read and complete the Pipeline execution.

Note

If the value is set to -1, the Snap waits indefinitely and reads messages whenever available until you manually stop the Pipeline execution.

Example: 2

Default valueValue: -1
Example: 2

Pass throughCheckbox

Select this checkbox to pass the input document is passed through to the output view under the key 'original. If not selected'.

If you deselect this checkbox, the input document is will not be passed and there is no "original" key in the output document.

Default valueValue:  Selected

Advanced propertiesUse this field set to configure Http Long Polling. Click + to add Properties and Values. Enter each property and value in a separate row.
PropertiesString

Enter the property.

Default Value: N/A
ExamplemaxNetworkDelay, maxBufferSize

ValuesString

Enter the value for the property.

Default Value: N/A
Example: 10

Multiexcerpt include macro
nameSnap Execution
pageSOAP Execute


Multiexcerpt include macro
nameSnap_Execution_Introduced
pageAnaplan Read

Insert excerpt
Salesforce Batch Create
Salesforce Batch Create
nopaneltrue

Example


This example Pipeline demonstrates how the Salesforce Subscriber Snap processes platform events.

The following Salesforce Subscriber Snap shows how the Snap is configured and how the Salesforce object's records are read.

Image Modified

You can see that the Replay ID is -2. So the Snaps reads messages from the beginning. And the Snap reads only 3 messages as the Message count is set to 3.The Snap processes the events and the output preview is as follows:

Image Modified

Download this Pipeline.

Downloads

Attachments
patterns*.slp, *.zip


Insert excerpt
Salesforce Snap Pack
Salesforce Snap Pack
nopaneltrue