DBConnector action throwing 'Invalid column name' in Studio script

Hey everyone,

Running into a snag with a DBConnector action in CXone . The goal is to pull customer status from our SQL server based on the caller ID. The connection test passed, but the script fails on execution with ‘Invalid column name: phonenumber’. The column definitely exists in the table.

Here is the mapping:

ASSIGN sql = “SELECT status FROM customers WHERE phonenumber = '” + sys.interaction.callingPartyNumber + “'”
DBConnector action uses this query.

Is there a specific data type issue I’m missing? Tried wrapping in quotes, same error.

The docs say sys.interaction.callingPartyNumber is a complex object, not a string. You’re injecting the object reference into the SQL. Try sys.interaction.callingPartyNumber.value instead.