NotificationTypeConfig

Represents the metadata associated with org-level notification settings for standard and custom notification types. This type extends the Metadata metadata type and inherits its fullName field.

File Suffix and Directory Location

NotificationTypeConfig components have the suffix .config and are stored in the notificationTypeConfig folder.

Version

NotificationTypeConfig components are available in API version 48.0 and later.

Fields

Field Name Field Type Description
notificationTypeSettings NotificationTypeSettings[] An array of delivery settings for an org’s notification types.

NotificationTypeSettings

Represents the delivery settings for a standard or custom notification type.

Field Name Field Type Description
notificationType string

Required. Specifies a notification type’s API name.

For standard notification types, this is the predefined API name of the standard notification type. For custom notification types, this is the API name of the custom notification type. If a custom notification type was installed with a managed package, it includes the namespace prefix.

Retrieve NotificationTypeConfig to see the API names of the notification types available in your org.

appSettings AppSettings[] An array of settings for the connected apps supported for a notification type.
notificationChannels NotificationChannels Defines the delivery channels for a notification type.

AppSettings

Represents the settings for the connected apps supported for a notification type.

Field Name Field Type Description
connectedAppName string Required. Specifies the API name of a connected app. If a connected app is installed with a managed package, it includes the namespace prefix.

Retrieve NotificationTypeConfig to see the API names of the connected apps supported for a notification type.

enabled boolean Indicates whether a connected app is enabled (true) or not (false) for the notification type.

If an Enhanced Connected App (ECA) and a Connected App (CA) share the same name, or if the CA has been migrated to an ECA, only the ECA is returned when you retrieve NotificationTypeConfig.

  • The CA settings aren't applied when you deploy the retrieved settings to a new org and the CA and ECA share the same name.
  • In existing orgs, app settings for CAs that share a name with an ECA or have been migrated to an ECA can't be changed via the Metadata API. To change these app settings, use the UI.

Note

NotificationChannels

Represents the settings for the delivery channels for a notification type.

Field Name Field Type Description
desktopEnabled boolean Indicates whether desktop notifications are enabled (true) or not (false).
mobileEnabled boolean Indicates whether mobile notifications are enabled (true) or not (false).
slackEnabled boolean Indicates whether Slack notifications are enabled (true) or not (false).

Declarative Metadata Sample Definition

The following is an example of a NotificationTypeConfig component.

1<NotificationTypeConfig xmlns="http://soap.sforce.com/2006/04/metadata">
2    <notificationTypeSettings>
3        <notificationType>chatter_mention</notificationType>
4        <notificationChannels>
5            <desktopEnabled>false</desktopEnabled>
6            <mobileEnabled>true</mobileEnabled>
7        </notificationChannels>
8        <appSettings>
9            <connectedAppName>Datawatch</connectedAppName>
10            <enabled>false</enabled>
11        </appSettings>
12            <appSettings>
13            <connectedAppName>package2__ConnectedApp2</connectedAppName>
14            <enabled>true</enabled>
15        </appSettings>
16    </notificationTypeSettings>
17   <notificationTypeSettings>
18        <notificationType>namespace__Custom_Notification</notificationType>
19        <notificationChannels>
20            <desktopEnabled>true</desktopEnabled>
21            <mobileEnabled>true</mobileEnabled>
22        </notificationChannels>
23        <appSettings>
24            <connectedAppName>namespace__Connected_App</connectedAppName>
25            <enabled>false</enabled>
26        </appSettings>
27        <appSettings>
28            <connectedAppName>namespace2__ConnectedApp2</connectedAppName>
29            <enabled>true</enabled>
30        </appSettings>
31    </notificationTypeSettings>
32</NotificationTypeConfig>

The following is an example of a package manifest used to retrieve all the available notification settings for an organization, by using a wildcard:

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3    <types>
4        <members>*</members>
5        <name>NotificationTypeConfig</name>
6    </types>
7    <version>48.0</version>
8</Package>

Wildcard Support in the Manifest File

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.