Digital Experience JSON Mirror Tool

The JSON mirror tool allows you to verify the JSON for digital chat-based channels, such as Live ChatClosed Agents and contacts interact on a real-time basis. It does this by processing JSON you paste into the tool's window. If the JSON is properly formatted and contains all the required parameters, the script displays the output based on your JSON.

The JSON mirror tool consists of a custom script and a digital chat-based channel that's created specifically to use with the tool. The script is designed only to verify JSON that's pasted into the chat window. It doesn't support interactions with contacts.

You can use the JSON mirror tool in one of two ways: 

  • Use the tool set up by NICE CXone. This tool uses a Digital Live Chat channel, but it can verify JSON for any digital channel. You can find the tool at the following URL: 

    https://vah-client-app.s3.us-west-2.amazonaws.com/dfo/dfo-mirror.htmlA square with an arrow pointing from the center to the upper right corner.

  • Set up a mirror tool on your own system. You can use your own Live Chat or other digital channel and the JSON mirror tool custom script that NICE CXone provides.

Set Up the JSON Mirror Tool

  1. Download the Digital Experiencemirror tool script and import it into Studio.
  2. Add a digital Live Chat channel in CXone. You don't need to configure routing or queues for the channel.
  3. Configure the channel to use the mirror tool script and a digital ACD skillClosed Used to automate delivery of interactions based on agent skills, abilities, and knowledge. You can use any digital ACD skill with the mirror tool, but ensure that the one you choose doesn't affect your organization's reporting.
  4. Create a webpage to use with the tool. This is the page that will hold the chat window used with the mirror tool. It doesn't have to have any other content.
  5. Enable and initialize the channel. You don't need to customize the JavaScript code that you add to the webpage. You may be able to do this on your local computer or you may need to upload the page to a web server.
  6. Open the webpage in a browser.
  7. If prompted, enter a name into the Your name field on the chat window and click Begin Conversation.
  8. Paste the following sample JSON into the message field, then press Enter to send a test message.

    {
     "prompts": [{ 
       "mediaSpecificObject": {  
    	"dfoMessage": {  
    	  "messageContent": {	
    		"type": "PLUGIN",	 
    		"payload": {	
    			"elements": [{	  
    				"id": "bf2521f4-5e85-413f-b6ed-815d1c3905f0",
    	   			"type": "FILE",	   
    				"filename": "photo.jpg",	  
    				"url": "https://www.nice.com/-/media/niceincontact/layout/nice-logo-web-header/nice-web-logo.ashx",	   
    				"mimeType": "image/jpeg"	   
    				}	 
    			   ]	   
    			 } 	  
    			}	
    		  }	
    		}  
    	 } 
    	]
    }

  9. After the message sends, you should receive the NICE CXone company logo as a response in the chat window, as shown in the following image.

Use the JSON Mirror Tool

  1. In a web browser, go to the URL of the page that holds the Live Chat window for the mirror tool.
  2. Click the Live Chat window.
  3. If prompted, enter a name and click Send.
  4. Paste a JSON string into the message field in the chat window and press Enter to send it. The Digital Experience mirror script connected to the chat window sends the JSON to Digital Experience, which validates the JSON and replies. The reply indicates the results of the validation:

    • Valid: The reply is output that looks as you expected it to.
    • Invalid: The reply is an error message or output that doesn't look as you expected it to.