Salesforce Platform Events Troubleshooting: 3 Failure Modes to Investigate

A platform event fired. The publish succeeded. And the thing that was supposed to happen next — the invoice posted to the billing system, the fulfilment record created, the notification sent — did not happen. Nobody got an error. The Subscriptions list still says Running. Most Salesforce Platform Events troubleshooting starts right here, and the useful question is not "are platform events reliable?" It is "which of the three places this breaks am I actually in?"

This article examines two problems practitioners reported publicly in 2026 and a third failure mode described in Salesforce documentation. It also discusses supplied screenshots from a controlled callout test. The test does not reproduce either reported incident, and the three sections are not three independently tested repairs.

Start here: match the symptom to a path

What you are seeing Most likely layer Go to
Callout from a subscriber fails on credentials or permissions; works fine as you in Developer Console Execution identity of the subscriber Problem 1
You have uncommitted work pending. Please commit or rollback before calling out Transaction boundaries in the publishing transaction Problem 2
Some events in a burst were processed, later ones silently were not; subscription still shows Running Uncaught exception inside the trigger batch Problem 3

A test sequence you can run yourself

The findings in Problem 2 come from a short series of anonymous Apex executions we ran in a Salesforce Trailhead Developer Edition org on 2 December 2026, using a fictional account (Northwind Freight Co) and a throwaway endpoint. The supplied manuscript describes synthetic records and a rolled-back write. Run any reproduction only in an approved test environment, after checking its automation and authorizing the endpoint. The package contains screenshots, but no raw execution logs or complete test receipt.

Use the control to investigate transaction behavior before changing production. It cannot identify credential, publication or subscriber faults on its own; each needs its own evidence.

Problem 1: your subscriber is running as a user you never chose

In a Salesforce Stack Exchange question dated September 28, displayed as a current-year post when inspected in December 2026, a developer described a platform event trigger that needs to call an authenticated API through Named and External Credentials. The obstacle: the Automated Process User — the default running user for platform event triggers — does not have access to the External Credential, and the normal Setup interface does not expose a route to assign it one. The author asked which of two workarounds Salesforce actually intends. The question drew one answer and a comment; no accepted-answer marker and no author retest were visible when we read it.

This is an implementation obstacle a practitioner hit, not evidence of a platform defect — and the repair below is Salesforce's documented route rather than something we reproduced in our own org.

Why it happens

An Apex platform event trigger does not run as the user who published the event. It runs as Automated Process unless you override that. The identity matters even though the trigger executes in system context, because the running user determines record ownership and audit fields, which debug logs are generated, and — the part that bites here — which credential principals the process can reach.

The documented repair

Salesforce documents PlatformEventSubscriberConfig for overriding the running user and batch size of an Apex platform event trigger. Configure an appropriate active user and scoped credential access, then verify the identity used by the asynchronous worker. The XML below is an illustrative configuration, not deployed or tested code from this package:

<?xml version="1.0" encoding="UTF-8"?>
<PlatformEventSubscriberConfig xmlns="http://soap.sforce.com/2006/04/metadata">
    <masterLabel>InvoiceSyncSubscriberConfig</masterLabel>
    <platformEventConsumer>InvoiceSyncTrigger</platformEventConsumer>
    <user>REPLACE_WITH_ACTIVE_USER_USERNAME</user>
    <batchSize>200</batchSize>
</PlatformEventSubscriberConfig>

Replace REPLACE_WITH_ACTIVE_USER_USERNAME with an active username from your org before deployment.

Two practical notes that cost people afternoons. This is metadata, so it deploys; permission set assignments are data and do not travel with a deployment, which is why a fix that worked in one sandbox can evaporate in the next environment. And PlatformEventSubscriberConfig applies to Apex triggers only — a platform event–triggered Flow still runs as Automated Process, so for Flow subscribers the running-user override is simply not available to you.

The trap worth naming

Do not conclude that configuring credentials lets the trigger make a synchronous callout. It does not. Apex triggers cannot make synchronous HTTP callouts; the work has to move to an asynchronous path such as a Queueable or an @future(callout=true) method. Getting the credentials right and still seeing a callout exception usually means you fixed identity and left the execution path untouched.

The operational consequence is quiet: a pipeline whose publish metrics look perfectly healthy while the downstream work never completes, because the process doing that work lacks access its designer assumed it had.

Problem 2: "uncommitted work pending" — and the part we got wrong

In a Salesforce Stack Exchange question dated May 20, displayed as a current-year post when inspected in December 2026, a practitioner described an unanswered callout problem. Publishing an event with the Publish After Commit behaviour, they wrapped the publish in a savepoint. When the transaction failed, they rolled back, released the savepoint, and attempted an HTTP callout from the catch block to report the failure. The callout threw You have uncommitted work pending. Please commit or rollback before calling out. Their question was direct: should releaseSavepoint() not have prevented this?

The code as posted is abbreviated and not executable, so we could not run their exact path. We could test the general claim underneath it, which is the part most people get wrong — including, as it turned out, us.

What we expected

Our starting hypothesis was the common one: setting a savepoint and performing DML marks the transaction as having uncommitted work, and rolling back does not clear that mark, so the callout is blocked.

What actually happened

The supplied first screenshot shows an unauthorized-endpoint exception for https://example.com/health. That attempt does not establish the behavior of rollback or event publication. Endpoint authorization must be resolved before using this callout to investigate transaction behavior. It does not establish a universal order for all platform checks.

With the endpoint authorized, we established a control — the same callout with no DML in the transaction:

Execute Anonymous result dialog showing Assertion Failed: CONTROL_T2 NoDML STATUS=200

Control: callout with no DML in the transaction returns HTTP 200. The assertion is simply how we surfaced the status code on screen.

The supplied sequence below sets a savepoint, inserts a record, rolls back, releases the savepoint and calls out. It contains no EventBus.publish call. The screenshot does not show the entire executed source, so the archive does not independently establish an exact code-to-run match:

Savepoint sp = Database.setSavepoint();
insert new Account(Name = 'Northwind Freight Co');
Database.rollback(sp);
Database.releaseSavepoint(sp);

HttpRequest req = new HttpRequest();
req.setEndpoint('https://example.com');
req.setMethod('GET');
Integer s = new Http().send(req).getStatusCode();
System.assert(false, 'T1 AfterRollbackRelease STATUS=' + s);

Execute Anonymous result dialog showing Assertion Failed: T1 AfterRollbackRelease STATUS=200

After DML, rollback and releaseSavepoint, the callout succeeded with HTTP 200 — the transaction was not blocked.

The callout went through. Our hypothesis was wrong, and that is the useful finding: for ordinary DML, rolling back to a savepoint and releasing it does clear the path for a callout.

What that establishes, and what it does not

The screenshot is consistent with Salesforce's transaction-control guidance: roll back all pending DML and release active savepoints before attempting the callout. It does not establish the original poster's root cause.

No Platform Event publication was tested in this sequence. Salesforce explicitly documents that Publish After Commit events can be rolled back with savepoints and rollback. Treating their publication as work that cannot be rolled back would therefore be incorrect. Reproducing the poster's full transaction, including API version, pending work and event configuration, remains necessary.

If you are hitting this error today, the diagnostic sequence is: authorize the endpoint, run the callout alone to get a control, then add back one element at a time — DML, then savepoint, then the publish — and note which step changes the outcome. That is also how you would trace a rejected Salesforce write to its source when the downstream failure and the publication failure look identical from the outside.

One design option to evaluate is moving the callout into an appropriate asynchronous worker. This is not a verified repair for the reported incident. A queued worker can also be rolled back with the transaction that enqueued it, so a failure-reporting design must explicitly establish how its notification survives the failure it is intended to report.

Problem 3: the trigger threw, and the rest of the batch went quiet

This third section covers a documented failure mode, not a third independently verified recent practitioner complaint. Its business consequences are illustrative, and this package contains no reproduction of it.

A platform event trigger can receive a large batch — up to 2,000 event messages, against 200 for a standard object trigger. Salesforce documents that if your trigger does not catch exceptions and handle them, the trigger stops execution after an exception, and the unprocessed events from that batch cannot be retrieved again.

Three documented details make this hard to notice:

Salesforce documents resume checkpoints as a way to mark the last successfully processed event so a new invocation can resume after it. Checkpoints, transient-fault retries and permanent-failure handling have different purposes. Follow the official tested trigger template rather than swallowing errors:

Place a checkpoint only after successful processing. For transient errors, evaluate bounded retry behavior using Salesforce's checkpoint and RetryableException comparison. For permanent errors, design durable failure capture and owned recovery. An empty catch block can hide lost work; this article does not provide a tested recovery implementation.

The mechanism above is Salesforce's documented behaviour rather than something we reproduced in our test org, and the two practitioner reports we verified cover Problems 1 and 2. If you suspect this one, the subscriber position check in the next section is where to look first.

A recovery checklist for the next failed handoff

When work has gone missing, resist the urge to replay anything until you can answer these in order.

Those questions also tell you how to decide what to retry, fix or escalate rather than retrying blindly and creating duplicate downstream actions.

Can our administrator fix this?

Often, yes — and it is worth saying plainly rather than implying every event failure needs outside help.

If the symptom is isolated, understood, and reproducible, this is internal work. A missing Remote Site Setting, a permission set that needs one more principal, a subscriber with an understood error-handling defect: a capable admin or developer may be able to make a targeted repair. Complexity and effort depend on the execution path and recovery requirements. The callout incident discussed above remains unresolved; this article does not claim a verified repair for it.

The picture changes when the answer to "how many records were affected?" is a shrug. Repeated missing work, outcomes nobody can confirm, duplicate actions downstream, or a backlog with no owner are different in kind from a single broken trigger — not because they are technically harder, but because the cost of being wrong compounds quietly while everything on the dashboard looks green. These consequences are plausible for an unmonitored event pipeline; we are describing a risk pattern, not measuring your org.

What a scoped review actually investigates

If you do bring someone in, the work should be specific enough that you can tell whether it was done. A credible integration review of an event-driven workflow looks at:

That list is also a reasonable yardstick for what a scoped integration repair should include if you are comparing proposals.

Get a second opinion on your event pipeline

If the checklist above left you without a confident answer to "how many records were affected?", that is usually the point where an outside read earns its place — not because the mechanics are exotic, but because someone has to own that question while every dashboard stays green.

A consultation is a working session rather than a sales call. Bring one concrete example: the symptom you can see, the systems on either side of the handoff, and whatever evidence you already have — a debug log, a subscription state, a count of records that should exist and do not. One real handoff tells us more than an architecture diagram.

You will come away with our read on which of the three layers above your failure sits in, what we would investigate first, and a straight answer on whether this is something your own admin should simply fix. If it is, we will tell you that.

Request a consultation