Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kdcllc/CometD.NetCore.Salesforce
CometD Salesforce Implementation.
https://github.com/kdcllc/CometD.NetCore.Salesforce
bay cometd dotnet-cli dotnet-core salesforce salesforce-apex salesforce-api salesforce-developers salesforce-rest-api workbench
Last synced: 3 months ago
JSON representation
CometD Salesforce Implementation.
- Host: GitHub
- URL: https://github.com/kdcllc/CometD.NetCore.Salesforce
- Owner: kdcllc
- License: mit
- Created: 2018-07-24T20:49:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-13T01:37:57.000Z (over 2 years ago)
- Last Synced: 2024-11-05T16:18:41.750Z (4 months ago)
- Topics: bay, cometd, dotnet-cli, dotnet-core, salesforce, salesforce-apex, salesforce-api, salesforce-developers, salesforce-rest-api, workbench
- Language: C#
- Size: 287 KB
- Stars: 45
- Watchers: 6
- Forks: 24
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# CometD.NetCore.Salesforce
[](https://raw.githubusercontent.com/kdcllc/cometd-netcore-salesforce/master/LICENSE)
[](https://ci.appveyor.com/project/kdcllc/cometd-netcore-salesforce)
[](https://www.nuget.org/packages?q=Bet.AspNetCore)

[](https://f.feedz.io/kdcllc/kdcllc/packages/CometD.NetCore.Salesforce/latest/download)_Note: Pre-release packages are distributed via [feedz.io](https://f.feedz.io/kdcllc/kcllc/nuget/index.json)._
## 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](https://github.com/kdcllc/Bet.BuildingBlocks.SalesforceEventBus).
The solution contains the following:
1. [`CometD.NetCore2.Salesforce`](./src/CometD.NetCore.Salesforce/)
- A Salesforce Platform Events implementation based [Even Bus idea of eShopOnContainers](https://github.com/dotnet-architecture/eShopOnContainers).
- [Reusable Building Blocks and sample application that listens to Salesforce push events](https://github.com/kdcllc/Bet.BuildingBlocks.SalesforceEventBus).2. [DotNet Cli tool `salesforce`](./src/AuthApp/)
- This dotnet cli tool allows for retrieval of `Access` or `Refresh Tokens` to be used by any other application.
Please refer to [How Are Apps Authenticated with the Web Server OAuth Authentication Flow](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_web_server_oauth_flow.htm)[](https://www.buymeacoffee.com/vyve0og)
## 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
```csharp
dotnet add package CometD.NetCore.Salesforce
```## Saleforce Setup
[Watch Video](https://www.youtube.com/watch?v=L6OWyCfQD6U)
1. Sing up for development sandbox with Saleforce: [https://developer.salesforce.com/signup](https://developer.salesforce.com/signup).
2. Create Connected App in Salesforce.
3. Create a Platform Event.### Create Connected App in Salesforce
1. Setup -> Quick Find -> manage -> App Manager -> New Connected App.
2. Basic Info:
3. API (Enable OAuth Settings):
4. Retrieve `Consumer Key` and `Consumer Secret` to be used within the Test App
### Create a Platform Event
1. Setup -> Quick Find -> Events -> Platform Events -> New Platform Event:
2. 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](https://workbench.developerforce.com/login.php?startUrl=%2Finsert.php)
## AuthApp
### OAuth Refresh Token Flow
[Use login instead of test](https://github.com/developerforce/Force.com-Toolkit-for-NET/wiki/Web-Server-OAuth-Flow-Sample#am-i-using-the-test-environment)
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.
## Special thanks to our contributors
* [cwoolum](https://github.com/cwoolum)
* [ts46235](https://github.com/ts46235)
* [cternes](https://github.com/cternes)
* [apaulro](https://github.com/apaulro)## Related projects
- [Oyatel/CometD.NET](https://github.com/Oyatel/CometD.NET)
- [nthachus/CometD.NET](https://github.com/nthachus/CometD.NET)
- [tdawgy/CometD.NetCore](https://github.com/tdawgy/CometD.NetCore)
- [eShopOnContainers](https://github.com/dotnet-architecture/eShopOnContainers)