I’m trying to set a disposition code based on a REST call response in Studio, but the logic isn’t holding. I’ve got a GetRESTProxy action pulling back JSON. I use ASSIGN to set the variable result_code to $.body.status. Then I have an IF block checking if result_code equals success. The trace shows the variable is set, but it always falls through to the else branch.
Here’s the snippet:
ASSIGN result_code = $.body.status
IF result_code == "success"
ASSIGN final_disp = "completed"
ELSE
ASSIGN final_disp = "failed"
The trace log says result_code is "success" with quotes. I tried removing quotes in the IF condition, no luck. I tried using Equals function, still fails. Is there a type mismatch between string and the JSON return type in Studio? I’m pulling my hair out over this. It’s been 2023 for five years and we’re still guessing at string comparisons. Any ideas?