Click HERE to see how Saviynt Intelligence is transforming the industry. |
07/01/2024 05:21 AM
Hello,
We want to send an email notification to admin team which contains the new joiner information.
We are storing in User's customproperty56 the HRBP id (for all users).
The HRBP id is the username of a different user in the Users table.
In the email template, we want to include the firstname and lastname of the HRBP user.
We tried adding this method in the email template to pull the firstname of the HRBP (which is stored in customproperty56):
but the result is null. The firstname of our HRBP test user exists, is not null, however, in the email notification it says null.
Any ideas how we can achieve this?
Thank you,
Solved! Go to Solution.
07/01/2024 06:26 AM
07/01/2024 06:59 AM
Hello,
The email template will be attached in the endpoint:
However, right now, this is not relevant, since we are currently testing it, we trigger the email notification through a user update rule (when a customproperty is updated, then send this email notification).
The Advanced HTML/CSS flag i checked:
In the TO we have dynamic attributes.
We just want to know if it is possible to pull the firstname and lastname of a user, based on the username that is stored in a customproperty of another user.
Example:
I want to pull the firstname of user B in the email template, based on user A's customproperty56. Is this supported? If yes, could you provide an example of code that would work?
Below is the code that we used. The email notification is sent successfully, but the HRBP firstname is null in the email. In reality, in Saviynt, the firstname of the HRBP is not null.
Thank you,
Mihaela
07/01/2024 07:07 AM
Email template attached on UUR vs Endpoint level will behave differently.
did you tried hardcoding cp56
07/01/2024 07:33 AM
I tried hardcoding the cp56 in the email template, but in the email notification the firstname is still null.
HRBP: ${com.saviynt.ecm.identitywarehouse.domain.Users.get(10001234)?.firstname}
I also tried replacing customproperty56 with manger in my line of code. And it works fine, so there is clearly an issue with that customproperty56 😞
HRBP: ${com.saviynt.ecm.identitywarehouse.domain.Users.get(user?.manager)?.firstname}
It is not supported to retrieve an attribute value such as firstname directly in the email template, based on a username stored in a customproperty?
07/01/2024 07:58 AM
if its string then it should be quoted
07/01/2024 08:09 AM
I tried again and quoted the username. I tried both single and double quotes. I still got null value in the email:
HRBP: ${com.saviynt.ecm.identitywarehouse.domain.Users.get('10001234')?.firstname}
07/02/2024 04:57 AM
Hello,
Any updates on this?
Can I please get a confirmation whether the operation of pulling user data based on another user's customproperty is supported in the email templates as per the scenarion described below? If not supported, we need to find a workaround but would help a lot to have a confirmation.
Example:
I want to pull the firstname of user B in the email template, based on user A's customproperty56.
Thank you,
07/02/2024 05:56 AM - edited 07/02/2024 05:56 AM
Hi @Miha , where you hard-coded the username to get first name and last name try hardcoding userkey once.
${com.saviynt.ecm.identitywarehouse.domain.Users.get(userkey of B user)?.firstname
07/02/2024 07:11 AM - edited 07/02/2024 07:11 AM
Hey @NM ,
Thanks for the suggestion! Hardcoded userkey works 🙂 (line of code: ${com.saviynt.ecm.identitywarehouse.domain.Users.get("11")?.firstname}
But is there any way to retrieve the userkey dynamically?
Would something like below line work?
${com.saviynt.ecm.identitywarehouse.domain.Users.get(user?.userkey)?.firstname}
Thank you!
07/02/2024 07:17 AM
@Miha Try user?.customproperty?.userkey
07/02/2024 08:16 AM
${com.saviynt.ecm.identitywarehouse.domain.Users.get(users?.owner)?.firstname}
07/02/2024 08:52 AM
@NM @rushikeshvartak Yes, unfortunately, user?.customproperty?.userkey does not work 😞
@rushikeshvartak I cannot use owner not manager because the username specified in my user's customproperty56 is not the owner, not the manager. Is something else, the HR BP.
07/02/2024 09:02 AM
@Miha , did you mention the customproperty number??
user?.customproperty(number of customproperty)?.userkey
07/02/2024 10:23 AM
${com.saviynt.ecm.identitywarehouse.domain.Users.get(user?.customproperty65?.userkey)?.firstname}
07/03/2024 03:10 AM
Yep, I mentioned the CP number (customproperty56), but unfortunately it is not working 😞
07/03/2024 09:24 PM
you need to store userkey in customproperty
07/03/2024 03:16 AM