Posts

Using custom java code in the Saviynt Email Templates

Image
Sometimes in complex requirements, we may not able to use groovy scripts to meet the requirements in that situation we can use custom java code in the Saviynt email templates Another use case is that the subject field in Saivynt supports only 255 characters, if you have complex if-else logic which makes more than 255 characters then you can use custom java code to generate the subject line, however, make sure the custom java code returns less than 255 characters as the subject line to avoid unnecessary references issue(in audit tables?). Requirement : Generate a subject line based on the below conditions If the user's employee type is Internal then  New Personal AD Account is created for you, Account Name: [ Account display name ] otherwise New Personal AD Account is created for a user starting on [User start date in dd-MM-YYYY format], Account Name: [ Account display name ] Step 1: Create a java package and create a JAR  The source code is available in the below link https://...

Using If-else conditional logic in Saviynt Email Templates to differentiate the content of the email

Image
Sometimes we need to send different email content based on conditions that we cannot achieve using groovy script then in that situation we can use the below code to meet the requirements. Here is a sample requirement and the steps to achieve the same. Short Requirement: When a New Account is Created Trigger an Email notification to the User's private email address if the user's employee type is external, else trigger a notification to the Manager and the user and manager email content is different as described below Detailed requirement: If the user's employee type is 'External' and the user has a private email address(stored in user customproperty5) Hi ${user.firstname} ${user.lastname}, A new Personal AD account has been created for you. Your manager is ${manager.firstname} ${manager.lastname} Account name: ${account_name} Account DisplayName: ${account?.displayName} Department: ${account.customproperty12} Password: ${randompassword} Request you reset the password...