Property description
The notifications property defines notification preferences.
Minimal JSON
{
"notificationTemplateKey": "",
"recipientUserRelationTypeKey": ""
}
Nested properties
| Property | Description | Values | Mandatory |
|---|---|---|---|
key | Optional unique key of the rule. Without it, the key is derived from the rule’s scope fields (notificationTemplateKey, recipientUserRelationTypeKey, attributeTypeKey, objectTypeKey, relationTypeKey, spacePath, userRelationTypeKey). Explicit keys must be unique within the package; a duplicate key fails validation and names the key. Rules with and without an explicit key can be mixed. | string | No |
notificationTemplateKey | Key of a notification template. | string | Yes |
recipientUserRelationTypeKey | Configures recipients: specific users or user groups to receive the notifications. | string | Yes |
attributeTypeKey | Configures notifications to be sent only when specified attributes are modified. | string | No |
objectTypeKey | Configures notifications to be sent only when specified object types are modified. | string | No |
relationTypeKey | Configures notifications to be sent only when specified relation types are modified. | string | No |
spacePath | Space path including subspaces. For example, if the current space is S2 and its parent space is S1, spacePath is "S1/S2". | string | No |
userRelationTypeKey | Configures notifications to be sent only when specified user relation types are modified. | string | No |
Rule keys on export
Every rule gets a key. A rule without an explicit key gets one derived from its scope fields, and an export writes that key on every rule. An explicit key you gave at install is not preserved by an export. When the type or workflow that owns a rule is not part of the export, the rule is written under the root settings.notifications property.
Patching notification rules
A patch package accepts settings.notifications to add or delete root-level rules:
"settings": {
"notifications": [
{
"action": "delete",
"key": "approved_to_steward",
"ifPresent": true
},
{
"action": "add",
"key": "approved_to_owner",
"notificationTemplateKey": "web_socket_object_approved",
"recipientUserRelationTypeKey": "core#business_owner"
}
]
}
- Rule patches support only
addanddelete. To change a rule, delete it and add the new one. - Rule
addanddeletealso work in thenotificationsof applications, object types, attribute types, relation types and user relation types. - A
deletenames the rule by itskeyor by its full scope fields. Adeletewith neither matches nothing. - A
deleteof a rule the base package lacks is a blocking error unless the entry carries"ifPresent": true. Anaddwhosekeyduplicates an existing rule key fails validation of the merged package.