<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z00006yNlFTCA0Okta Classic EngineAdministrationAnswered2021-05-17T15:30:24.000Z2021-05-12T16:34:22.000Z2021-05-17T15:30:24.000Z

RyanW.94985 (Customer) asked a question.

Custom Activation Email Expression Language Limitations

I am attempting to customize my activation email somewhat conditionally. A vast majority of the time, I want the template to signify that the normal registration process for my site is being followed. However, occasionally, I want the template to indicate that a special type of user is being created. So, essentially, said another way, I want to be able to send two types of emails from the same template. My solution was to base it off of a custom property we have on the Okta profile. This isn't possible because there are only a set number of properties that can be accessed via the template. So, my second solution was to base it off of one of the properties that can be accessed, "Locale." I create the email template with a ternary conditional based around the locale ($(user.locale == "de_LI" ? "x" : "y")). It always evaluates to "y" regardless of what is in "locale." So, I try just adding $(user.locale) to the template. Blank result. My next move was to do the same steps, but this time I use the secondEmail field. Again, the result is "y" and blank, respectively. My next move was to do the same steps, but with lastName instead. This was more successful, but it is extremely inconvenient to base a non-related-to-name conditional on a mandatory field which will be utilized in my applications down the line.

 

Other small things that I tried. I tried getting substrings of each of the fields. I tried setting the fields to lower case before comparing.

 

Any ideas on how I can make this go.


  • User15869520088343348455 (Vendor Management)

    Unfortunately, this is not possible at this point, I would recommend that you submit a feature request.

    While I was unable to find the Feature Request already listed, here's where you can submit your idea: https://support.okta.com/help/oktaideas

    This page is closely monitored by Engineering and used to filter and consider ideas for future implementation.

    Expand Post
  • RyanW.94985 (Customer)

    Andrei, thank you for your response and suggestion. For the sake of clarity, can you describe what is not possible at this point. Let me enumerate the concepts in my question so it is clear what things are in contention: 1. Being able to use a conditional within a template (I think this is possible), 2. Being able to use a custom property (I think this is the thing that is not possible), 3. Using the locale or second email address fields as the conditional item in the template, both of which Okta documents as usable. For 3, it isn't clear why I can't use those two fields in my email template when the documentation says I should be able.

    Expand Post
  • RyanW.94985 (Customer)

    Further update, as I was interested in the ideas already submitted. I did happen to stumble across a request to be able to use custom attributes. It sounds like it is planned. If the list is in order of prioritization, it doesn't seem like it is of immediate concern, though. https://ideas.okta.com/app/#/case/105794

This question is closed.
Loading
Custom Activation Email Expression Language Limitations