Skip to Content
Technical Articles

How to configure an “Expiration Alert” within an MDF Object and apply it retrospectively

Hello reader, in this blog I will describe how to create “Expiration Alerts” within MDF objects and I will add some additional considerations around them.

It is common to introduce this kind of configuration in instances where there are already created objects with associated data.
This means that even if the alerts are configured correctly, they will be applicable to newly created object values, and not retrospectively to whatever was already in the system before.

Case study: I would like Supervisors to get an alert X days before the end of any Work Order belonging to Contingent Workers directly reporting to them.
The alert configuration is correctly added to my instance today, which means that any Work Order added/edited from now on will generate the alert.
But I notice that alerts are not generated for already existing Work Orders, which means that the related Supervisors will not receive an alert.
How can I make sure alerts are generated retrospectively as well?

In order to sort this out and get the most of the alert configuration, there is a very simple workaround which will allow generating alerts retrospectively with zero risks from a data perspective.
The steps below describe both the basic implementation and workaround.

Note: this blog is specific on Expiration Alerts, but the same concepts are applicable to several other alert scenarios.

STEPS

  1. Create the Workflow
    In this step, you will create the workflow to be attached to the business rule.
    In the workflow definition, you will only specify who will receive the alert in the CC roles.

    Note: the addressee can be defined in several ways (Role, Dynamic Role, Dynamic Group, Person etc.)
  2.  

  3. Create the Alert Message
    In this step, you will create the Alert Message to be sent to the addressee previously defined.
    This is configured in Manage Data → Alert Message.

    Note: some Tokens are available in order to automatically and dynamically retrieve the related information – e.g. [[SUBJECT_USER]].
  4.  

  5. Create the Business Rule
    In this step, you will configure the Business Rule which will trigger the alert.
    In the example below, the MDF object taken into account is the Work Order for contingent workers, but as mentioned, the whole logic is applicable to any MDF Objects and even to Custom Portlets based on custom MDF Objects.
    Note: the IF Condition can be customised according to the business requirements.
    The alert creation happens in the THEN statement, which needs to be configured as per above.
    More specifically, the event “Trigger MDF Alert Event” needs to be used with the following information:
    Workflow Information: determines the addressee (the Workflow created in Step 1 will be selected).
    – Alert Due Date: determines the date when the alert will be sent. In the example above, the alert is sent 28 days prior to the Work Order End Date (Expiration).
    This feature gives you a lot of flexibility since you are able to leverage several formulas which can easily be adapted to unique business scenarios.
    Note: it is good practice to set this condition in the THEN statement rather than in the IF condition.
    – Alert Message: select the alert message and header to be sent (the Alert Message created in Step 2 will be selected).
    – Generic Object: select the relevant MDF object, in this case, Work Order.
    MDF Alert Type: select the alert type, in case you are using it (this is an optional field).
  6.  

  7. Attach the Business Rule to the Object
    Now that the business rule is ready, it needs to be attached to the relevant Object.
    This is done in Configure Object Definition → [select the relevant object].
    You will navigate at the bottom of the object and attach the business rule as a Post Save Rule:
    After the completion of this step, alerts will be triggered for any newly created MDF Objects (in this example work orders) or amendment to existing ones.
    This means that no alert would be triggered for existing objects in the system, probably leaving out many alerts which should be triggered.
    From the next step, I will describe an easy workaround applicable in this scenario in order to make sure that all alerts are triggered properly.
  8.  

  9. Extract data as a backup
    In this step, you will extract all the existing relevant object values from the system.
    This is done in Import and Export Data →  Export and then selecting the relevant object.
    In this example, I will select the Work Order object.
  10.  

  11. Create the Import File
    The background logic of this workaround is that the business rule is triggered for an existing object only in case of an amendment.
    This means that, in order to trigger the alerts, we will just need to import a dummy import file “faking” an amendment.
    The system will interpret these actions as amendments and execute the business rule to trigger the alerts.
    In order to create the dummy import file, you can use the export file exported in step 5 and make small modifications to one of the fields for each record.
    For example, if you have a text field, you could add a dot a the end of the existing value:

    Note: in case none of the fields is edited in the import file, the system will not recognize them as amendments and therefore no alert will be triggered. This means that you need to include a small modification to one of the values – e.g. a dot at the end a text field.
  12.  

  13. Partial import of the file
    In this step, you will import some of the records in order to validate the import file.
    This is good practice because, in case of any issues, you will just need to fix a limited amount of records and not all of the record listed in the import file.
    This step is done in Import and Export Data →  Import and then selecting the relevant object.
    In this example, I will select the Work Order object.
    Remember to select Incremental Load and make sure that the Effective Start date is coherent with the export file, otherwise, the risk is to create additional records.
    Also, remember always to validate the file before importing it.
  14.  

  15. Check that alerts have been correctly triggered
    The expected outcome of Step 7 is that alerts have been correctly created according to your business rule.
    In order to do so, you will navigate to the tool “Manage Alerts and Notification”, filter on your object and check the most recently created alerts which will be located on the top of the screen.
    You should find one alert per single row of the import file.

    You can also validate the alert effective date to make sure the business rule works as expected.
    In my specific case, the alerts generated should have an alert effective date 28 days prior to the Work Order expiration date.
    At this point, we should make a distinction between the Alert Creation Date and the Alert Effective Date: even though the alert has been created today, it doesn’t mean that they are sent yet.
    They will be sent on the Alert Effective Date instead.

    Note: you need to have specific Role Based Permissions to use this tool.
  16.  

  17. Import the rest of the file created in Step 6
    In this step, you will import the rest of the rows of the import file created in Step 6.
    After having validated the alerts generated in the previous steps, you are now ready to import the whole import file.
    As previously done, you will do this in Import and Export Data →  Import and then selecting the relevant object.
    In this example, I will select the Work Order object.
    Remember to select Incremental Load and make sure that the Effective Start date is coherent with the export file, otherwise, the risk is to create additional records.
    Also, remember always to validate the file before importing it.
  18.  

  19. Check that alerts have been correctly triggered
    As before, the expected outcome is that alerts have been correctly created according to your business rule.
    In order to do so, you will navigate to the tool “Manage Alerts and Notification”, filter on your object and check the most recently created alerts.
    You should find one alert per single row of the import file.
    You will also validate the alert effective date to make sure the business rule works as expected.
  20.  

  21. Disable the Business Rule
    At this point, all the records have been imported and all the alerts have been generated and validated.
    The last thing to do is to remove the dummy amendments made to the objects and restore the initial field values.
    In my case, I added a dot at the end of the custom_HomeAddress fields in Step 6, which means that in the import file I will just need to remove these dots.
    The first thing to do is disable the business rule within the Object, otherwise, at the following import, new alerts would be generated and we want to avoid this.
    This step is performed in Configure Object Definition → [select the relevant object].
    You will navigate at the bottom of the object and remove the business Rule from the Post Save Rule section.
  22.  

  23. Import the records back
    Now that the business rule has been disabled, the records can be imported back without the dummy amendment.
    The import file will be based on the export pulled during Step 5.
    Again, in this case, remember to select Incremental Load and make sure that the Effective Start date is coherent with the export file.
    You will perform this step in Export Data →  Import and then selecting the relevant object.
    In this example, I will select the Work Order object.
  24.  

  25. Check that the records are back to normal and no alert has been triggered
    This is a validation checkpoint where you will make sure that the information within the object has been brought back to the initial values and that no alert has been triggered.
    You will check this both within the object information and in “Manage Alert and Notification” tool.
  26.  

  27. Enable the Business Rule again
    Now you can enable back the rule to make sure that alerts will be triggered for any newly created MDF Objects or amendment to existing ones.
    You will just need to replicate Step 4.
  28.  

    More information

    Customers can also refer to the following Knowledge Base Articles to learn more:

    • 2156278: How to Set Up EC Alerts and Notifications Using Business Rules
    • 2532558: How to Configure MDF Alerts and Notifications for MDF Objects
    • 2757863: Manage Alerts and Notifications tool
3 Comments
You must be Logged on to comment or reply to a post.