Skip to main content
Skip table of contents

How to Send a Notification Only Once

In eADM, notifications are sent when a rule set matches a user based on specific criteria. These criteria can be based on events (e.g., "User was created") or on a selection of objects with certain attribute values (e.g., "User start date is in two days").

A problem can arise with rules based on attributes rather than events. For example, a rule to send a welcome SMS to a new employee two days before their start date might be triggered multiple times if several system synchronizations run on that day. Without an additional check, the user would receive the same message repeatedly.

To prevent this, you must add a condition to the rule set that checks if the message has already been sent. This is done using the[COUNTMESSAGESENT] function.


Procedure

Follow these steps to ensure a notification is sent only one time.

  1. Navigate to and open the rule set that triggers the notification you want to modify.

  2. Add a new rule condition with the following three parts:

    • Attribute: [COUNTMESSAGESENT; MessageID]. (E.g. [COUNTMESSAGESENT; 816])

    • Condition: is equal to

    • Argument: 0

This condition ensures the rule will only apply if the specified message has been sent zero times to the user.


Variations of the [COUNTMESSAGESENT] Function

The function can be used in several ways depending on your needs.

  1. Check for Any Message from the Rule Set. If a rule set is used for multiple messages, you can leave the message ID empty to check if any message has been sent by the rule.

Note: When using this function, the preview function in the rule set editor will not work.

  1. Allow Resending After a Specific Period. You can add a date parameter to allow the notification to be sent again after a certain amount of time has passed. For example, the expression [COUNTMESSAGESENT;816;[NOW-32]] will allow the message to be resent if the previous one was sent more than 32 days ago.

JavaScript errors detected

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

If this problem persists, please contact our support.