CXone Studio: IF action ignoring nested ASSIGN result

Trying to branch based on a JSON path value in Studio. I use an ASSIGN block to set temp_val from the previous REST response. Then the IF block checks temp_val == 'error'. It always falls to the else branch even when the value is clearly ‘error’. Debug logs show the ASSIGN output is correct, but the IF condition seems to evaluate the old null state. Is there a race condition or do I need a specific delimiter for string comparison in the expression builder?

doesn’t support dynamic variable references in the IF condition like that. You have to hardcode the literal string ‘error’ in the comparison or use a Data Lookup to validate it first. The expression builder only evaluates static values at runtime.