Hi Team,
The scenario is when the conversation is finished, insert notes into CRM system including Genesys notes and wrapup code + emails and messages would have a subject and body.
I have configured a Trigger which calls a workflow each time the userend event fires on a few ACD Queues. Whilst this works great sometimes, it often results in a 400 or 404 response to both Genesys Data Actions to extract the message / body / wrapcode / notes etc and the 3rd party web services to write the information.
For example, if a field was empty, I might get an error like:
JSON failed schema validation for the following reasons: Schema: # @/properties/messageId. Error location: /messageId. instance type (null) does not match any allowed primitive type (allowed: ["string"])
(I've worked around these in the Failure path of the Call Data Action within the workflow e.g. if failure, set field to "(no notes)" etc
A special character like # or even a line return \r\n in the textBody or htmlBody of an email cause the JSON to fail with:
Processing the Request Body Template resulted in invalid JSON.
Of significance, I can test the Data Action with the same parameters including # and/or \r\n and it works fine. It seems to be that the workflow can't construct valid JSON so doesn't even get to the point of calling the data action.
Have also experimented with default values which didn't help at all.
Lastly, the email subject and body are set by the customer. It feels like I would need to parse and adjust for special characters or not attempt to include those fields in the CRM notes. Any suggestions would be appreciated. Am rather stumped by this one since the Data Action tests are working fine.