Studio ASSIGN and IF not triggering for custom data attributes

We’re trying to set up some basic branching logic in a CXone Studio script. The goal is to check if a specific custom data attribute, let’s call it cust_priority, exists and has a value. If it does, we want to route to a VIP queue. If not, standard queue.

I’ve got an ASSIGN action to pull the custom data from the customer profile into a local variable local_priority. Then an IF action to check if local_priority is not empty.

The issue is the IF action always goes to the ‘false’ branch, even when I know the attribute is set. I’ve checked the data source and it’s definitely there.

Here’s the snippet for the ASSIGN:

ASSIGN local_priority = GetRESTProxy('CustomerData', 'GetCustomData', 'cust_priority')

And the IF:

IF local_priority != '' THEN route_vip ELSE route_standard

I’m pretty sure I’m missing something about how the data type is handled or maybe the timing of when the variable is populated. The docs are a bit light on this specific combo. Anyone seen this before? Does the REST proxy call return a string directly or do I need to parse it?