The Trailblazer Community in Slack is now in Open Beta—join and connect in real time. [Join us in Slack]
Notifies subscribers of Amazon CloudWatch alarm events from your Service Cloud Voice Amazon Connect instance. This object is available in API version 54.0 and later.
describeSObjects()
| Subscriber | Supported? |
|---|---|
| Apex Triggers | ![]() |
| Flows | ![]() |
| Processes | ![]() |
| Pub/Sub API | ![]() |
| Streaming API (CometD) | ![]() |
/event/RealtimeAlertEvent
Accessing this object requires Service Cloud Voice with Amazon Connect enabled.
Yes
Type: string
Properties: None
Description: Required. Description of the alert fired.
Type: datetime
Properties: None
Description: Date and time when the alert occurred. For example: 2020-12-18 21:59:48.
Type: string
Properties: None
Description: Required. Name of the alert fired.
Type: string
Properties: None
Description: More information and data associated with the alert.
Type: string
Properties: None
Description: Required. Severity of the triggered alarm. Possible values: Values are Critical, Warning, or Information. When using Amazon CloudWatch with Service Cloud Voice, the following alarm states map to severity values: Values are ALARM maps to Critical, INSUFFICIENT_DATA maps to Warning, or OK maps to Information.
Type: string
Properties: None
Description: Required. The source of the alert. For example, this value can be the service name: AWS Cloudwatch.
The following example shows how to process RealtimeAlert events. This Apex trigger example fires when a platform event message is published and creates a Chatter post on the admin profile with event details.
1trigger RealtimeAlertEventTrigger on RealtimeAlertEvent (after insert) {
2 Id profileId = [select Id from User where User.Profile.Name = 'System Administrator' limit 1].Id;
3 for(RealtimeAlertEvent e : trigger.new) {
4 Feeditem Post = New Feeditem();
5 Post.ParentId= profileId;
6 Post.Body = 'Alert occurred in the service: ' + e.Source + '\n' +
7 'Name: ' + e.Description + '\n' +
8 'Severity: ' + e.EventDateTime + '\n' +
9 'Payload: ' + e.Payload + '\n' +
10 'EventDate: ' + e.EventDateTime + '\n' +
11 'Description: ' + e.Name + '\n';
12 insert Post;
13 }
14}The code example displays as a Chatter post that contains the following:
1Alert occurred in the service: aws cloudwatch alarm
2Name: alert description
3Severity: 2021-11-05 11:11:11
4Payload: payload
5EventDate: 2021-11-05 11:11:11
6Description: alert name