I’m trying to set up a simple branch in CXone Studio using ASSIGN and IF actions, but the logic isn’t triggering as expected. I need to route calls based on a custom attribute call_priority that comes from the IVR. The attribute is a string, either ‘high’ or ‘low’. I’m using an ASSIGN action to set a local variable local_priority to call_priority, then an IF action to check if local_priority equals ‘high’. The syntax looks right to me, but the flow always falls through to the else block. I’ve verified the attribute value is correct by logging it, and it’s definitely ‘high’ when it should be. The IF action configuration is straightforward, just a simple string comparison. I don’t see any obvious syntax errors in the Studio UI, but the branch never takes the true path. It’s frustrating because this should be a basic operation. I’ve tried trimming whitespace and forcing the string type in the ASSIGN, but nothing changes. The flow just ignores the condition entirely. Here’s the snippet of the ASSIGN and IF configuration I’m using:
{
"assign": {
"target": "local_priority",
"value": "{{call_priority}}"
},
"if": {
"condition": "{{local_priority}} == 'high'",
"trueBranch": "route_to_priority_queue",
"falseBranch": "default_queue"
}
}
The issue seems to be with how Studio handles the string comparison in the IF condition. I’ve checked the documentation, and it says string comparisons are case-sensitive, which I’ve accounted for. The attribute call_priority is definitely lowercase ‘high’. I’m not sure if there’s a hidden character or encoding issue, or if the syntax for the IF condition is slightly different than I think. I’ve also tried using the equals function instead of ==, but that didn’t help either. The flow just doesn’t branch correctly. I need to get this working before our next deployment, so any help would be appreciated. I’m stuck on this and don’t know what else to try. The logs show the variable is set, but the IF action doesn’t seem to evaluate it properly. I’m running out of ideas on how to debug this within the Studio environment. It feels like a bug, but I’m probably missing something obvious. I’ve checked the variable scope, and it should be visible to the IF action. The flow is linear, so there’s no concurrency issue. I just can’t get the branch to work.