CXone Studio ASSIGN action not persisting variable for subsequent IF check

Building a script to route based on IVR input. I’m using an ASSIGN action to set a custom attribute user_intent to the result of a previous GetRESTProxy call.

ASSIGN user_intent = ${rest_response.body.data.intent}

Immediately after, an IF action checks IF ${user_intent} == 'sales'. The debug log shows the variable is empty inside the IF condition, even though the REST proxy succeeded. Is there a scope issue with assigning dynamic values to custom attributes in Studio? The variable seems to reset between actions.