CXone Studio DBConnector Action Returning Empty Result Set for Simple SELECT

I’m trying to integrate a simple database lookup into a CXone Studio script using the DBConnector action. The goal is to fetch a customer record based on an extension provided by the caller. I’ve set up the connection string in the Studio environment variables, and the test connection succeeds without any issues.

Here’s the SQL query I’m passing to the DBConnector action:

SELECT * FROM customers WHERE extension = ?

I’m mapping the extension parameter from the session.caller.phoneNumber field. The action completes successfully, but the result object always comes back empty, even when I know the record exists in the database. I’ve verified the data directly in the DB, and the extension matches exactly.

Is there a specific way to handle parameter binding in the DBConnector action? I’ve tried passing the value as a string and as an integer, but no luck. The debug logs show the query is being executed, but no rows are returned.

Also, should I be using a different action for this kind of lookup? I’ve seen references to GetRESTProxy for REST-based lookups, but our backend is a traditional SQL database. Any insights on why the DBConnector might be returning empty results? I’ve checked the column names and the table structure, and everything looks correct. The connection string is using the correct credentials, and the test connection works fine. I’m at a loss as to what might be causing this issue.