Trace and Debug Scripts

This help page is for Studio. This information is also available for Desktop Studio.

Required permissions: ACD > Studio > Scripts Debug

You can run script traces to check for issues in your scripts. They allow you to see the actions that fire in the script, and the variables that are in the script at the time that each action fires.

Each trace opens in a separate window. This means you can keep previous traces open to compare to the new ones, or capture multiple live contacts in a row.

Studio doesn't keep a history of traces you've captured. If you think you might need to refer to a previous trace, either keep the trace output window open or download the trace file to your computer.

Capture a Single Script Trace

You can track the performance of your script, spawn a script, or make a test call with the Trace Output tool. This tool traces the contact or running script and displays each action that fired, what variables are being created and when, and the values the variables held at each point. This is a helpful tool to test and debug your scripts. You can run traces on live interactions or simulated ones.

You can only capture a trace if the script is saved. If you attempt to capture a script trace on a script with unsaved changes, Studio prompts you to save the script. If you have compile errors in the script, Studio won't save the script. You must resolve errors before you can save the script and run the trace.

  1. In CXone Mpower, click the app selector and select Omnichannel RoutingStudio Three arrows joined at the base. One points straight up, one up and to the right, and one up and to the left. .
  2. On the Scripts page, locate and double-click to open the script you want to work with or create a new one. The script opens in a new tab.
  3. Click Trace > Start with Trace.
  4. Select an inbound phone ACD Skill.
  5. To pass values into the script via parameter variables, enter the values in the Parameters field. Enter one value per line. The values you enter map to parameters P1 through Pn, where n is the number of the last parameter value you add.
  6. To simulate an interaction for an inbound phone script, click Simulate Inbound Call and provide the necessary information.
  7. Click Start Capture. The trace output window opens. The window stays empty until the first action in the script fires.
  8. Use the options on the trace output window to examine the trace.
    1. To save the trace output to your computer: 
      1. Click the ellipsis Three dots in a row. in the top right corner of the window and select Download the trace file.
      2. Choose a location and name for the file.
      3. Click Save.
    2. To end the trace without ending the interaction on the server, click Detach.
    3. To end both the trace and the interaction, click Terminate, then click OK to confirm. This ends the interaction on the server and disconnects the contact or ends the current script.

Capture Traces on Live Contacts

You can capture a trace on a script as it runs while processing live contactsClosed The person interacting with an agent, IVR, or bot in your contact center.. This allows you to diagnose issues in your contact center or gather data for technical support.

If you want to trace a specific phone number, you can enter an ANIClosed Also known as caller ID. Listed phone number of an incoming voice call. or DNISClosed Identifies the number the contact dialed to reach you for inbound voice calls and the number the agent or system dialed on outbound voice calls.. Studio only traces contacts with that number.

  1. In CXone Mpower, click the app selector and select Omnichannel RoutingStudio Three arrows joined at the base. One points straight up, one up and to the right, and one up and to the left. .
  2. On the Scripts page, locate and double-click to open the script you want to work with or create a new one. The script opens in a new tab.
  3. Click Trace > Capture Live Contacts.

  4. Enter the Number of Contacts you want to trace.
  5. Under Filters, select an option: 
    • None: Traces the number of contacts you entered, starting the next time this script runs.
    • DNIS: Select this option and enter a DNIS number. Studio traces the number of contacts you entered that have this DNIS.
    • ANI: Select this option and enter an ANI number. Studio traces the number of contacts you entered that have a matching ANI.
  6. Click Start Capture. The trace output window opens. The window stays empty until an instance of the script matching the selected Filter option begins to run.
  7. Use the options on the trace output window to examine the trace.
    1. To save the trace output to your computer: 
      1. Click the ellipsis Three dots in a row. in the top right corner of the window and select Download the trace file.
      2. Choose a location and name for the file.
      3. Click Save.
    2. To end the trace without ending the interaction on the server, click Detach.
    3. To end both the trace and the interaction, click Terminate, then click OK to confirm. This ends the interaction on the server and disconnects the contact or ends the current script.

Capture Traces on Multiple Live Contacts

You can capture traces on a script as it runs while processing live contactsClosed The person interacting with an agent, IVR, or bot in your contact center.. This allows you to diagnose issues in your contact center or gather data for technical support.

You can start traces for up to 20 contacts at once. The multiple traces window opens and waits for the script to run with live contacts. If you've specified an ANIClosed Also known as caller ID. Listed phone number of an incoming voice call. or DNISClosed Identifies the number the contact dialed to reach you for inbound voice calls and the number the agent or system dialed on outbound voice calls. to filter contacts, the script waits for contacts with a matching number. As interactionsClosed The full conversation with an agent through a channel. For example, an interaction can be a voice call, email, chat, or social media conversation. begin, entries for each contact appear in the multiple traces window, up to the number you specified. The status in the upper left corner of the window shows how many traces are in progress or complete, and how many are still waiting for contacts to start.

  1. In CXone Mpower, click the app selector and select Omnichannel RoutingStudio Three arrows joined at the base. One points straight up, one up and to the right, and one up and to the left. .
  2. On the Scripts page, locate and double-click to open the script you want to work with or create a new one. The script opens in a new tab.
  3. Click Trace > Capture Live Contacts.

  4. Enter the Number of Contacts you want to trace, from 1 to 20.
  5. Under Filters, select an option: 
    • None: Traces the number of contacts you entered, starting the next time this script runs.
    • DNIS: Select this option and enter a DNIS number. Studio traces the number of contacts you entered that have this DNIS.
    • ANI: Select this option and enter an ANI number. Studio traces the number of contacts you entered that have a matching ANI.
  6. Click Start Capture. The multiple traces window opens. The window is empty until the script begins to run for a contact. Information about each contact appears in the table on the window. Do not close this window until you're finished working with the traces. The trace data is not saved automatically.

  7. To filter contacts to locate the one you want to view: 
    • Click the button next to Close All and select an option. You can choose from All, Done, Running, Error, or Detached.
    • Use the search bar. It searches all columns except Status.
  8. On the multiple traces window, click the three dots Icon of three dots in a row. next to one of the contacts and choose an option for that contact's trace.

  9. Double-click a contact to view its trace output.
  10. Use the options on the trace output window to examine the trace.
  11. Click Back to Contacts to return to the multiple traces window.

View Trace Output

When you run a trace, the output appears in the trace output window. You can use this window to view the variables in the script and see how they change as the script progresses through each actionClosed Performs a process within a Studio script, such as collecting customer data, playing a message or music, or routing a contact to an agent..

As the script runs, actions show up in the table on the left side of the trace output window in the order they fire. You can see the action name, its properties and their configurations, the time the action fired, and the result.

  1. In CXone Mpower, click the app selector and select Omnichannel RoutingStudio Three arrows joined at the base. One points straight up, one up and to the right, and one up and to the left. .
  2. On the Scripts page, locate and double-click to open the script you want to work with or create a new one. The script opens in a new tab.
  3. Start a single trace or a trace on multiple contactsClosed The person interacting with an agent, IVR, or bot in your contact center..

  4. If you started a trace on multiple contacts, double-click a contact on the multiple traces window to open the trace output window.

  5. Use the search bar above the actions table to find actions by name, property name or value, time, or result.
  6. Click any column heading to sort the list by that data.
  7. To see more information about an action's properties and their values, hover over an entry in the Properties column.

  8. Click an action in the trace output to see all variables and their values in the script at the time that the action fired.  

    The variables appear in the list on the right side of the trace output window. New or changed variables are shown in red. In the variables list, you can:

    • Hover over entries to view the full contents of that variable or value in a pop-up window.
    • Select or clear Global, System, or Private to filter the variables in the list.

    • Use the search bar to find variables by name or value.
    • Click the greater-than symbol > next to the name of a dynamic data object to expand it and see its members and their values.
    • Double-click a variable to view its value in a pop-up window.
    • Copy a variable value by clicking its row and pressing CTRL + C. The cell background briefly turns dark blue to show that the copy was successful.
    • Use the arrow keys to move through the highlighted row in the variables list.

Download Trace Files

You can save the trace output as a file that you can download to your computer. This is helpful if you need to refer to a trace later. It also allows you to send a trace file to other Studio users or to your Account Representative. The files can be viewed by loading them in Studio. Files are saved in JSON format with a TRC.JSON extension.

  1. In CXone Mpower, click the app selector and select Omnichannel RoutingStudio Three arrows joined at the base. One points straight up, one up and to the right, and one up and to the left. .
  2. On the Scripts page, locate and double-click to open the script you want to work with or create a new one. The script opens in a new tab.
  3. Click Trace and select Start with Trace or Capture Live Contacts.
  4. When the trace is captured, click the ellipsis Three dots in a row. in the upper right corner of the trace output window.
  5. Select Download the trace file.
  6. Specify a File name and where you want to save the file.
  7. Click Save.

Load Trace Files

You can load a saved trace file into Studio to view it. You can only load trace files downloaded from Studio. Trace files downloaded from Desktop Studio must be loaded into that application.

  1. In CXone Mpower, click the app selector and select Omnichannel RoutingStudio Three arrows joined at the base. One points straight up, one up and to the right, and one up and to the left. .
  2. On the Scripts page, click Load and select Load trace file.
  3. Drag a trace file onto the Load Trace window or click browse for files to select one.
  4. Click Open on the Load Trace window. The trace opens in a trace output window.