CXone Studio ASSIGN and IF branching logic failing

I’m trying to route calls based on a JSON payload using ASSIGN and IF actions in CXone Studio. The ASSIGN action sets a variable priority, but the subsequent IF block always falls through to the else branch. Here’s the snippet:

ASSIGN priority = json.get('priority')
IF priority == 'high' THEN
 Set Queue = 'Urgent'
ELSE
 Set Queue = 'General'
END IF

The logs show priority is populated correctly, yet the condition fails. Is there a type mismatch issue with the IF action?

Docs state: “String comparisons in Studio are case-sensitive and require explicit type handling.” Your json.get likely returns a number or a string with whitespace. Try this:

ASSIGN priority = json.get('priority').toString().trim()
IF priority == 'high' THEN

Check the type in the logs. It’s probably not a strict string match.