
JohnP.13462 (Customer) asked a question.
So what i'm looking for is to use the Okta expressions language with multiple nested if/elseif conditions to map a specific custom attribute to an external app. So for example:
If user's primary office attribute contains AFR in Okta then populate and map with Africa in the target system
elseif user's primary office attribute contains AP in Okta then populate and map with Australia in the target system
elseif....
which will be like 50 conditions in the end to properly map this attribute with the correct value.
I have tried something like:
[String.stringContains(user.pri_office,"INT")] ? ['International'] :
[String.stringContains(user.pri_office, "AFR")] ? ['Africa']
etc.
but i get an error that the syntax is not correct.
Any help would be much appreciated.
John

@JohnP.13462 (Customer) -- Hi.
It seems to allow nested chains. Here is an example:
user.newTestAttribute == "1" ? "US" : user.newTestAttribute == "2" ? "CA" : user.newTestAttribute == "3" ? "MX" : "Not Found"
newTestAttribute value of 1 2 or 3 will return US, CA, MX if its 4 or more it returns Not Found.
I don't know what the max length is.. 50 is a lot. If you do run into problems you may want to look into using Workflows and a "lookup table".