hey all
quick q - anyone else running into this with DATA ACTIONS? we’ve got a flow that’s supposed to POST to a custom endpoint. it works fine in architect test mode, but when it hits production it’s just… not.
the error is a 400 BAD_REQUEST with this message: INVALID_CONTEXT_DATA - The data provided in the request does not conform to the expected format. it’s super vague.
we’re using the latest sdk (nodejs v9.0.0) and hitting the execute endpoint for the action. the DATA_ACTION_CONFIGURATION is pretty basic - just a simple json payload with a couple strings.
here’s the relevant bit of code:
const axios = require('axios');
const actionId = 'a1b2c3d4-e5f6-7890-1234-567890abcdef'; // obviously not the real id
const gcToken = process.env.GENESYS_CLOUD_TOKEN;
axios.post('/api/v2/integrations/actions/' + actionId + '/execute', {
"data": {
"CUSTOMER_NAME": "john doe",
"ACCOUNT_NUMBER": "1234567890"
}
}, {
headers: {
'authorization': 'bearer ' + gcToken
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error.response.data);
});
i’ve checked and double-checked the payload format. it matches the DATA_ACTION_CONFIGURATION exactly. no extra spaces, no weird characters. the token is valid too - i’ve used it for other api calls without issues.
it’s like something’s happening before the request even hits my endpoint. the architect flow has a LOG statement right before the DATA ACTION step and it logs the payload just fine, so the payload’s correct there. not 100% sure but it feels like a GC thing. maybe something to do with the DATA_ACTION_CONFIGURATION being evaluated differently in production vs test?
also, the ROUTING_CONFIGURATION is set to ‘always execute’ - it shouldn’t be conditional or anything. it’s just… weird. anyone seen this before?