Skip to content
NodeJS/Heroku code for my talk "Microservices inside Salesforce With Platform Events and Change Data Capture"
Branch: master
Clone or download
Latest commit bb3d3a5 Nov 11, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.

Microservices inside Salesforce With Platform Events and Change Data Capture

Thank you for coming to my talk, I hope that it was informative. This repository contains the off-platform service code, written in NodeJS used in the demonstration. It is intended to be used with Heroku, but can also be run locally.

Please note, this service is not production ready, it is intented to be used only as an example.

Heroku Invoicing Service


This is a simple service to generate PDF invoices based on platform events recieved, it will then fire a platform event in response containing the invoice PDF as a base64 string along with the ID of the record it originated from and the invoice number.

It is intented to be used with the apex code located here.


The service can be run locally by executing node index.js, or can be deployed to heroku and will run automatically.

The following enviornment variables must be set to run the application

SF_USERNAME username for salesforce (e.g

SF_PASSTOKEN the password and token for salesforce (e.g passwordToken)

SF_INV_REQ the platform event to use for invoice requests (e.g Generate_Invoice_PDF__e)

SF_INV_RES the platform event to use for invoice responses (e.g Invoice_PDF__e)

You can’t perform that action at this time.