Newer Version Available
Platform Event Samples
Sample App: The E-Bikes App and the Pub/Sub API Demo
E-Bikes is a fictitious electric bicycle manufacturer. E-Bikes manages its products and reseller orders with the E-Bikes app, which offers a rich user experience. Another app, the E-Bikes Manufacturing app, receives orders sent from the E-Bikes app. The E-Bikes Manufacturing app is a Node app that uses Pub/Sub API to subscribe to Order__ChangeEvent, the change event that is generated for orders, when a reseller order is placed in the E-Bikes app. After the manufacturer receives the change event and approves the order, the manufacturing app publishes a platform event, Manufacturing_Event__e, back to Salesforce.
The Pub/Sub API demo represents the E-Bikes Manufacturing app and is built using the Lightning Web Runtime. The demo is an add-on to the E-Bikes sample app. The E-Bikes sample app uses Lightning Web Components and integrates with Salesforce Experiences.
Install the E-Bikes app from the ebikes-lwc GitHub repository. After you install the E-Bikes app, install the Pub/Sub API demo from the ebikes-manufacturing GitHub repository.