It looks like you're missing an enclosing single quote (') around the variable name variables('userName)
in your @split(..)
statement.
I tried to quickly reproduce the issue and splitting with variable parameters is working for me as expected:
In the example above, I provide a payload of:
{
"delimiter":"|",
"parameter":"hello|world"
}
and get back a response of:
[
"hello",
"world"
]
Hope this helps, please let me know if you have any additional questions.