Send email reminder to certifier and certifier's manager

Which IIQ version are you inquiring about?

IdentityIQ Version 8.4p1

Please share any other relevant files that may be required (for example, logs).

POC-Email-Reminder-Rule.xml (2.3 KB)

Share all details about your problem, including any error messages you may have received.

This is an email reminder rule which will send an email reminder to the certifier and the certifiers manager.

When I run this rule, it returns both identities as a list but the email reminder is only being sent to the certifier and not the manager.

I am using the default “Work Item Escalation email template”

@Priyanka_BMC Have you tried to add Additional Email Recipients Options ? I can add logic in recipient rule for manager to get notified.

Let me know if you need code samples.

@Priyanka_BMC


 this code will help you.
 import sailpoint.object.WorkItem
   

  Identity certifier = item.getNotificationOwner(context);
  if(certifier != null) {
    Identity manager = certifier.getManager();
    Identity seniorManager = new Identity();
    if(manager!=null){
      seniorManager = manager.getManager();
    }
	
	  List list=new ArrayList();
    <<< generate all emails and keep the emails into list>>
 
     return the list  
 in your code ,  incorrect part

//String itemID = "ac1818d9965a17438196ba290cb647dd"
 //ac1818d8965a16fd8196b657f631092c String itemID = item.getId() ```

Yes, I have tried and the attached rule is an email recipient rule that I had added in the additional email recipient option already which is where I had my query. :slight_smile:

Would you send me the code sample where I can send email to the certifier and the certifier’s manager?

I do not understand. Are you asking me to return the email address in the list than returning the names?

As you can see, I am returning the email address as a list having the owner (certifier) and the certifier’s manager’s emails.

But the email is being triggered to the owner (certifier) ONLY and not the manager.

Override “To” address in Certification Reminder Email Template - Compass

I am talking about Option 2

Option2:

Configure email reminder as usual and use the Additional Email Recipients option in the config and configure email reminder rule. In this case your To list will remain same but you can add additional recipients which you want via the custom rule.

Here you have item object.

import sailpoint.object.*;

     import org.apache.commons.logging.Log;

        import org.apache.commons.logging.LogFactory;

        import java.util.*;

       

        Log log = LogFactory.getLog("rule.CommonLibraries");

    

     String newOwner = "bclock";

     Identity owner = item.getOwner();

   

     if (owner != null){

       log.debug("Have current owner: " + owner.getName());

     

      Identity mgr = owner.getManager();

     

      if (mgr != null){

        log.debug("Have manager: " + mgr.getName());

      

       newOwner = mgr.getName();

      }

     }


I think this code also work, you may need to tweek little bit as per your needs.

Cheers

@pravin_ranjan I have already attached the email reminder rule in my initial post which I have added to Additional Email Recipients option.

My rule has the same logic you have given, it is still not working.

the return should be identity name or names. if you want owner + manager to notify then you have to return list with owner name + manager name. also check if both users have value in email attribute.

Yes, both users have value in email attribute.

If I run and test the rule from IIQ console, audit shows the mail was triggered for both owner and the manager. (Refer line 1 in image)

If I run the task “Check expired Work Items”, which should essentially execute the rule, it only triggers to the owner and not the manager.
(Refer line 4 in the image)

POC-Email-Reminder-Rule.xml (2.2 KB)

Formatted file.

@Priyanka_BMC try to test to redirect in file and make sure this rule will return names not ID in list. you can put some trace to print usernames.

I tested in redirect to file and it works. In lower environment we normally redirect all emails so you will not see the additional mails.

Let me know

1 Like

When I run the rule explicitly from IQ console and write it on a file, this is the output, which is correct.

To: [email protected]
Cc: [email protected]
This is correct and expected.

When the reminder is tested with the help of ‘Check expired Work Items’, the email shows incorrect To and Cc.

To: [email protected]
Cc: [email protected]
This is incorrect and not expected.

why you have additionalRecipientPresent=false ? it should be true. can you send me the certification definition template or check in your cert def object.

let me know