Email Template Customization- Get Identityprofile attribute

Hi,

We have a requirement where we have to check the condition that if the user belongs to the particular identity profile then send the mail else Stop it.
The template which we are using is User Invitation-Certification.
Is there any way we can check this condition i.e. to get the identityprofile of the users.

Thanks

Reading up on email templates, it looks like the only variables available to V1 template like the one you mentioned are the identity attributes of the user. One route you could take is to add a new identity attribute to each profile called “Identity Profile”. Then, for each identity profile, set the transform to be a static transform that sets the value of “Identity Profile” to be the name of the profile itself. Once you do that, each identity will have a new attribute called “Identity Profile” that will contain the name of the profile it was created from. You can then use the user.identityProfile attribute in your email template.

  1. Add a new attribute called “Identity Profile” to any identity profile. Save the profile. All identity profiles will now have this attribute.

  2. Create a new transform for each identity profile you want check in your email template. Set the value to be the name of the identity profile you will apply this to. Change the name to indicate which identity profile this specific transform will be applied to. Each identity profile will have its own transform with a unique name and value.

POST https://{tenant}.api.identitynow.com/v3/transforms

{
  "attributes": {
    "value": "Employees"
  },
  "type": "static",
  "name": "Identity Profile - Employees"
}
  1. Apply the transform to your identity profile. In this case, I set the “Identity Profile” attribute in my “Employees” profile as follows. Please note that you can choose any source and attribute and it won’t matter; the static transform will ignore it. We just need to set them so we can apply the transform.

  2. Save and preview the profile. It will now show the “Identity Profile” attribute at the bottom, set to the name of the profile.

  3. If it looks correct, apply the changes so it runs an identity refresh. Once the refresh is done, your identities will now have the identityProfile attribute available.

  4. Repeat steps 2-5 for any other profiles you want to set the “Identity Profile” attribute for.

Thanks Colin. We also thought of the same solution, seems like it is the only workaround.