CometD.NetCore.Salesforce
CometD.NetCore.Salesforce copied to clipboard
CometD Salesforce Implementation.
CometD.NetCore.Salesforce
Note: Pre-release packages are distributed via feedz.io.
Summary
This repo contains the CometD .NET Core implementation for Salesforce Platform events.
These events can be subscribed to and listened to by your custom Event Listener
. The sample application of this library can be found here.
The solution contains the following:
-
CometD.NetCore2.Salesforce
- A Salesforce Platform Events implementation based Even Bus idea of eShopOnContainers.
- Reusable Building Blocks and sample application that listens to Salesforce push events.
-
DotNet Cli tool
salesforce
- This dotnet cli tool allows for retrieval of
Access
orRefresh Tokens
to be used by any other application. Please refer to How Are Apps Authenticated with the Web Server OAuth Authentication Flow
- This dotnet cli tool allows for retrieval of
Give a Star! :star:
If you like or are using this project to learn or start your solution, please give it a star. Thanks!
Install
dotnet add package CometD.NetCore.Salesforce
Saleforce Setup
- Sing up for development sandbox with Saleforce: https://developer.salesforce.com/signup.
- Create Connected App in Salesforce.
- Create a Platform Event.
Create Connected App in Salesforce
- Setup -> Quick Find -> manage -> App Manager -> New Connected App.
- Basic Info:
-
API (Enable OAuth Settings):
-
Retrieve
Consumer Key
andConsumer Secret
to be used within the Test App
Create a Platform Event
- Setup -> Quick Find -> Events -> Platform Events -> New Platform Event:
- Add Custom Field
(note: use sandbox custom domain for the login to workbench in order to install this app within your production)
Use workbench to test the Event workbench
AuthApp
OAuth Refresh Token Flow
Use login instead of test
Simple application that provides with Web Server OAuth Authentication Flow to retrieve
Access Token
and Refresh Token
to be used within the application.
Username/Password Flow
To enable Username/Password flow and grant type, simply omit the auth token and refresh token while providing the username, password and user api token.