Newer Version Available
PlatformStatusAlertEvent
For example, suppose that a formula is evaluated as part of processing user requests. A platform event message can be generated during the processing of a user request when an error is encountered from evaluating an invalid formula.
Supported Calls
describeSObjects()
Supported Subscribers
| Apex Triggers | Processes | Flows | Streaming API (CometD) |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Streaming API Subscription Channel
/event/PlatformStatusAlertEvent
Fields
| Field | Details |
|---|---|
| ApiErrorCode |
|
| ComponentName |
|
| EventDate |
|
| EventIdentifier |
|
| ExtendErrorCode |
|
| RelatedEventIdentifier |
|
| ReplayId |
|
| RequestId |
|
| ServiceJobId |
|
| ServiceName |
|
| StatusType |
|
| SubComponentName |
|
| Subject |
|
| UserId |
|
| Username |
|
Usage
The following example shows how to trigger a platform status alert event. The event can be triggered only by internal services. This is an example of a trigger that fires when a platform event occurs and creates a chatter post on the admin profile with event details.
Example
The code example above ultimately displays as a Chatter post that contains the following:
Alert occured in the service: Next Best Action Strategy
APIErrorCode: INVALID_OPERATION
ComponentName: Strategy_for_error_event_demo
EventDate: 2018-12-18 21:59:48
EventIdentifier: null
ExtendedErrorCode: FORMULA_EXPRESSION_INVALID
RelatedEventIdentifier: null
ReplayId: 63
RequestId: TID:89715900005e40b69a
ServiceJobId: 1014fd4e-4a19-4910-be36-377a7f2f1b75
ServiceName: Next Best Action Strategy
StatusType: Error
SubComponentName: filter_node1
Subject: Something went wrong with filter element 'filter_node1': 'Unknown function ISBLANC. Check spelling.'
UserId: 005RM000001ZnzAYAS
Username: xxx@yyy.com
