Skip to content

davilag/platform-event-consumer

Repository files navigation

Platform event consumer

CI NPM version

CLI tool to consume platform events from a Salesforce org.

How to install

Install the CLI tool using yarn or npm:

yarn add global platform-event-consumer

How to run

The script accepts different arguments:

  • -e, --event <event>: Event that we want to consume.
  • -u, --username <username> (Optional): Username of the Salesforce org from which we want to consume events. You will need to authenticate to that org first using SFDX.
  • --env (Optional): if set, the script will get the authentication configuration from the enviromnent variables (see .env file).

Consume events authenticating using SFDX

In order to consume events in this way, you will need to have SFDX installed in your machine and authorize the org you want to consume events from using any of the auth commands.

platform-event-consumer --event Test_Event__e --username username@test.com

Consume events using environment variables

If you don't have SFDX installed in your machine, you can authenticate to any org using OAuth. All the necessary environment variables are listed in the .env file.

Once you have set them up, you can just run:

platform-event-consumer --event Test_Event__e --env

About

CLI tool to consume Platform Events from Salesforce

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published