NtfcnDefinition

Represents a notification definition, including the criteria that trigger the notification and the channels, recipients, and content used to deliver it. This type extends the Metadata metadata type and inherits its fullName field.

File Suffix and Directory Location 

NtfcnDefinition components have the suffix .ntfcnDefinition and are stored in the ntfcnDefinitions folder.

Version 

NtfcnDefinition components are available in API version 62.0 and later.

Fields 

description 

  • Type: string
  • Description: The description of the notification.

fullName 

  • Type: string
  • Description: Required. The unique name of the NtfcnDefinition component. Inherited from the Metadata metadata type. This field isn’t updateable.

masterLabel 

  • Type: string
  • Description: Required. The name of the notification.

notificationCriteria 

  • Type: NtfcnCriteria[]
  • Description: The criteria that determine when the notification is triggered.

notificationType 

  • Type: string

  • Description: Required. Indicates whether the notification uses a standard or custom template.

  • Possible values:

    • Standard
    • Custom

ntfcnChannelDefs 

  • Type: NtfcnChannelDef[]
  • Description: The channel definitions that specify how the notification is delivered, such as by email, Slack, or Microsoft Teams.

refObjectApiName 

  • Type: string
  • Description: The API name of the sObject associated with the notification.

referenceObject 

  • Type: string
  • Description: Required. The trigger object associated with the notification, such as Incident, Problem, ChangeRequest, or Release.

relatedObjectApiRef 

  • Type: string
  • Description: The API name of the junction object used to track associations, disassociations, and changes, such as ProblemIncident.

status 

  • Type: string

  • Description: The status of the notification.

  • Possible values:

    • Active
    • Inactive
    • Draft

triggerEventType 

  • Type: string

  • Description: Required. Indicates when the notification is sent, such as when a record is created or updated.

  • Possible values:

    • Create
    • Update
    • Child Associate
    • Child Update
    • Parent Update

usageType 

  • Type: string
  • Description: Required. The usage type of the notification. This field keeps the notification data model generic across products, such as IT Service.

NtfcnCriteria 

condition 

  • Type: NtfcnCondition[]
  • Description: The conditions that make up the notification criteria.

criteriaName 

  • Type: string
  • Description: The name of the notification criteria.

customExpression 

  • Type: string
  • Description: The custom logic expression used to evaluate the conditions in the notification criteria.

expressionType 

  • Type: string

  • Description: Required. The type of logic used to evaluate the conditions in the notification criteria.

  • Possible values:

    • And
    • Or
    • CustomLogic

NtfcnChannelDef 

active 

  • Type: boolean
  • Description: Indicates whether the notification channel is active (true) or not (false).

channelType 

  • Type: string

  • Description: Required. The channel used to deliver the notification.

  • Possible values:

    • Email
    • Slack
    • Teams
    • InApp

ntfcnChannelActionDefs 

ntfcnChannelConts 

  • Type: NtfcnChannelCont[]
  • Description: The content delivered on the notification for this channel.

ntfcnChannelRecs 

  • Type: NtfcnChannelRec[]
  • Description: The recipients of the notification for this channel.

NtfcnCondition 

fieldName 

  • Type: string
  • Description: Required. The API name of the field on the target object that’s evaluated by the condition, such as Status or Priority.

operator 

  • Type: string

  • Description: Required. The operator used to compare the field to the value.

  • Possible values:

    • Equals
    • GreaterThan
    • GreaterOrEqual
    • LessThan
    • LessOrEqual
    • Contains
    • DoesNotContain

sequenceNumber 

  • Type: int
  • Description: Required. The order in which the condition is evaluated.

value 

  • Type: string
  • Description: Required. The value that the field is compared to when the condition is evaluated.

NtfcnChannelActionDef 

label 

  • Type: string
  • Description: Required. The user-defined label of the action.

notificationActionName 

  • Type: string
  • Description: Required. The developer name of the action.

targetReference 

  • Type: string
  • Description: The reference to the ID of the action target.

targetType 

  • Type: string
  • Description: The type of action target, such as a Salesforce URL, Slack URL, in-app URL, or Microsoft Teams URL.

NtfcnChannelCont 

emailTemplate 

  • Type: string
  • Description: The email template included in the notification when the channel type is email.

messageBody 

  • Type: string
  • Description: The message body of the notification.

messageTitle 

  • Type: string
  • Description: The title, or subject, of the notification.

senderEmailAddress 

  • Type: string
  • Description: The sender email address used for email notifications.

NtfcnChannelRec 

active 

  • Type: boolean
  • Description: Indicates whether the recipient is active (true) or not (false).

recipient 

  • Type: string
  • Description: Required. The identifier of the notification recipient. The recipient can be an email address, a channel ID, or a user field on an object.

recipientType 

  • Type: string
  • Description: Required. The type of recipient, such as an email address, user field, Slack channel, in-app channel, or Microsoft Teams channel.

targetIdentifier 

  • Type: string
  • Description: The name of the destination Slack or Microsoft Teams app.

teamIdentifier 

  • Type: string
  • Description: The workspace ID or team ID of the recipient’s Slack channel or Microsoft Teams channel.

Declarative Metadata Sample Definition 

A sample XML definition of a NtfcnDefinition component is shown here.

1<ntfcnDefinition>
2    <fullName>MyNtfcnDefinition</fullName>
3    <description>sampleValue</description>
4    <masterLabel>sampleValue</masterLabel>
5    <notificationCriteria>
6        <!-- NtfcnCriteria fields -->
7    </notificationCriteria>
8    <notificationType>sampleValue</notificationType>
9    <ntfcnChannelDefs>
10        <!-- NtfcnChannelDef fields -->
11    </ntfcnChannelDefs>
12    <refObjectApiName>sampleValue</refObjectApiName>
13    <referenceObject>sampleValue</referenceObject>
14    <relatedObjectApiRef>sampleValue</relatedObjectApiRef>
15    <status>sampleValue</status>
16    <triggerEventType>sampleValue</triggerEventType>
17    <usageType>sampleValue</usageType>
18</ntfcnDefinition>

The following package.xml manifest retrieves the NtfcnDefinition component.

1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3   ~ Copyright 2020 Salesforce, Inc.
4   ~ All Rights Reserved
5   ~ Company Confidential
6-->
7<Package xmlns="http://soap.sforce.com/2006/04/metadata">
8   <types>
9      <members>*</members>
10      <name>NtfcnDefinition</name>
11   </types>
12   <version>XX.0</version>
13</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.