and more in a single search tool across platforms. Read the announcement here. |
11/23/2023 04:21 AM
Hi Team,
How to use If else in REST connectors.
My Use case is - We save user's country code in Cp3. But it is 2 letter country code and i need to send 3 letter so can write if elseif condition like if users.customproperty3==IN its should pass IND.
Any help would be appreciated.
Thanks
Solved! Go to Solution.
11/23/2023 06:32 AM
@anuragG try below sample
\"country\":\"${if(user.customproperty3.equals('IN')){'IND'}else {''}}\"
\"country\":\"${if(user.customproperty3=='IN'){'IND'}else {''}}\"
11/23/2023 03:32 PM
\"country\":\"${if(user?.customproperty3.equals('US')){'USA'}else if(user?.customproperty3.equals('IN')){'IND'}else {user?.customproperty3}}\"