Skip to main content

Salesforce programmer's reference

Salesforce Reader properties

property

type

default value

notes

API End Point

String

The endpoint for your Force.com REST API.

Auth Token

com.webaction. security.Password

See Configuring OAuth for Salesforce Reader.Salesforce Reader

When Auto Auth Token Renewal is True, this property is ignored and does not appear in Flow Designer.

If autoAuthTokenRenewal is set to false , specify your Salesforce access token (see Set Up Authorization on developer.salesforce.com: the first section, "Setting Up OAuth 2.0," explains how to create a "connected app"; the second section, "Session ID Authorization," explains how to get the token using curl).

Auto Auth Token Renewal

String

false

See Configuring OAuth for Salesforce Reader.Salesforce Reader

With the default value of False, when the specified Auth Token expires the application will halt and you will need to modify it to update the auth token before restarting. This setting is recommended only for development and testing, not in a production environment. When this property is False, you must specify Auth Token, Password, and Username.

Set to True to renew the auth token automatically. In this case, leave Auth Token blank and set the Consumer Key, Consumer Secret, Password, Security Token, and Username properties.

Bulk Query

String

Auto-generated

Custom SOQL query override for fine-tuned data retrieval during bulk operations. When using Bulk API v1, WHERE, ORDER BY, GROUP BY, LIMIT, and OFFSET clauses are not supported. Use Bulk API v2 for complex queries.

Connection Profile Name

String

Used when the Use connection profile property is set to True .

Select the name of the Salesforce Reader connection from the list.

Connection Retry Policy

String

retryInterval=30, maxRetries=3

With the default setting, if a connection attempt is unsuccessful, the adapter will try again in 30 seconds (retryInterval. If the second attempt is unsuccessful, in 30 seconds it will try a third time (maxRetries). If that is unsuccessful, the adapter will fail and log an exception. Negative values are not supported.

Consumer Key

String

When Auto Auth Token Renewal is False, this property is ignored and does not appear in Flow Designer.

If autoAuthTokenRenewal is set to true, specify the Consumer Key (see Set Up Authorization on developer.salesforce.com).

Consumer Secret

com.webaction. security.Password

When Auto Auth Token Renewal is False, this property is ignored and does not appear in Flow Designer.

If autoAuthTokenRenewal is set to true, specify the Consumer Secret (see Set Up Authorization on developer.salesforce.com).

Custom Objects Only

Boolean

False

By default, both standard and custom objects are included. Set to trueto include only custom objects and exclude standard objects.

Excluded Columns

String

Columns to exclude from the bulk query. Format: Object:Column1,Column2;Object2:Column3. If Create Schema On Target is enabled, excluded columns still appear in the target schema but contain null values.

JWT Keystore Path

String

When Auto Auth Token is False or OAuth Authorization Flows is PASSWORD, this property is ignored and not visible in the Flow Designer.

See Salesforce Help> Docs> Identify Your Users and Manage Access > OAuth 2.0 JWT Bearer Flow for Server-to-Server Integration.

JWT Keystore Password

com.webaction. security.Password

When Auto Auth Token is False or OAuth Authorization Flows is PASSWORD, this property is ignored and not visible in the Flow Designer.

See Salesforce Help> Docs> Identify Your Users and Manage Access > OAuth 2.0 JWT Bearer Flow for Server-to-Server Integration.

JWT Certificate Name

String

When Auto Auth Token is False or OAuth Authorization Flows is PASSWORD, this property is ignored and not visible in the Flow Designer.

See Salesforce Help> Docs> Identify Your Users and Manage Access > OAuth 2.0 JWT Bearer Flow for Server-to-Server Integration.

Migrate Schema

Boolean

False

Do not change this setting. It is reserved for use by applications created using Auto Schema Conversion wizards (see Using Auto Schema Conversion).

Mode

Select list

  • Automated

  • Initial load

  • Bulk load

  • Incremental

Controls the basic behavior of the adapter. Use the default setting Initial load to load all existing data using force-rest-api 0.28 and stop.

Set to  Bulk load to load all existing data using the Salesforce  Bulk APIand stop. The bulk load currently loads all existing data synchronously, similar to the Initial Load process. When standard objects are selected for Bulk Mode, the IsDeleted status of records is automatically captured.

Set to Incrementalto read new data continuously using force-rest-api 0.28.

Set the value to Automated to perform both initial load and incremental load. See Salesforce initial load.Salesforce Reader

OAuth Authorization Flows

Enum

PASSWORD

When Auto Auth Token Renewal is False, this property is ignored and does not appear in Flow Designer.

With the default value of PASSWORD, Salesforce Writer will authorize using OAuth 2.0 username and password (see Salesforce Help> Docs> Identify Your Users and Manage Access > OAuth 2.0 Username-Password Flow for Special Scenarios). In this case, you must specify values for the Consumer Key, Consumer Secret, Password, Security Token, and Username properties.

Set to JWT_BEARER to authorize using OAuth 2.0 JWT bearer tokens instead (see Salesforce Help> Docs> Identify Your Users and Manage Access > OAuth 2.0 JWT Bearer Flow for Server-to-Server Integration). In this case, you must specify the Consumer Key, JWT Certificate Name, JWT Keystore Password, JWT Keystore Path, and Username properties.

Objects

See sObjects.

Password

com.webaction. security.Password

When Auto Auth Token Renewal is False or OAuth Authorization Flows is JWT_BEARER, this property is ignored and not visible in the Flow Designer.

When Auto Auth Token Renewal is set to true, specify the password for the specified username.

Polling Interval

String

5 min

This property controls how often the adapter reads from the source. By default, it checks the source for new data every five minutes. If there is new data, the adapter reads it and sends it to the adapter's output stream. If you encounter Salesforce REQUEST_LIMIT_EXCEEDED errors, you may need to increase this value or contact Salesforce to raise your API limits (see Salesforce Developer Limits and Allocations Quick Reference). The maximum value is 120 min.

Return Picklist Data As

enum

api

Added in Striim 4.2.0.4.

With the default value of api, data from picklist fields will be returned as the API name. Set to valueto return the field value instead, or to apiAndValueAsJsonto return both the API name and field value as a JSON string.

Security Token

String

When Auto Auth Token Renewal is False or OAuth Authorization Flows is JWT_BEARER, this property is ignored and not visible in the Flow Designer.

When Auto Auth Token Renewal is set to true, specify the security token for the specified username (see Reset Your Security Tokenon help.salesforce.com).

SObjects

String

%

In the Flow Designer this property is shown as Objects.

Do not modify this property when recovery is enabled for the application.

With the default wildcard value %, all available objects associated with the specified API End Point will be read. To exclude standard objects, set Custom Objects Only to true.

Alternatively, specify one or more objects to read, separating multiple objects with semicolons, for example, Account; Business_C. Note that any child objects (see Object Relationships Overview) must be specified explicitly, they are not included automatically when you specify the parent.

The objects must be queryable. The account associated with the specified Auth Token must have View All Data permission for the objects.

Start Timestamp

String

By default, Salesforce Reader reads only new events. Optionally, specify the time (based on LastModifiedDate) from which to start reading older events in the format YYYY-MM-DDTHH:MM:SS. If the Salesforce organization's time zone is not the same as Striim's, convert the Salesforce start time to UTC (GMT+00:00) and include a Zat the end of the string. See SimpleDateFormatfor more information.

Thread Pool Size

Integer

5

Set this to match your Salesforce Concurrent API Request Limit (see API Request Limits and Allocations).

Use Connection Profile

Boolean

Set to True to use a connection profile instead of specifying the connection properties here. See Using connection profiles.

Use Bulk API V2

Boolean

false

Set to true to use Salesforce Bulk API v2 instead of v1. Applicable when Mode is set to InitialLoad or BulkLoad. Use Bulk API v2 for tables with 10 million or more records, or when you need complex SOQL queries with WHERE, GROUP BY, LIMIT, or OFFSET clauses.

Username

String

When Auto Auth Token Renewal is False, this property is ignored and does not appear in Flow Designer.

When Auto Auth Token Renewal is set to true, specify an appropriate username (see Add a Single Useron help.salesforce.com).

The output type is WAEvent.

Salesforce CDC Reader properties

Name

Type

Default

Description

API endpoint

Text

The endpoint URL of the customer account in Salesforce.

Auth Token

Password

The access token.

Auto Auth Token Renewal

Toggle

false

When set to true, the adapter automatically renews the access token, enabling the application to run continuously.

CDDL action

Select list

Process

Handles schema evolution.

CDDL capture

Boolean

false

Specifies whether to capture changes in the schema definitions of source objects.

Connection retry policy

Text

retryinterval=30, maxRetries=3

With the default setting, if a connection attempt is unsuccessful, the adapter will try again in 30 seconds (retryInterval. If the second attempt is unsuccessful, in 30 seconds it will try a third time (maxRetries). If that is unsuccessful, the adapter will fail and log an exception. Negative values are not supported.

Consumer

Text

Consumer.

Consumer Key

Text

Consumer key of the connected app in Salesforce.

Custom channel

Text

A user-specified custom channel to which the adapter subscribes. When a custom channel is provided, the adapter subscribe only to the custom channel and does not read from any standard channel. The adapter reads from all sObjects that are subscribed to the custom channel and listed in the sObjects property. When the specified sObjects are not valid for the custom channel, the app halts.

Exclude Objects

Text

When objects are specified with a wildcard, objects in this property are excluded from sync. The Exclude Objects property does not support wildcards. Specify objects as a semicolon (;) delimited list.

Fetch size

Text

1000

Specifies the maximum number of events to fetch from the event bus in a single operation. Larger numbers of events are transmitted as a Striim event.

JWT Certificate name

Text

Alias name for the certificate.

JWT Keystore password

Password

Password to the JWT keystore.

JWT Keystore path

Text (Choose a file)

Path to the JWT keystore.

OAuth Authorization Flows

Select List

  • PASSWORD

  • JWT_BEARER

PASSWORD

Select an authorization flow option from the list.

Password

Text

Password to the account on the Salesforce instance.

ReplayID

Long

A user-provided replayID.

Secret

Secret of the connected app.

Security token

Password

Security token for the user.

sObjects

Text

Objects whose CDC events adapters subscribe to. Supports wildcards. The % character denotes all objects in the account that support CDC.

Do not modify this property when CDDL Capture is True or recovery is enabled for the application.

Use the Salesforce metadata API call to determine which objects support CDC events.

Start position

Select list:

  • Earliest

  • Latest

  • ReplayID

Latest

Select Earliest for historical data within the channel's retention window.

Select Latest for the most recent data from app start time.

Select replayID to replay from the specified replayID.

Start timestamp

Long

When this property is not specified, only new data is read. Optionally, specify the timestamp from which the adapter will read. It accepts any value greater than or equal to 0 in epoch time. Negative values (representing dates before 1970) are not supported..

For example:

  • 0 represents: Thursday, 1 January 1970 00:00:00

  • 10000 represents: Thursday, 1 January 1970 02:46:40

  • 1717146037 represents: Friday, 31 May 2024 09:00:37

Thread pool count

Integer

0

Configure the size of the thread pool to optimize performance for multiple objects.

The ThreadPoolCount value must be less than the number of available processors. For example, if the system has eight processors, set ThreadPoolCount to 7 or lower.

Username

Text

Username of an account on the Salesforce instance.

Salesforce Reader data type support and correspondence

Salesforce data type

Striim type

base64

java.lang.Object

boolean

String

byte

Byte

date

org.joda.time.LocalDate

dateTime

org.joda.time.DateTime

double

Double

int

Long

string

String

time

String

Salesforce CDC Reader data type support and correspondence

Salesforce data type

Striim type

base64

java.lang.Object

boolean

String

byte

Byte

date

org.joda.time.LocalDate

dateTime

org.joda.time.DateTime

double

Double

int

Long

string

String

time

String

Salesforce sObject field to Striim type mapping

sObject field

Striim type

address

java.lang.String (see discussion below)

anyType

String

calculated

String

combobox

String

currency

Double

DataCategoryGroupReference

String

email

String

encryptedstring

String

ID

String

JunctionIdList

String

location

String (see discussion below)

masterrecord

String

multipicklist

String

percent

Double

phone

String

picklist

String

reference

String

textarea

String

url

String

The address and location fields are compound types. The lava.lang.String data field contains a JSON representation of the sObject values and the WAEvent metadata map.

Salesforce Reader WAEvent example

WAEvent{
  data: [
    "a025j000004He03AAC",
    "AA",
    100.0,
    "WA",
    "USD",
    null,
    null,
    null]
  metadata: {
    "LastModifiedDate":1646674721000,
    "TableName":"Business__c",
    "IsDeleted":false,
    "CustomObject":true,
    "OwnerId":"0055j000004c2D2AAI",
    "CreatedById":"0055j000004c2D2AAI",
    "OperationName":"INSERT",
    "CreatedDate":1646674721000,
    "attributes":
      "{type=Business__c,    
        url=\/services\/data\/v51.0\/sobjects\/Business__c\/a025j000004He03AAC}",
      "LastModifiedById":"0055j000004c2D2AAI",
      "SystemModstamp":"2022-03-07T17:38:41.000Z"},
  }
  userdata: null
  before: null
  dataPresenceBitMap: "HwA="
  beforePresenceBitMap: "AAA="
  typeUUID: {"uuidstring":"01ed7a69-eb41-3f71-8a71-8cae4cf129d6"}
};

Salesforce CDC Reader WAEvent example

The following is the WAEvent for a location:

data: ["a067F00000B52obQAB","a067F00000B52ob","{latitude=1.0, longitude=1.0}"]
metadata: {"LastModifiedDate":"2018-09-11T05:45:43.000+0000","IsDeleted":false,
  "CustomObject":true,"OperationName":"INSERT","SystemModstamp":"2018-09-11T05:45:43.000+0000",
  "TableName":"compoundobject__c","OwnerId":"0057F000001oImoQAE","CreatedById":"0057F000001oImoQAE",
  "location__Latitude__s":1.0,"CreatedDate":"2018-09-11T05:45:43.000+0000",
  "location__Longitude__s":1.0,"attributes":{"type":"compoundobject__c",
  "url":"/services/data/v34.0/sobjects/compoundobject__c/a067F00000B52obQAB"},
  "LastModifiedById":"0057F000001oImoQAE"}

Replicating Salesforce data to Oracle

The following TQL will load all data from the Salesforce Business_c object to the Oracle table BUSINESS_ORACLE_P, then stop writing (in other words, new data will be ignored). Replace ******** with your Salesforce access token (see Understanding the Web Server OAuth Authentication Flow on developer.salesforce.com).

CREATE SOURCE SalesforceCloud USING SalesForceReader (
  sObjects: 'Business__c',
  authToken: '********',
  mode: 'BulkLoad',
  apiEndPoint: 'https://<mycompany>.my.salesforce.com',
  autoAuthTokenRenewal: false
)
OUTPUT TO DataStream;

CREATE TARGET OracleOnPremise USING DatabaseWriter (
  ConnectionURL:'jdbc:oracle:thin:@192.168.123.18:1521/XE',
  Username:'system',
  Password:'manager',
  Tables: 'Business__c,SYSTEM.BUSINESS_ORACLE_P'
)
INPUT FROM DataStream;

The following TQL will replicate multiple objects:

CREATE SOURCE SalesforceCloud USING SalesForceReader (
  sObjects: 'Business1__c;Business2__c',
  apiEndPoint: 'https://<mycompany>.my.ap2.salesforce.com',
  mode: 'Incremental',
  authToken: '***' )
OUTPUT TO DataStream;

CREATE TARGET OracleOnPremise USING DatabaseWriter (
  ConnectionURL: 'jdbc:oracle:thin:@localhost:1521/XE',
  Username: 'qatest',
  Tables: 'Business1__c,qatest.BUSINESS_ORACLE_P1 COLUMNMAP(ID=ID);Business2__c,qatest.BUSINESS_ORACLE_P2
    COLUMNMAP(ID=ID)',
  Password: '***'
INPUT FROM DataStream;

The following TQL will replicate new data continuously:

CREATE SOURCE SalesforceCloud USING SalesForceReader ( 
  sObject: 'Business__c',
  authToken: '********',
  pollingInterval: '5 min',
  apiEndPoint: 'https://<mycompany>.my.ap2.salesforce.com',
  mode: 'Incremental'
 ) 
OUTPUT TO DataStream;

CREATE TARGET OracleOnPremise USING DatabaseWriter ( 
  DriverName:'oracle.jdbc.OracleDriver',
  ConnectionURL:'jdbc:oracle:thin:@192.168.123.18:1521/XE',
  Username:'system',
  Password:'manager',
  Tables: 'Business__c,SYSTEM.BUSINESS_ORACLE_P'
 ) 
INPUT FROM DataStream;

Salesforce Platform Event Reader

Reads Salesforce platform events (user-defined notifications) using a subscription model (see Delivering Custom Notifications with Platform Events).

This adapter is based on Salesforce initial load. The output type and data type support are the same. The properties are the same, except for the following:Salesforce Reader

  • Mode and Polling Interval: Since platform events use a subscription model, these properties are omitted. Platform events are received as they are published by Salesforce.

  • Event Name: Specify the name of the platform event to subscribe to. The account associated with the authToken must have View All Data permission for the platform event. Any fields added to the platform event while the reader is running will be ignored. Do not modify this property when recovery is enabled for the application.

  • Replay From (default value Earliest): With the default value, will read all platform events currently in the retention window. To read only new events, set to Tip. To start reading from a specific point in the retention window, set to a valid ReplayID value (see Platform Event Fields.

  • sObjects: Omitted since this adapter reads platform events, not sObjects.

When the output of this adapter is the input for DatabaseWriter and other table-based targets, events are insert-only. (Since platform events are one-time notifications, it does not make sense to update or delete them.)

Recovery (see Recovering applications) is supported provided that Striim is restarted within 24 hours, the length of time Salesforce holds events in the retention window.

Salesforce Push Topic Reader

Reads Salesforce sObject data using a PushTopic subscription (see Salesforce's Streaming API Developer Guide).

This gives you the latest data sooner than SalesforceReader. Note, however, that Salesforce restricts use of PushTopics in various ways, including limiting how many events you can read in a day and how many PushTopics you can create. See the PushTopic section of Streaming API Allocations for details.

This adapter is based on Salesforce initial load. The output type and data type support are the same. The properties are the same, except for the following:Salesforce Reader

  • Mode and Polling Interval: Since this uses a subscription model, these properties are omitted. sObject data is received as it is published by Salesforce.

  • PushTopic: The PushTopic to subscribe to. You must also specify the sObject to be read. (To read multiple sObjects from a PushTopic, create a source for each.) The account associated with the authToken must have View All Data permissions for both the PushTopic and the sObject. 

  • Replay From (default value Earliest): With the default value, will read all events currently in the PushTopic retention window. To read only new events, set to Tip. To start reading from a specific point in the retention window, set to a valid ReplayID value (see Message Durability).

  • SObject: the standard or custom object to read, for example, Account or Business_C (the account associated with the authToken must have View All Data permission for the object). Do not modify this property when recovery is enabled for the application.

Recovery (see Recovering applications) is supported provided that Striim is restarted within 24 hours, the length of time Salesforce holds events in the retention window.