DBConnector action returning empty result set despite valid SQL query

We’re seeing a weird symptom where the DBConnector action in our CXone Studio flow keeps returning an empty array. The exact same query runs fine in DBeaver. The setup is straightforward enough. We grab the phone number from {{interaction.customer.phoneNumber}}, pass it into the connector parameters, and expect a single row back with account tier details. The flow just drops through to the fallback branch instead.

Here’s the JSON config sitting on the action node:

{
 "name": "LookupCustomerTier",
 "type": "DBConnector",
 "connectionId": "conn_prod_sql_01",
 "query": "SELECT tier_id, loyalty_status FROM customer_profiles WHERE phone = :phone LIMIT 1",
 "parameters": {
 "phone": "{{interaction.customer.phoneNumber}}"
 },
 "resultVariable": "dbResult"
}

The connection profile uses a standard JDBC driver. Other flows in the same environment pull data from the same schema without any issues. Execution trace shows it’s actually hitting the database. You can see the debug output below:

[2024-05-14T10:22:15Z] DBConnector: Executing query with params {phone: '+447911123456'}
[2024-05-14T10:22:15Z] DBConnector: Query returned 0 rows. Setting dbResult to []

Stepping through the expression builder reveals how the string interpolation resolves. That macro definitely holds a value by the time the connector triggers. We threw in a temporary {{string.trim(interaction.customer.phoneNumber)}} call just in case trailing whitespace was messing up the exact match. Nothing changed. The database column is a VARCHAR(20) storing E.164 formatted numbers, so the format should line up perfectly.

Maybe the DBConnector wrapper is stripping the plus sign. Or maybe it’s adding quotes around the parameter value before it hits the SQL engine. Switching the query to use LIKE :phone instead of = :phone didn’t help. Execution trace still reports zero rows.

Checking the parameter binding syntax in the CXone docs, named parameters should just be :name. Studio engine might be treating the macro expansion as a literal string instead of a bound parameter. Hardcoding a number into the JSON payload makes the connector return the row instantly. Database and driver are fine. The problem has to be how the dynamic value gets passed through the action executor.

The serialization step is definitely dropping the plus sign before the bind happens.