Notification for non person account update

Which IIQ version are you inquiring about?

Version 8.3

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

Currently, there are no notifications sent to non-person account owners after any changes are done to the account like owner update, end date update etc.
Notification should be configured with old value and new value for all the updated attributes.

How can I avail this requirement please help me with this

You can look into the Identity Update workflow (Global Settings > Identities > Identity update); you can customize the OOTB version to get the differences in value and configure notifications. Please note that enabling this workflow will affect globally.
You can also write a custom lifecycle event, with a trigger rule and custom workflow.

Already identity update settings enabled here can u help me in writing a custom lifecycle event with a trigger rule and custom workflow

Hi,

To integrate the email notification method and the lifecycle event triggering the workflow, you can follow these steps:

  1. Create the Email Notification Method: You already have the code snippet for sending an email notification. Ensure this method is available in your class:
 public static void sendEmailNotification(String templateName, String toRecipient, Map<String, Object> variables) throws GeneralException {
         SailPointContext context = SailPointFactory.getCurrentContext();
         EmailTemplate emailTemplate = context.getObjectByName(EmailTemplate.class, templateName);
         EmailOptions emailOptions = new EmailOptions();
         emailOptions.setTo(toRecipient);
         emailOptions.setVariables(variables);
         context.sendEmailNotification(emailTemplate, emailOptions);
     }
  1. Create the Lifecycle Event: Define a lifecycle event that will trigger when certain conditions are met. This event should be linked to your workflow.
  2. Access Event Object in Workflow: In your workflow, you will have access to the event object that contains the old and new values of the identity.
 Identity newIdentity = event.getNewObject();
 Identity previousIdentity = event.getOldObject();
  1. Trigger Email Notification in Workflow: Use the information from the event object to send an email notification. You can customize the email based on changes detected between the old and new identity objects.

Here is an example of how you can integrate these steps within a workflow:

 public void workflowMethod(Event event) throws GeneralException {
     Identity newIdentity = event.getNewObject();
     Identity previousIdentity = event.getOldObject();
     
     String templateName = "YourEmailTemplate";
     String toRecipient = newIdentity.getEmail();
     Map<String, Object> variables = new HashMap<>();
     variables.put("enddate_newValue", newIdentity.getStringAttribute("enddate"));
     variables.put("endDate_oldValue", previousIdentity.getStringAttribute("enddate"));
 
     // Send the email notification
     sendEmailNotification(templateName, toRecipient, variables);
 }

EmailTemplate example:

 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE EmailTemplate PUBLIC "sailpoint.dtd" "sailpoint.dtd">
 <EmailTemplate name="YourEmailTemplate">
     <Body>
         &lt;html lang="de"&gt;
         &lt;head&gt;
         &lt;meta charset="UTF-8"/&gt;
         &lt;style type="text/css"&gt;
         @font-face{
         font-family:'montserratregular';
         font-display:auto;
         font-weight:400;
         font-style:normal}
 
         pre{
         font-family: 'montserratregular',sans-serif;
         }
         &lt;/style&gt;
         &lt;/head&gt;
         &lt;body&gt;
         &lt;pre&gt;
         Hi
 		Your text... $enddate_newValue
 		.... $enddate_oldValue
         Best regards,
 		XYZ
 
 
     </Body>
     <Description>
         Email Template for ...
     </Description>
     <Signature>
         <Inputs>
             <Argument name="enddate_newValue" type="String">
                 <Description>Desc</Description>
             </Argument>
             <Argument name="enddate_oldValue" type="String">
                 <Description>Desc.</Description>
             </Argument>
         <Argument name="anyAdditionalVariable" type="String">
                 <Description>TDesc</Description>
             </Argument>
           </Inputs>
     </Signature>
     <Subject>Test text: $anyAdditionalVariable</Subject>
 </EmailTemplate>
4 Likes

Thank you i will try these methods and let u know

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.