CXone Studio: Nested IF logic in ASSIGN action failing

We are building a dynamic routing flow in CXone Studio. The goal is to assign a specific disposition code based on multiple conditions. We need to check if the customer is a VIP and if the issue type is billing.

The logic should be:

  1. If VIP is true AND Issue is ‘Billing’, set Disposition to ‘VIP_Billing’.
  2. Else if VIP is true, set Disposition to ‘VIP_Other’.
  3. Else set Disposition to ‘Standard’.

We tried using the ASSIGN action with an inline IF expression. The syntax looks like this:

ASSIGN
 DispositionCode = IF([VIP] == 'True' AND [IssueType] == 'Billing', 'VIP_Billing', IF([VIP] == 'True', 'VIP_Other', 'Standard'))

The studio editor does not show a syntax error. However, when we test the flow, the DispositionCode variable always returns ‘Standard’. It seems to ignore the nested IF. We checked the variable types. VIP is a boolean. IssueType is a string.

We also tried separating the logic into multiple ASSIGN actions with IF conditions, but Studio does not allow multiple IF conditions on a single ASSIGN block easily without using complex routing blocks. We want to keep it simple in one step.

Is there a limit to nested IF statements in the ASSIGN expression parser? Or is the boolean comparison failing silently? The documentation is not clear on operator precedence for AND inside IF expressions.

Are you nesting the conditions inside the assignment or chaining actions?

Cause: Studio ASSIGN nodes don’t support complex nested IF logic in a single expression easily. It gets messy fast.

Solution: Use a Switch action. It handles multiple branches cleanly.

{
 "type": "switch",
 "expression": "{{customer.vip}} && {{issue.type}} == 'Billing'",
 "cases": [
 { "value": "true", "next": "set_vip_billing" }
 ],
 "default": "check_other"
}