NotificationTypeConfig

Represents the metadata associated with org-level notification settings for standard and custom notification types.

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

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

Version 

Introduced in API version 48.0.

Fields 

notificationTypeSettings 

AppSettings Type 

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

Fields 

appType 

  • Type: ConnectedAppType (enumeration of type string)
  • Required: No

connectedAppName 

  • Type: string

  • Required: Yes

  • Description: 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 

  • Type: boolean
  • Required: No
  • Description: Indicates whether a connected app is enabled (true) or not (false) for the notification type.

Additional Information 

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 Type 

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

Fields 

desktopEnabled 

  • Type: boolean
  • Required: No
  • Description: Indicates whether desktop notifications are enabled (true) or not (false).

mobileEnabled 

  • Type: boolean
  • Required: No
  • Description: Indicates whether mobile notifications are enabled (true) or not (false).

slackEnabled 

  • Type: boolean
  • Required: No
  • Description: Indicates whether Slack notifications are enabled (true) or not (false).

NotificationTypeSettings Type 

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

Fields 

appSettings 

  • Type: AppSettings[]
  • Required: No
  • Description: An array of settings for the connected apps supported for a notification type.

notificationChannels 

  • Type: NotificationChannels
  • Required: No
  • Description: Defines the delivery channels for a notification type.

notificationType 

  • Type: string

  • Required: Yes

  • Description: 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.

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.