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.

Troubleshooting

None

Limitation and Known Issue

  • 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

Works in Ultra

Pipelines: Works in Ultra

Pipelines.

Snap Settings


LabelRequired.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 version

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

Example: 44.0

Default value: 44.0 

Events

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

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

Required.  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 value: -1

Pass through

If selected, the input document is passed through to the output view under the key original. If not selected, the input document is not passed and there is no original key in the output document.

Default value:  Selected

Advanced propertiesConfiguration for Http Long Polling. For example, maxNetworkDelay, maxBufferSize. Click + to add Properties and Values under Advanced Properties.
By default, the Snap does not require any advanced properties. 

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.

Download this Pipeline.

ExpandtitleUnderstanding the Pipeline

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