Salesforce Subscriber

The Salesforce Subscriber (earlier known as Salesforce Topic Subscriber) activity subscribes to a single Salesforce streaming topic or event and generates a process event from each message received. To subscribe to a topic or event in Salesforce, you must configure the Salesforce Subscriber activity in TIBCO Business Studio.

General

Note: A process instance that contains the Salesforce Subscriber activity can be deployed on multiple hosts in an environment. Each of these process instances that is deployed on multiple hosts, acts as a separate subscriber and receives all the messages originating from the Push Topic or Platform Event.

On the General tab, you can establish a connection to the Salesforce.com server.

The following table lists the configurations on the General tab of the Salesforce Subscriber activity:

Field Module Property? Description
Name No The name displayed as the label of the activity in the process.
Salesforce Connection Yes The path to the Salesforce shared resource.

Click the Choose/Create Default Resource icon and select a usable connection for the activity.

Subscriber Type No The type of subscriber. You can select either Push Topic or Platform Event.

If you do not select any value for this field, the activity defaults to the Push Topic value.

Salesforce Object No Ensures that the metadata for your development environment is up to date. It contains all the objects configured on the Salesforce system to which you are connected, including custom objects.

If you leave it blank, the output is a JSON string. In this case the output schema is a text string containing the JSON representation of the object. However, if you select the object being streamed, its fields are displayed in the output.

Note: When you add custom fields to a Platform Event after you subscribe to it, to see these new fields in the output of the activity, you must refresh the metadata and reselect the event from the Salesforce object list and save the project.
Channel Yes The topic name or event name of the stream to which the listener subscribes.
The topic name starts with /topic/ and the event name starts with /event/ in the value and continues with the topic name or event name configured on the Salesforce server.
Note: You can configure this activity only for a topic or event that exists on the Salesforce server.
Replay From Yes Salesforce stores events for 24 hours. By configuring this field, you can retrieve events that are in the retention window.

-2 starts the replay from 24 hours ago, -1 starts the replay from the moment the listener starts, and an actual replay ID means all events after that ID can be retrieved. For example, if the actual ID is 7, then replay starts from 8 onwards.

Description

On the Description tab, enter a short description for the Salesforce Topic Subscriber activity.

Advanced

The following table lists the configurations on the Advanced tab of the Salesforce Topic Subscriber activity:

Field Description
Sequence Key

This field contains an XPath Expression that specifies the order in which processes run. Process instances with sequencing keys evaluated as the same value are run in the order they are created.

Custom Job Id

This field contains an XPath expression that specifies a custom ID for the process instance.

Output

On the Output tab, you can find the output value.

The following table lists the output elements on the Output tab of the Salesforce Subscriber activity:

Output Item Data Type Description
data
event createdDate String The date when the event was created.
replayId Integer Indicates the replay ID of the event.
type String Indicates the type of the event.
sObject Complex This node contains either the fields for the selected object or a text field for its JSON representation if no object is selected on the General tab.