Property description

The notifications property defines notification preferences.

Minimal JSON

{
    "notificationTemplateKey": "",
    "recipientUserRelationTypeKey": ""
}

Nested properties

PropertyDescriptionValuesMandatory
keyOptional 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.stringNo
notificationTemplateKeyKey of a notification template.stringYes
recipientUserRelationTypeKeyConfigures recipients: specific users or user groups to receive the notifications.stringYes
attributeTypeKeyConfigures notifications to be sent only when specified attributes are modified.stringNo
objectTypeKeyConfigures notifications to be sent only when specified object types are modified.stringNo
relationTypeKeyConfigures notifications to be sent only when specified relation types are modified.stringNo
spacePathSpace path including subspaces. For example, if the current space is S2 and its parent space is S1, spacePath is "S1/S2".stringNo
userRelationTypeKeyConfigures notifications to be sent only when specified user relation types are modified.stringNo

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 add and delete. To change a rule, delete it and add the new one.
  • Rule add and delete also work in the notifications of applications, object types, attribute types, relation types and user relation types.
  • A delete names the rule by its key or by its full scope fields. A delete with neither matches nothing.
  • A delete of a rule the base package lacks is a blocking error unless the entry carries "ifPresent": true. An add whose key duplicates an existing rule key fails validation of the merged package.