Sitemap
Tech Force

Technical Blog & Projects about Salesforce

Member-only story

How To Publish Platform Events

Publish Salesforce Platform Events with different technologies

8 min readFeb 4, 2022

--

Press enter or click to view image in full size
How to publish Salesforce Platform Events. Picture by Buffik from Pixabay.

Salesforce Platform Events can be created in different ways using

  • Flows
  • Process Builder
  • Apex
  • Salesforce APIs

We will take a look at all the variants in this story, let’s kick start right away.

Define a Platform Event

Before we can publish any Platform Event, we need to define one. Let’s create a Platform Event opportunityCreated. Navigate to Setup > Integrations > Platform Events and select New Platform Event. Fill in the below details and save.

Press enter or click to view image in full size
Create a new Platform Event in Salesforce.

Navigate to the Platform Event and create the following Custom Fields.

  • we will fill the fields opportunityAmount, opportunityName and opportunityStage from the Opportunity when publishing the Platform Event
  • eventType will contain the Event Name and originatedFrom will be filled from the trigger technology and contain either Flow, Process Builder, Apex or API

--

--

Tech Force
Tech Force

Published in Tech Force

Technical Blog & Projects about Salesforce

Techletters
Techletters

Written by Techletters

#ai #datascience #salesforce #crypto #kafka #python — Follow me: https://techletters.medium.com/membership