You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

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:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!