Versions Compared

Key

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

On In this Pagearticle

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. 
Image Added

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

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.

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.
  • 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 OutputInput/OutputType of View

Views

View TypeView FormatNumber 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.
ErrorDocumentThis Snap has one optional document error view.N/AThe error view contains error, reason, resolution and stack trace. For more information, see Handling Errors with an Error Pipeline

Snap Settings


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 Version*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.

Default value: 44.0 
Example: 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
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.

Default Value: -1
Example: 2

Pass

through

Through

Checkbox

Select this checkbox to pass the input document the output view under the key 'original'.

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

Default Value:  Selected

Advanced
properties
Properties

Use this field set to configure Http Long Polling. Click + to add Properties and Values. Enter each property and value in a separate row. This field set contains the following fields:

  • Properties
  • Values
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 macroname

Snap Execution

pageSOAP Execute
Dropdown list

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