I’m hitting a wall with a CXone Studio script. The flow is straightforward: take a parameter from the initial interaction, pass it to a DBConnector action to look up a record in our custom SQL Server table, and then branch based on whether a match exists. The connection string is verified and works fine in SSMS. The SQL query itself is simple: SELECT * FROM CustomerProfiles WHERE ext_id = '{profile_id}'.
When I run this in the Studio simulator, the DBConnector step completes with a status of ‘Success’, but the result set is always empty, even when I know for a fact that the ext_id exists in the database. I’ve checked the logs, and there are no errors thrown. Just an empty array. I’ve tried hardcoding the value in the SQL query to rule out any parameter injection issues, and it still comes back empty.
Here’s the relevant part of the Studio snippet JSON:
{
"actionType": "DBConnector",
"properties": {
"connectionName": "prod-cx-db",
"query": "SELECT * FROM CustomerProfiles WHERE ext_id = '{profile_id}'",
"resultVariable": "dbResult"
},
"successFlow": "checkResult",
"failureFlow": "errorHandler"
}
The dbResult variable ends up being []. I’ve also tried using a stored procedure instead of a direct query, but the outcome is identical. The stored procedure returns the correct data when executed directly in the database. Is there a known issue with how CXone handles result sets from SQL Server? Or am I missing something obvious in the configuration? I’ve been staring at this for hours and can’t figure out why the connector isn’t picking up the data.