Skip to main content
Skip table of contents

Notification Service

Introduction

The Notification Service describes the content of Notifications through the configuration of NotificationDefinition and NotificationTemplate. Those include content that can be localized and that may be included in the notifications sent to end users. The notification content can also include reference to some of the notification event payload which includes various information.

Notification templates use Pebble as a templating engine. All functionalities available in Pebble can be used in Notification Templates.  See Pebble documentation for further details. Some custom functions and filters, specific to Memortiy, are also available.

Pebble Functions

i18n function

Usage

key argument (String, mandatory)

The i18n key to translate.

params argument (Map or List, optional)

The i18n parameters. May be a List if the template only uses "positional" parameters ({0},...)

timezone argument (String, optional)

Must be a valid zone ID. Locally overrides the time zone for date/time formats (see below)

Examples

{{ i18n("some.key") }}
{{ i18n("some.key", ["arg0", "arg1"]) }}
{{ i18n("some.key", {"arg0": "someValue", "arg1": "someValue"}) }}
{{ i18n(key="some.key", timezone="CEST") }}

Note: Standard Pebble mechanisms are available, eg. variables may be used everywhere.

Fallbacking

  • Returns null if the i18n key does not exist

    CODE
    {{object.enabledUntil | date("FULL",timezone="EET")}}
  • If the key exists:

    • Determine the closest configured locale using the LocaleResolutionClient

    • If a translation is available for this locale, use it

    • Otherwise, fall back the the default locale (as returned by the LocaleResolutionClient)

    • If there is no translation for the default locale either, return null

ISO8601 input

In addition to Date objects, the date and time formatters also accept ISO8601-formatted strings.

Timezone determination

The timezone is determined with the following precedence:

  • the timezone argument

  • the _timezone variable

  • if both are null/not set, fall back to "UTC"

Escaping

The translated message is returned as a SafeString, thus bypassing Pebble's auto escaping. However, if auto escaping is enabled, template arguments are escaped after formatting according to the default escaping strategy. This allows to use HTML tags in translation templates, while preserving safety regarding potentially untrusted arguments.

MessageFormat implementation

This uses ICU's MessageFormat implementation, which should be roughly compatible with frontend's messageformat.js. From messageformat.js website :

The ICU has an official guide for the format. Messageformat supports and extends all parts of the standard, with the exception of the deprecated ChoiceFormat.

featureUrl function

Usage

Builds an URL to access a Feature (and subFeature). Using specific objectId and query parameters can be mentionned.

String argument (featureId)

the feature Id.

Object argument (objectId)

the Managed Object Id.

Optional - String argument (subFeatureId)

the sub feature Id.

Optional - Map argument (query)

a Map containing request parameters.

Example

{{ featureUrl(featureId, objectId) }}
{{ featureUrl(featureId, objectId, subFeatureId) }}
{{ featureUrl(featureId, objectId, subFeatureId, query) }}

Workflow url functions

workflowUserTaskUrl function

Usage

Builds an URL to access a workfow user task to approve

String argument (userTaskId)

the user task id

workflowSecondaryCandidateUrl function

Usage

Builds an URL to access a workfow user task secondary candidate

String argument (userTaskId)

the user task id

workflowAdminUrl function

Usage

Builds an URL to access a workfow in the admin panel

String argument (userTaskId)

the user task id

workflowAboutMeUrlfunction

Usage

Builds an URL to access a workfow “about me” request

String argument (businessKeyType)

the business key type:

  • FEATURE_EXECUTION

  • ROLE_ASSIGNMENT_OPERATION_EXECUTION

String argument (businessKeyValue)

The business key value (feature execution id or role assignment operation execution id)

String argument (rootProcessInstanceId)

The root process instance id

Example

workflowAboutMeUrl(businessKeyType, businessKeyValue, rootProcessInstanceId)

workflowSubmittedByMeUrlfunction

Usage

Builds an URL to access a workfow “submitted by me” request

String argument (businessKeyType)

the business key type:

  • FEATURE_EXECUTION

  • ROLE_ASSIGNMENT_OPERATION_EXECUTION

String argument (businessKeyValue)

The business key value (feature execution id or role assignment operation execution id)

String argument (rootProcessInstanceId)

The root process instance id

Example

workflowSubmittedByMeUrl(businessKeyType, businessKeyValue, rootProcessInstanceId)

objectForI18n function

Usage

Builds a new object with attribute names prefixed by 'object__', to comply with the object i18n conventions.

Object argument (object)

the Citadel Managed Object to work on.

Example

{{ objectForI18n(object) }}
{{ objectForI18n({"arg0": "someValue", "arg1": "someValue"}) }}

asset function

Usage

asset function generates the content for the src attribute of an <img> tag.

This function simplifies the process of embedding assets within your HTML content by dynamically creating the appropriate src value based on the provided arguments.

id argument (String, mandatory)

The unique identifier of the asset to be added to the notification. This id should correspond to an existing asset id.

mode argument (String, mandatory)

Specifies the format in which the asset is to be included in the notification.

Acceptable values are:

  • BASE64: Embeds the asset directly within the notification using base64 encoding.

  • CID: Links the asset using a content ID (CID), which references the asset in the notification.

Example:

{{asset(id="assetId",mode="attachementMode")}}

Example Usage in html template:

For asset id primaryLogo and CID attachement mode.

<img src='{{asset(id="primaryLogo",mode="CID")}}'/>

Fallbacking

  • If the specified asset exists, it will be added to the notification according to the specified mode.

  • If the asset does not exist, the notification will still be sent, but without the asset.

Notes

  • BASE64 mode is not compatible with Outlook. If you are targeting recipients using Outlook, consider using the CID mode.

  • Ensure that the asset id provided is correct and that the asset exists in the system to avoid notifications being sent without the intended asset.

Pebble Filters

date filter

Enhancement of the built-in filter with the following niceties:

  • Accept ISO8601-formatted strings in addition to Date objects when no format is specified

  • Use ICU's SimpleDateFormat, for coherence with the i18n function

  • Additional timezone argument. Timezone is determined the same way as in the i18n function

See Pebble documentation for further details.

Example

{{object.enabledUntil | date("FULL",timezone="EET")}}

Result is : Thursday, November 19, 2020

time filter

Works as date filter, but to format times:

  • Accept ISO8601-formatted strings in addition to Instant objects when no format is specified

  • Use ICU's SimpleDateFormat, for coherence with the i18n function

  • Additional timezone argument. Timezone is determined the same way as in the i18n function

Example

{{object.enabledUntil | time("FULL",timezone="EET")}}

Result is : 4:28:00 PM GMT+02:00

objectToString  filter

Usage

Uses an IM object as translation parameters for a given key, prefixing them with object__, as objectForI18n  would do. If no translation key is specified, it will use the standard "excerpt" key.

Internally, it calls the i18n  function, so everything regarding escaping, timezone, etc. applies.

key argument

The translation key to use. If null or empty, fall back to ui.model.<object kind>.{{object type.excerpt.

timezone argument

Overrides the timezone to use when formatting dates. See i18n function.

Example

{{ someImObject | objectToString }}
{{ someImObject | objectToString("some.translation.key") }}
{{ someImObject | objectToString("some.translation.key", timezone="CEST") }

Notification Actors

Multiple events need to be sent by Memority at different times to different actors.

An actor is identified by its role, which is determined by the context at the time of the notification.

The list of well known actors roles are:

  • subject: the identity that is authenticated when sending the notification, may not be the requester (for example, the BUM service may authenticate on the IDM to perform an operation on behalf of an actual person, which will be the requester - see below)

  • requester: the original subject which is responsible for the notification event.

  • identity: the identity that is the target of an operation that triggers the notification.

  • system: the system user, which is a service local "user" representation present for technical needs.

The system actor is, with Memority, always available in the notification event. Its properties are constructed from the settings in the IDM and BUM under idm.system.user.* and bum.system.user.* respectively. Defaults should be updated.

Notification Variables

Those are properties that are accessed directly from the Pebble template. Which variables are available depend on the Notification Event Type.

actors variable

Contains the actors, information, organized by Role. Because there can be multiple actors with the same roles, there a list of actors for each role.

An Actor is not an Object. It provides only a simple set of information, and sometimes an actor may not even correspond to a Memority identity. Their purpose is to provide just enough information to identify the person and its contact information (to send him/her the notification).

The properties available for an Actor are:

  • role

  • name

  • uid

  • email

  • phone (may be null)

  • language (may be null)

Example

Hello!, Your manager {{ actors['requester'][0].name }} has requested a Role for you:

base_URL_USR variable

Contains the Settings value for the key portal.usr.base-url

Example

<a href="{{base_URL_USR}}/myAppsFeatureID">myAppsFeatureID1</a>

Result is : myAppsFeatureID1

==> with target http://usr.memority.fr/default/myAppsFeatureID

base_URL_ADM variable

Contains the Settings value for the key portal.adm.base-url

Example

<a href="{{base_URL_ADM}}/myAppsFeatureID">myAppsFeatureID1</a>

Result is : myAppsFeatureID1

==> with target http://adm.memority.fr/default/myAppsFeatureID

OBJECT variable

Contains the current Object, for example the identity

Example

{{OBJECT.firstName}}

Result is : John

ORIGINAL_OBJECT variable

Contains the current Object, for example the identity, before updates

Example

{{ORIGINAL_OBJECT.firstName}}

Result is : Jhon

VARS variable

Contains the variables for the current workflow

Example

{{VARS.shouldSkip}}

Result is : false

overriddenDestination variable

Contains destination when it is overridden in particular cases (myMFA enrollment request, reset password)

Example

{{overriddenDestination}}

Result is : email@myhost.example

Others variables for Notification payload

Contains the variables for the specific Notification Event Type

Example

Your password will be expired in {{days}} days

Result is : Your password will be expired in 3 days

Combining i18n and templating

An i18n value containing templating can be reused in a Notification Template to be amended.

Example of i18n key : ui.model.attributes.b2bDateContractValidity

 {object__b2bDateContractValidity,date,FULL} {object__b2bDateContractValidity,time,HH:mm}

Example of Notification Template

{{ object | objectToString("ui.model.attributes.b2bDateContractValidity",timezone="Europe/Paris") }}

Result sent in email

vendredi 18 décembre 2020 15:55

Notification Type Events 

Below the list of notification types which correspond to a specific business use case in the system :

Notification event type

Location

Actors

Payload contains ...

Context

Description

CITADEL_IDENTITY

IDM

senders

  • system

recipients

  • identity

The identity object.

Variables:

  • OBJECT

  • requester

TODO

TODO

CITADEL_IDENTITY_CREATION

IDM

senders

  • system

  • requester

recipients

  • requester

  • identity

The newly created identity object

Variables:

  • OBJECT

  • requester

Business Policy on CREATE event (in actions)

When a new identity is created

CITADEL_IDENTITY_PATCH

IDM

senders

  • system

  • requester

recipients

  • requester

  • identity

The patched identity object

Variables:

  • OBJECT

  • requester

Business Policy on PATCH event (in actions)

When an identity is patched

CITADEL_IDENTITY_DELETE

IDM

senders

  • system

  • requester

recipients

  • requester

  • identity

The deleted identity object

Variables:

  • OBJECT

  • requester

Business Policy on DELETE event (in actions)

When an identity is deleted

CITADEL_ORGANIZATION_CREATION

IDM

senders

  • system

  • requester

recipients

  • requester

The newly created organization object

Variables:

  • OBJECT

  • requester

Business Policy on CREATE event (in actions)

When a new organization is created

CITADEL_ORGANIZATION_PATCH

IDM

senders

  • system

  • requester

recipients

  • requester

The patched organization object

Variables:

  • OBJECT

  • requester

Business Policy on PATCH event (in actions)

When an organization is patched

CITADEL_ORGANIZATION_DELETE

IDM

senders

  • system

  • requester

recipients

  • requester

The deleted organization object

Variables:

  • OBJECT

  • requester

Business Policy on DELETE event (in actions)

When an organization is deleted

CITADEL_RESOURCE_CREATION

IDM

senders

  • system

  • requester

recipients

  • requester

The newly created resource object

Variables:

  • OBJECT

  • requester

Business Policy on CREATE event (in actions)

When a new resource is created

CITADEL_RESOURCE_PATCH

IDM

senders

  • system

  • requester

recipients

  • requester

The patched resource object

Variables:

  • OBJECT

  • requester

Business Policy on PATCH event (in actions)

When an resource is patched

CITADEL_RESOURCE_DELETE

IDM

senders

  • system

  • requester

recipients

  • requester

The deleted resource object

Variables:

  • OBJECT

  • requester

Business Policy on DELETE event (in actions)

When an resource is deleted

CITADEL_ROLE_CREATION

IDM

senders

  • system

  • requester

recipients

  • requester

The newly created role object

Variables:

  • OBJECT

  • requester

Business Policy on CREATE event (in actions)

When a new role is created

CITADEL_ROLE_PATCH

IDM

senders

  • system

  • requester

recipients

  • requester

The patched role object

Variables:

  • OBJECT

  • requester

Business Policy on PATCH event (in actions)

When an role is patched

CITADEL_ROLE_DELETE

IDM

senders

  • system

  • requester

recipients

  • requester

The deleted role object

Variables:

  • OBJECT

  • requester

Business Policy on DELETE event (in actions)

When an role is deleted

CITADEL_INWEBO_DEVICE_ENROLLMENT_LINK

BUM

senders

  • system

  • requester

recipients

  • requester

  • identity

Variables:

  • OBJECT

  • enrollmentLink

  • overriddenDestination

  • requester

InWeboDeviceEnrollmentWidget, when an enrollment link is sent (as configured on the widget).

When an enrollment link need to be sent to the identity

CITADEL_INWEBO_UNLOCK_PIN_CREATION

BUM

senders

  • system

  • requester

recipients

  • requester

  • identity

Variables:

  • OBJECT

  • unlockPin

  • requester

InWeboUnlockWidget, when an unlock PIN is sent to a User (as configured on the Widget)

When a myMFA device unlock request has been generated (with unlock pin generation)

CITADEL_PASSWORD_EXPIRATION_ALERT

IDM

senders

  • system

recipients

  • identity

Variables:

  • OBJECT

  • days (the number of days before expiration)

PasswordNotificationsJob, when an identity's password is about to expire and a notification has been configured in the Password Policy

When the identity password is about to expire

CITADEL_PASSWORD_SET

IDM

senders

  • system

  • requester

recipients

  • requester

  • identity

Variables:

  • OBJECT

  • password

When a PasswordPolicy is configured to auto-generate a Password on method activation and a notification is configured.

Note: only used on auto-generation. If you want send a notification when the password is set externally, you can either:

  • use an Action on a Feature

  • use an Action on a Business Policy

CITADEL_PASSWORD_RECOVERY

IDM

senders

  • system

  • requester

recipients

  • identity

  • requester

Variables:

  • link

CITADEL_PASSWORD_UNSET

IDM

senders

  • system

  • requester

recipients

  • requester

  • identity

Variables:

  • reason (the reason of why password was unset)

CITADEL_PASSWORD_CHANGED

IDM

senders

  • system

  • requester

recipients

  • requester

  • identity

CITADEL_PUBLIC_ACCESS_SUCCESS

BUM

senders

  • system

  • identity

recipients

  • identity

A link for a token access on the USR portal

Variables:

  • OBJECT

  • link

  • requester

When a Public Access succeeds, it sends the configured notifications using this type.

When a user identifies himself on a public page

CITADEL_PUBLIC_ACCESS_FAILURE

BUM

senders

  • system

  • identity

recipients

  • identity

A link for a token access on the USR portal

Variables:

  • OBJECT = identity (if user exists)

When a Public Access fails, it sends the configured notifications using this type.

When a user fails to identify himself on a public page (user doesn't exist or bad credentials)

CITADEL_RESET_PASSWORD

BUM

senders

  • system

  • requester

recipients

  • requester

  • identity

The new password

Variables:

  • OBJECT

  • password

  • overriddenDestination

  • requester

When a PasswordResetWidget is used to reset a password and the password shall be sent by notification.

When a password is reset

CITADEL_RESET_PASSWORD_LINK

BUM

senders

  • system

  • requester

recipients

  • requester

  • identity

An access link to the USR portal for changing the user password

Variables:

  • OBJECT

  • resetLink

  • overriddenDestination

  • requester

When a PasswordResetWidget is used to reset a password and the reset must be performed using an access code and a link is sent by notification

When a reset password link is requested.

CITADEL_ACCESS_CODE_CREATION

BUM

senders

  • system

  • requester

recipients

  • requester

  • identity

An access link to the USR portal

Variables:

  • OBJECT

  • link

  • requester

When an AccessCode is created using the API and a notification is sent with a link to access it.

When a new access code is sent by a groovy script

CITADEL_AUTH_METHOD_ACTIVATED

IDM

senders

  • system

  • requester

recipients

  • identity

  • requester

The identity object

Variables:

  • OBJECT

When password authentication method is activated (automatically or through an action) => status is transitioned to ENABLED

ONLY IF NO PASSWORD HAS BEEN GENERATED, OTHERWISE SEE "CITADEL_PASSWORD_SET"

CITADEL_AUTH_METHOD_DEACTIVATED

IDM

senders

  • system

  • requester

recipients

  • identity

  • requester

The identity object

Variables:

  • OBJECT

When password authentication method is deactivated (automatically or through an action) => status is transitioned to DISABLED

CITADEL_FEATURE_EXECUTION

BUM

senders

  • system

  • requester

recipients

  • identity, requester

Variables:

  • OBJECT

  • fields

  • featureId

  • objectPatch

  • operation

  • requester

Feature actions

When sending a notification through a Feature Operation Action

CITADEL_ROLE_PUBLICATION_CREATION

BUM

senders

  • system

  • requester

recipients

  • requester

Variables:

  • OBJECT

  • requester

CITADEL_ROLE_PUBLICATION_PATCH

BUM

senders

  • system

  • requester

recipients

  • requester

Variables:

  • OBJECT

  • requester

CITADEL_ROLE_PUBLICATION_DELETE

BUM

senders

  • system

  • requester

recipients

  • requester

Variables:

  • OBJECT

  • requester

CITADEL_WORKFLOW_USER_TASK__ROLE_ASSIGNMENT_OPERATION_EXECUTION

BUM

senders

  • system

recipients

  • all identity link types + previousApprover, requester, userTaskActor and identity

See Identity link types

Variables:

  • userTaskId

  • bpmnTaskId

  • workflowId

  • userTaskLink

  • requester

  • beneficiary

  • role

  • roleAssignmentChanges

  • operation

  • currentRoleAssignment

  • operationComment

Optional variables:

  • rejectionReason (for reject operation only)

  • dueDate (may be null)

CITADEL_ROLE_ASSIGNMENT_MANUAL_PROVISIONING_POLICY_CANCEL_OPERATION_EXECUTION

BUM

senders

  • system

recipients

  • all identity link types, requester and identity

See Identity link types

Variables:

  • userTaskId

  • bpmnTaskId

  • workflowId

  • userTaskLink

  • requester

  • beneficiary

  • role

  • roleAssignmentChanges

CITADEL_WORKFLOW_USER_TASK__FEATURE_EXECUTION

BUM

senders

  • system

recipients

  • all identity link types + previousApprover, requester, userTaskActor and identity

See Identity link types

Variables:

  • userTaskId

  • bpmnTaskId

  • featureId

  • workflowId

  • userTaskLink

  • fields

  • attributes

  • originalAttributes

  • requester

  • beneficiary

  • operation

  • operationComment

Optional variables:

  • rejectionReason (for reject operation only)

  • dueDate (may be null)

DOMINO_SYNC_REPORT_PUBLICATION

SYNC

senders

  • domino_task_report_sender

recipients

  • domino_task_report_recipient

  • domino_task_report_replyto

Variables:

  • numberOfGeneratedWarnings

  • numberOfEntriesToProcess

  • numberOfProcessedEntries

  • numberOfIgnoredEntries

  • numberOfCreatedIdmObjects

  • numberOfUpdatedIdmObjects

  • numberOfDeletedIdmObjects

  • numberOfInactivatedApplicationObjects

  • startDate,processingTimeMillis

  • endDate

  • tenant

  • status

  • numberOfSoftDeletedIdmObjects

  • numberOfDeactivatedIdmObjects

Additionally, if a threshold is exceeded during a synchronization operation, the following variables are available:

  • thresholdExceeded

    • true (boolean) if any thresholds was exceeded

  • createThreshold, updateThreshold, deleteThreshold, disappearThreshold

    • the configured thresholds for the task (a number)

  • createThresholdExceeded, updateThresholdExceeded, deleteThresholdExceeded, disappearThresholdExceeded

    • true (boolean) if the related threshold is exceeded

  • createAttempt, updateAttempt, deleteAttempt, disappearAttempt

    • the original import number that exceeds the threshold

DOMINO_PROV_REPORT_PUBLICATION

SYNC

senders

  • domino_task_report_sender

recipients

  • domino_task_report_recipient

  • domino_task_report_replyto

Variables:

  • numberOfGeneratedWarnings

  • numberOfEntriesToProcess

  • numberOfProcessedEntries

  • numberOfIgnoredEntries

  • numberOfCreatedAccounts

  • numberOfUpdatedAccounts

  • numberOfDeletedAccounts

  • startDate

  • processingTimeMillis

  • endDate

  • tenant

DOMINO_ACCOUNT_DISCOVERY_REPORT_PUBLICATION

SYNC

senders

  • domino_task_report_sender

recipients

  • domino_task_report_recipient

  • domino_task_report_replyto

Variables:

  • numberOfGeneratedWarnings

  • numberOfEntriesToProcess

  • numberOfProcessedEntries

  • numberOfIgnoredEntries

  • numberOfLinkedAccounts

  • numberOfUnlinkedAccounts

  • numberOfOrphanedAccounts

  • startDate

  • processingTimeMillis

  • endDate

  • tenant

  • taskId

  • status

Identity link types

Possible values for identity link types are : 

  • assignee

  • candidate

Read Next

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.