Think about how news travels in a busy household. Someone calls out “dinner’s ready!” — and whoever cares about dinner reacts. The person announcing doesn’t walk to each room, tap each shoulder, and wait for a reply. They make one announcement, and the listeners decide what to do with it. Platform events are Salesforce’s version of that announcement, and once the idea clicks, a whole style of integration opens up to you.
Let me teach you the one concept underneath it all: publish and subscribe.
The old way: everyone talks directly
In a normal integration, system A calls system B directly. “Hey B, this just happened, please go do your thing.” That works, but it’s tightly coupled. A has to know B exists, know its address, and wait for it to answer. Add a system C that also cares, and now A has to call B and C. Every new listener means more wiring inside A. It gets brittle fast.
The event way: announce once, let others listen
Platform events flip this around. Instead of calling anyone directly, Salesforce simply publishes an event — an announcement that says “this thing happened.” Any number of subscribers can be listening, and each reacts on its own. The publisher doesn’t know or care who’s listening. It just makes the announcement and moves on.
This is called publish/subscribe, or pub/sub. The publisher publishes; subscribers subscribe. They never need to know about each other. That separation is called decoupling, and it’s the quiet superpower here.
The publisher’s only job is to announce that something happened. It is gloriously, deliberately ignorant of who reacts. That ignorance is what makes the system flexible.
Publishing an event in Apex
A platform event is defined much like an object, with fields, and its name ends in __e. Publishing one is refreshingly simple — you create the event record and call EventBus.publish:
Order_Placed__e evt = new Order_Placed__e(
Order_Id__c = '8001234',
Amount__c = 250.00
);
EventBus.publish(evt);
That’s the whole announcement. Salesforce takes it from there and delivers it to every subscriber. Notice what’s not in this code: no list of who should hear it, no addresses, no waiting for a reply. You announced; you’re done.
Who’s listening?
Subscribers can live in several places, and that’s part of the beauty:
- An Apex trigger on the event can run logic right inside Salesforce when it fires.
- A Flow can subscribe and react with clicks instead of code.
- An external system — through MuleSoft or a direct subscription — can listen and react outside Salesforce entirely.
So one published event can update a record, notify a partner system, and feed a real-time data pipeline, all at once, with the publisher never knowing the difference. When many systems need to hear the same announcement, this is far cleaner than wiring each one by hand.
Why this matters for integration
Platform events are an outbound flow in spirit — Salesforce reaching out to announce something — but with a twist: it reaches out to everyone interested at once, instead of one named recipient. That makes it ideal when you don’t know in advance who’ll need the news, or when that list might grow over time.
It also fits the assume-failure mindset. Because the publisher and subscriber are decoupled, a subscriber that’s momentarily down doesn’t break the publisher. The announcement was made; the listener can catch up. You’re not chaining one fragile call to another — you’re broadcasting into a system designed to absorb the bumps.
A gentle warning
Events are fire-and-forget by design. When you publish, you’re not getting an immediate answer back from each listener. So platform events are wonderful for “tell everyone this happened” and less suited to “ask one system a question and wait for the reply.” Learning which situation you’re in is half the skill. Reach for events when you want to announce; reach for a direct API call when you need an answer.
Your next step
You’ve met the announcement. Now connect it to what you already know. Read Apex Triggers Explained to see how a subscriber reacts in code, then place events in the wider landscape with Salesforce Integration for Beginners. To see events feeding live data, explore Real-Time Data in Data Cloud. More awaits in the Integration category.