CXone Studio Snippet: ASSIGN and IF logic failing to update custom attributes

Trying to understand why my branching logic in a CXone Studio snippet is not persisting the updated custom attribute values when using ASSIGN and IF actions.

I have built a Node.js Express middleware that consumes Genesys Cloud webhooks and forwards specific interaction data to a CXone instance via REST API. The flow triggers a Studio flow, which calls a specific snippet designed to route the call based on customer tier. The issue is that the IF condition inside the snippet evaluates to false, even though the payload clearly contains the expected value.

Here is the relevant portion of the Studio Snippet configuration:

  1. GetRESTProxy: I fetch the customer details from an internal API. The response includes a tier field.
  2. ASSIGN: I assign the value of the tier field from the REST response to a new flow variable {{flow.customer.tier}}.
  • Source: {{restProxy.response.body.tier}}
  • Target: {{flow.customer.tier}}
  1. IF: I check if {{flow.customer.tier}} equals "PLATINUM".
  • Condition: {{flow.customer.tier}} == "PLATINUM"
  • True Path: Route to Platinum Queue
  • False Path: Route to General Queue

The problem is that every call goes to the False Path. I have verified via debug logs in my Node.js service that the REST proxy is returning {"tier": "PLATINUM"}. However, the IF action in Studio seems to evaluate the variable as empty or null.

Is there a specific scope issue with how ASSIGN writes to flow variables before an IF statement evaluates them? Or is there a type mismatch I am missing? The documentation suggests that flow variables are immediately available, but in practice, it seems like the IF action is executing before the ASSIGN completes, or the variable is not being set in the correct context.

Any insights on how to debug the state of {{flow.customer.tier}} between these two actions would be appreciated. I am currently using the CXone REST API to update these values, so I want to ensure the Studio side is correctly interpreting the data.