We are restructuring our CXone Studio flows to handle dynamic routing based on customer tier data retrieved via REST proxy. The goal is to assign a variable and branch logic without relying on hardcoded paths, which helps maintain consistency with our Terraform-managed environment definitions.
The flow retrieves the tier from the CRM using a GetRESTProxy action. The response is parsed, and we attempt to assign the tier value to a script variable tier_level using the ASSIGN action. Subsequently, an IF action checks if tier_level equals ‘Gold’ to route to a premium queue.
The issue arises when the IF action consistently evaluates to false, even when the CRM response clearly indicates ‘Gold’. We have verified the data types. The REST proxy returns a string. The ASSIGN action maps the JSON path correctly. However, the IF condition seems to fail on the equality check.
Here is the relevant Studio snippet configuration:
{
"actions": [
{
"id": "rest_call",
"type": "GetRESTProxy",
"outputVariable": "crm_response"
},
{
"id": "assign_tier",
"type": "ASSIGN",
"variableName": "tier_level",
"expression": "crm_response.data.tier"
},
{
"id": "check_gold",
"type": "IF",
"condition": "tier_level == 'Gold'",
"truePath": "premium_queue",
"falsePath": "standard_queue"
}
]
}
Debug logs show tier_level holds the value ‘Gold’. The IF condition tier_level == 'Gold' evaluates to false. We tried trimming whitespace using a string function in the ASSIGN expression, but the result is identical. It appears the IF action might be sensitive to hidden characters or the comparison operator behaves differently than expected in this context.
We are using the latest CXone Studio version. The Terraform provider handles the deployment, so the configuration is consistent across environments. The problem persists in both dev and prod.
Has anyone encountered issues with string equality in Studio IF actions? Is there a specific syntax required for the condition expression that handles type coercion or whitespace automatically?