Fun one today. We’re seeing intermittent 400 Bad Requests on Data Actions triggered from wrap-up codes - specifically the screen pop action. It started after the latest Salesforce Winter '24 refresh - nothing changed on the Genesys side, though.
The error payload is consistently this:
{
"error": "Bad Request",
"message": "Invalid field mapping provided in Data Action configuration. Check the field names and data types."
}
I’ve double-checked the field mappings in Architect - they haven’t drifted, and the contact fields exist on the Salesforce side, and the data types match - text to text, number to number. We’re on Genesys Cloud REST API v3.0 and the Salesforce connector version is 2023.10.0. It feels like a Salesforce side thing, but it’s the Data Action itself failing, so I’m stuck. It’s not a consistent failure, either - it’s roughly 20% of wrap-ups with this code.
hey! sorry if this is kinda obvious, but the Salesforce Winter '24 refresh definitely makes me think something changed on their side with the field names, even if you didn’t touch anything in Genesys Cloud. We’re on Genesys Cloud, NICE CXone so I’m not super familiar with the Salesforce side, but here are a couple things to check, just in case.
First, double-check the field mapping in the Data Action itself. It sounds dumb, but are the Salesforce field names exactly what the Data Action is expecting? Sometimes even a tiny case difference throws things off.
Could the Salesforce object itself have changed? Like, maybe a custom field got renamed during the upgrade? It’s a long shot, but I’ve seen weirder things happen.
The error message says “data types” too, so make sure the data types you’re sending from Genesys are compatible with what Salesforce expects. A string where it wants a number will definitely cause a 400.
If you’re using the Genesys Cloud Java SDK, the DataActionRequest object is kinda picky about the field names. I’ve found myself debugging those mappings a lot. Here’s a quick example of how I usually set up the parameters (apologies if this is way off, it’s a basic example):
DataActionRequest dataActionRequest = new DataActionRequest();
Map<String, DataActionParameter> parameters = new HashMap<>();
parameters.put("contactId", new DataActionParameter().value("{{Contact.id}}")); // Check this name!
parameters.put("phoneNumber", new DataActionParameter().value("{{Contact.phoneNumber}}")); // And this one
dataActionRequest.setParameters(parameters);
Also - and this is a super newbie question, sorry - is the Data Action actually enabled? It seems silly, but I’ve spent an hour looking for an issue when the DA was just switched off.
The suggestion above - checking Salesforce field names after Winter '24 - is the correct direction. We’ve seen this happen before. The documentation states that Data Actions “require precise field mapping between Genesys Cloud and external systems” - and Salesforce is very sensitive to name changes.
It looks like Salesforce quietly deprecated a field, or changed its API name. The error message is… unhelpful, I know. It doesn’t tell you which field is wrong.
To fix this, you’ll need to open the Data Action in the Genesys Cloud admin interface. Go to the step where you map Genesys Cloud contact fields to Salesforce object fields. Examine each mapping carefully.
Specifically, look for fields that return an error when you try to save the change. Sometimes the interface doesn’t highlight the bad field immediately.
We had similar issue in INC-4471. The user changed the FirstName field in Salesforce to First Name - seemingly minor. → Data Action failed with 400.
Also, double-check data types. The documentation notes that “mismatched data types can also cause field mapping errors.” String → Number, for example, will cause a 400.
If it’s still failing, try this: create a new Data Action with the exact same configuration. Sometimes the existing configuration gets corrupted internally. It’s strange, but it works. I’ve seen it happen.