System.AgentInitiation Error: JSONObject cannot be cast to String when passing CustomFields
Hi everyone,
I’m facing a persistent issue when attempting to hand off a conversation to a live agent using the System.AgentInitiation component. I’m following the official documentation for passing customer information to a live chat:
Whenever the skill attempts to initiate the connection, it fails with the following exception:
An exception occurred while invoking component System.AgentInitiation: class org.json.JSONObject cannot be cast to class java.lang.String (org.json.JSONObject is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
I have a variable named customFields, initialized with the following JSON structure:
Tagged:
0