PubSubConsume
Task to consume salesforce messages with a Pub/Sub API
Task version: 1.0.0
Required Frends version: 5.7+
Required .NET version: 8.0
Compatible Agents: Crossplatform
Source code: https://github.com/FrendsPlatform/Frends.Salesforce/tree/main/Frends.Salesforce.PubSubConsume
Task Parameters
TopicName : String
Salesforce topic name to subscribe to e.g., /event/My_Event__e or /data/AccountChangeEvent.
Default: -
Example: /event/My_Event__e
NumberOfEvents : Int32
Maximum number of events to receive before the task returns.
Default: 1
Example: 10
ReplayPreset : ReplayPresetOption
Replay the starting point for the subscription.
Possible values:
Latest: Replay the starting point for the subscription.Earliest: Replay the starting point for the subscription.Custom: Replay the starting point for the subscription.
Default: 0
Example: Latest
ReplayIdBase64 : String
Base64 encoded replay ID to continue from when ReplayPreset is Custom.
Default: -
Example: AAABBBCCC==
WaitTimeoutSeconds : Int32
Maximum time to wait for events before returning. Use 0 to wait infinite or until the Frends cancellation token cancels the task.
Default: 30
Example: 30
AuthenticationMethod : AuthenticationMethod
Authentication method used to get a Salesforce access token.
Possible values:
AccessToken: Authentication method used to get a Salesforce access token.OAuth2WithPassword: Authentication method used to get a Salesforce access token.OAuth2WithClientCredentials: Authentication method used to get a Salesforce access token.
Default: 1
Example: UsernamePasswordOAuth
PubSubApiUrl : String
Salesforce Pub/Sub API endpoint.
Default: -
Example: https://api.pubsub.salesforce.com:7443
InstanceUrl : String
Salesforce instance URL. Required when using the AccessToken authentication method.
Default: -
Example: https://mydomain.my.salesforce.com
AuthUrl : String
Url used to authenticate to Salesforce with the OAuth2 password flow.
Default: https://login.salesforce.com
Example: https://mydomain.my.salesforce.com
TenantId : String
Salesforce tenant or org ID. Sent as the tenantId gRPC header.
Default: -
Example: 00Dxx0000000001
🗝AccessToken : String
Reusable Salesforce access token. Required when using the AccessToken authentication method.
Default: -
Example: 00Dxx0000000001!AQ8AQExampleToken
ClientId : String
OAuth connected app client ID.
Default: -
Example: 3MVG9d8..ExampleClientId
🗝ClientSecret : String
OAuth connected app client secret.
Default: -
Example: ExampleClientSecret
Username : String
Salesforce username.
Default: -
Example: [email protected]
🗝Password : String
Salesforce password.
Default: -
Example: ExamplePassword
🗝SecurityToken : String
Salesforce security token appended to the password for the username-password OAuth flow when required.
Default: -
Example: ExampleSecurityToken
ShutdownChannel : Boolean
Allows keeping a channel for connection open.
Speed up multiple calls, but needs to be closed at last usage.
Default: True
Example: true
ResolveSchemas : Boolean
Fetch Avro schema JSON for each distinct schema ID encountered in the response.
Default: True
Example: true
ThrowErrorOnFailure : Boolean
Whether to throw an error on failure.
Default: True
Example: true
ErrorMessageOnFailure : String
Overrides the error message on failure.
Default: -
Example: Custom error message
Task Result
Success : Boolean
Indicates if the task completed successfully.
Example: true
TopicName : String
Topic that was consumed.
Example: /event/My_Event__e
EventCount : Int32
Number of events returned in the Events collection.
Example: 3
TimedOut : Boolean
Indicates whether the local wait timeout elapsed before the requested event count was reached.
Example: false
LatestReplayIdBase64 : String
Latest replay ID reported by Salesforce, encoded as Base64.
Example: AAABBBCCC==
Events : List<ConsumedEvent>
Events returned by the subscription.
Example: object[] { object { string EventId, string SchemaId, string ReplayIdBase64, string PayloadBase64 } }
Error : Error
Error that occurred during task execution.
Example: object { string Message, Exception AdditionalInfo }
Task Changelog
Changelog for Task Frends.Salesforce.PubSubConsume.
[1.0.0] - 2026-04-26
Added
Initial implementation
Last updated
Was this helpful?

