I’m trying to do a basic database lookup in a CXone Studio script using the DBConnector action. The goal is just to fetch a customer record by ID.
I’ve set up the connection profile and it tests fine. But when the script hits the action, it bombs out. Here is the JSON config I’m passing:
{
"connectionName": "Prod_SQL",
"query": "SELECT * FROM Customers WHERE Id = {{session.custom.customerId}}",
"resultVariable": "dbResult"
}
The error is a straight 500 Internal Server Error with no useful message in the trace. I’ve verified the SQL works in SSMS. Am I missing a parameter in the action definition?