Newer Version Available

This content describes an older version of this product. View Latest

Analytics Notification

Get information about (GET), save changes to (PUT) or delete (DELETE) a specific analytics notification.

Syntax

URI
/vXX.X/analytics/notifications/analytics notification ID
Formats
JSON
HTTP methods
Method Description
GET Returns information about a specific notification.
PUT Save changes to the analytics notification as specified in the request body.
DELETE Delete the analytics notification. Deleted notifications can't be recovered.
Parameters
Parameter Description
source Required for GET calls. Specifies what kind of analytic notification to return. Valid values are:
  • lightningReportSubscribe — report subscriptions
  • waveNotification — Wave notifications
recordId Optional. Return notifications for a single record. Valid values are:
  • reportId— Unique report ID
  • lensId— Unique Wave lens ID

GET Response Body

Property Type Description
active Boolean Indicates whether the notification is being sent (true) or not (false).
configuration WaveConfiguration[] Describes details of a Wave notification. Only applicable when source is waveNotification.
createdDate DateTime Date and time when the notification was created (in ISO 8601 format).
deactivateOnTrigger Boolean Indicates whether the notification is deactivated after it's sent (true) or not (false). Deactivation doesn't delete the notification.

The default value is false.

id String Unique notification ID.
lastModifiedDate DateTime Date and time when the notification was last modified (in ISO 8601 format).
name String Display name of the notification.
recordId String Unique ID of the record that the notification describes. Valid values are:
  • reportId
  • lensId
runAs runAs The person who runs the report in a report subscription. Report recipients see data in the emailed report that this person has access to in Salesforce.

Available in API version 40.0 and later. Only appears if you have the “Subscribe to Reports: Add Recipients” user perm.

schedule Schedule Details about the notification's schedule.
source String Indicates the type of notification. Possible values are:
  • lightningSubscribe — report subscriptions
  • waveNotification — Wave notifications
thresholds Threshold[] Specifies what happens when the notification runs. For example, sending an email with report results.
runAs
Property Type Description
id String The person’s unique Salesforce user ID.
name String The person’s first and last name.
Schedule
Property Type Description
frequency String How frequently the notification is invoked. Possible values are:
  • daily — Every day
  • weekly — One or more days each week
  • monthly — One or more days each month
frequencyType String Only necessary when frequency is monthly. Possible values are:
  • relative — Days which can change month-to-month, as described by details.
  • specific — Fixed monthly dates, as described by details.
details ScheduleDetail[] Describes the notification schedule. Varies depending on whether frequency is daily, weekly, or monthly.
ScheduleDetail (frequency is daily)
Property Type Description
time Integer The hour of the day at which the notification is invoked. Possible values are integers from 0 to 23.
ScheduleDetail (frequency is weekly)
Property Type Description
time Integer The hour of the day at which the notification is invoked. Possible values are integers from 0 to 23.
daysOfWeek String[] The days of the week on which the notification is invoked. Possible values are:
  • mon — Monday
  • tue — Tuesday
  • wed — Wednesday
  • thu — Thursday
  • fri — Friday
  • sat — Saturday
  • sun — Sunday
ScheduleDetail (frequency is monthly, frequencyType is relative)
Property Type Description
time Integer The hour of the day at which the notification is invoked. Possible values are integers from 0 to 23.
weekInMonth String The week in the month during which the notification is invoked. Possible values are:
  • first — First week
  • second — Second week
  • third — Third week
  • fourth — Fourth week
dayInWeek String The day of the week on which the notification is invoked. Possible values are:
  • mon — Monday
  • tue — Tuesday
  • wed — Wednesday
  • thu — Thursday
  • fri — Friday
  • sat — Saturday
  • sun — Sunday
  • weekday — Weekday
  • weekend — Weekend day
ScheduleDetail (frequency is monthly, frequencyType is specific)
Property Type Description
time Integer The hour of the day at which the notification is invoked. Possible values are integers from 0 to 23.
daysOfMonth Integer[] The days of the month on which the notification is invoked. Possible values are integers from 1 to 31, and -1 (which represents the last day of the month).
Threshold
Property Type Description
type String Specifies when the notification is invoked (other than date and time criteria). Possible values are:
  • always — Always invoke the notification
  • onError — Invoke the notification when there is an error
  • condition — Invoke the notification based on criteria described by conditions
conditions Condition[] Describes conditions that govern when the notification is invoked.
actions Action[] Specifies what action is taken when the notification is invoked.
Condition
Property Type Description
colName String The data field which is operated on.
value String The comparison value which is used by the operation.
operation String The operation which is used to evaluate the condition. Possible values are:
  • equalcolName and value are equal
  • notEqualcolName and value are not equal
  • greaterThancolName is greater than value
  • lessThancolName is less than value
  • greaterThanEqualcolName is greater than or equal to value
  • lessThanEqualcolName is less than or equal to value
Action
Property Type Description
type String The type of action to perform when the notification is invoked. Possible values are:
  • sendEmail — Send an email to recipients
configuration Configuration Specifies important attributes for resources related to the notification.
Configuration
Property Type Description
recipients Recipient[] A list of users, roles, and groups who receive the notification.
Recipient
Property Type Description
id String Specifies who receives the notification. Valid values are the unique id of a user, role, or group.
displayName String The displayName of the user, role, or group.
WaveConfiguration
Property Type Description
anchor String Optional. The Id of the Wave dashboard widget to which the notification is anchored.
filter String Optional. Description of selected filters at the time of notification creation.
query String Required. SAQL query which is run when the notification is invoked.
datasets WaveDataset[] Required. Collection of Wave datasets referenced by the notification.
WaveDataset
Property Type Description
id String Required. Id of the Wave dataset.
name String Optional. Developer name of the Wave dataset.
namespace String Optional. Namespace of the Wave dataset.

PUT Request Body

A notification object with desired changes.

Uses the same format as the GET response body.

PUT Response Body

An analytics notification object reflecting saved changes.

Uses the same format as the GET response body.

DELETE Response Body

The analytics notification is deleted, and can't be recovered.

Returns an empty response body.