Studio ASSIGN and IF not evaluating correctly for dynamic routing

Hey folks,

Trying to build a quick branching logic block in CXone Studio. We’ve got an ASSIGN action setting {{$.ctx.routingKey}} based on a JSON response, followed by an IF statement to check if it equals ‘premium’.

The ASSIGN seems to work fine, but the IF block always falls to the else branch. Here’s the snippet:

ASSIGN $.ctx.routingKey = {{$.data.type}}
IF {{$.ctx.routingKey}} == "premium"
 THEN route to Premium Queue
 ELSE route to General Queue

Checked the debug logs and the value is definitely ‘premium’. Any ideas why the IF isn’t picking it up? Feels like a scope issue or maybe the data type is off.