CXone Studio DBConnector returning null despite successful connection in script

I’m trying to implement a database lookup within a CXone Studio flow using the DBConnector action. The goal is to pull customer tier information from our PostgreSQL database based on the caller’s phone number, then pass that result into a custom attribute for downstream routing logic. I’ve configured the connection profile in the Admin console and verified it works via the test button.

The issue arises when the script executes during a live call. The DBConnector step completes without throwing an error, but the output variable remains null. I’ve set up a New Relic custom event to track the webhook payload from the Studio flow, and it consistently shows dbResult: null even though I know the query should return a row.

Here’s the SQL query I’m passing in the action:

SELECT tier_level FROM customer_profiles WHERE phone_number = ${INBOUND_PHONE_NUMBER} LIMIT 1

I’ve tried changing the parameter binding to use named parameters like :phone_num, but that didn’t change the outcome. The connection profile uses a service account with read-only access, so permissions shouldn’t be the blocker. I also checked the database logs and see no corresponding queries hitting the server during these test calls, which makes me suspect the Studio action isn’t actually firing the request or is failing silently before the network call.

Is there a specific way to handle output mapping for single-column results in Studio? I have the output variable mapped to response.body.tier_level, but maybe the JSON structure from the DBConnector is different than expected. Any ideas on how to debug this further or see the raw response from the connector?