Salesforce platform event
Overview
A Salesforce platform event is a supported Sync Source that you can use in your Cinchy data syncs. The below documentation will refer to the parameters necessary to set up your Platform Event as part of your sync configuration.
Configuring the Sync
All of the configuration parameters and variables for this real-time sync are the same as those outlined in the Salesforce Platform Event documentation. The only difference is that you must also set up your listener configuration as per the next section.
The Listener Configuration
In Cinchy v5.7+, configuring the listener can be done directly in the Connections UI, however for multiple listener requirements you must still add additional configurations in the Listener Config table.
To set up an Stream Source, you must set up a Listener Configuration. The below table describes the parameters and their relevant descriptions.
- Listener Config
- Topic
- Connection Attributes
\The following column parameters can be found in the Listener Config table:
Parameter | Description | Example |
---|---|---|
Name | Mandatory. Provide a name for your listener config. | Salesforce platform event real-time sync |
Event Connector Type | Mandatory. Select your Connector type from the drop-down menu. | Salesforce platform event |
Topic | Mandatory. This field is expecting a JSON formatted value specific to the connector type you are configuring. | See the Topic tab. |
Connection Attributes | Mandatory. This field is expecting a JSON formatted value specific to the connector type you are configuring. | See the Connection Attributes tab. |
Status | Mandatory. Set to "Enabled" to activate the listener. Leave on "Disabled" until you are ready to start syncing. | Enabled /Disabled |
Running Status | Read-only. Shows the current state of the listener as Starting, Running, or Failed. This is automatically managed by the system. For more information, see the Listener status section. | Running |
Active | Managed by User/System. Indicates whether the listener is set to retry after failure ("Yes") or has stopped attempting to sync and requires user intervention ("No"). | Yes /No |
Data Sync Config | Mandatory. This drop-down will list all the data syncs on your platform. Select the one that you want to use for your real-time sync. | CDC Data Sync |
Subscription Expires On | Salesforce Stream Sources only. This field is a timestamp that's auto populated when it has successfully subscribed to a topic. | |
Message | Auto-populated. This field reports errors that occur during the sync. | |
Auto Offset Reset | Earliest, Latest, None. Determines where to start reading events if there is no last message ID or if it's invalid. Can be adjusted post-configuration. Learn more | Earliest ,Latest , None |
The below table can be used to help create your Topic JSON needed to set up a real-time sync.
Parameter | Description | Example |
---|---|---|
Name | Mandatory. Name of the Platform Event in Salesforce to subscribe to. | Notification__e |
Example Topic JSON
{ "Name": "Notification__e"
The below table can be used to help create your Connection Attributes JSON needed to set up a real-time sync.
Parameter | Description | Example |
---|---|---|
ApiVersion | Mandatory. Your Salesforce API Version. Note that this needs to be an exact match; for instance "47.0" cannot be written as simply "47". | 47.0 |
GrantType | This value should be set to "password". | password |
ClientId | The encrypted Salesforce Client ID. You can encrypt this value using the Cinchy CLI. | See example below. |
ClientSecret | The encrypted Salesforce Client Secret. You can encrypt this value using the Cinchy CLI. | DyU1hqde3cWwkPOwK97T6rzwqv6t3bgQeCGq/fUx+tKI= |
Username | The encrypted Salesforce username. You can encrypt this value using the Cinchy CLI. | dXNlcm5hbWVAZW1haWwuY29t |
Password | The encrypted Salesforce password You can encrypt this value using the Cinchy CLI. | cGFzc3dvcmRwYXNzd29yZA== |
InstanceAuthUrl | The authorization URL for Salesforce instance. | https://login.salesforce.com/services/oauth2/token |
Example
{
"ApiVersion": 47.0,
"GrantType": "password",
"ClientId": "Bn8UmtiLydmYQV6//qCL5dqfNUMhqchdk959hu0XXgauGMYAmYoyWN8FD+voGuMwGyJa7onrc60q1Hu6QFsQXHVA==",
"ClientSecret": "DyU1hqde3cWwkPOwK97T6rzwqv6t3bgQeCGq/fUx+tKI=",
"UserName": "dXNlcm5hbWVAZW1haWwuY29t",
"Password": "cGFzc3dvcmRwYXNzd29yZA=="
"InstanceAuthUrl": "https://login.salesforce.com/services/oauth2/token"
}