CXone Studio ASSIGN inside IF block returns null variable

Here is the snippet I’m stuck on:

ASSIGN _tempVar = IF(_inputString == "", "default", _inputString)
LOG "Value: " + _tempVar

The log output is always Value: (empty). It seems like the IF action isn’t evaluating correctly or the ASSIGN is failing to capture the result. According to the CXone Studio documentation for the IF action: “Evaluates a condition and returns the first value if true, otherwise the second value.” But in practice, it looks like it’s returning nothing.

We’ve tried:

  • Wrapping the condition in TRIM(_inputString) to handle whitespace.
  • Using EQUALS instead of ==.
  • Creating a separate boolean variable for the condition check before the IF.
  • arting the Studio session.

The environment is CXone Studio (latest version). We’re using .NET backend to push the initial _inputString via a call to a custom endpoint, which then triggers the Studio flow. The incoming JSON looks like:

{
 "_inputString": ""
}

If I hardcode the values in the IF action, it works fine. But when passing variables, it breaks. Is there a known issue with variable scope inside IF blocks in Studio? Or am I missing a step in how the ASSIGN action handles dynamic evaluations?

Also, I noticed that if I use GETRESTPROXY to fetch a value and assign it directly, it works. But chaining it with IF causes the null result. Any ideas?