Work with Scripts

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

The tasks described on this page are essential to using CXone Studio. They include things such as creating or opening scripts, adding and configuring actions, and connecting actions to each other.

Create a Script

Required permissions: Studio Scripts > Create/Edit

Currently, CXone Studio does not check to see if a script name exists before saving it, and you cannot see the other scripts in the folder when you save a new script. For this reason, ensure that all script names are unique so they don't accidentally overwrite other scripts.

  1. In CXone, click the app selector and select Omnichannel RoutingStudioThree arrows joined at the base. One points straight up, one up and to the right, and one up and to the left. .
  2. Click New Script and select the script media type from the drop-down. The canvas workspace for the new script opens in a new tab in your browser.

  3. Add at least one action to the script canvas so you can save it.

  4. Click Create.

  5. Enter a Name for your script.

  6. Click Location to choose a folder to save the script in, or click Create New Folder and enter a New Folder Name.
  7. Click Create.

Create a Copy of a Script

Required permissions: Studio Scripts > Create/Edit

Currently, CXone Studio does not check to see if a script name exists before saving it, and you cannot see the other scripts in the folder when you save a new script. For this reason, ensure that all script names are unique so they don't accidentally overwrite other scripts.

  1. In CXone, click the app selector and select Omnichannel RoutingStudioThree 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 the script you want to duplicate.
  3. Click Options Three dots in a row. for the script you want and select Duplicate from the menu.

  4. Alternatively, you can: 
    1. Click the script you want to make a copy of. It opens in a new tab.
    2. In the script's tab, click the name of the script at the top of the canvas workspace.

    3. Click Duplicate in the drop-down menu.

  5. Enter a unique Name for the duplicated script.

  6. Click Location to choose a folder to save the script in. On the Location drop-down, you can also click Create New Folder.

  7. Click Duplicate.

Open a Script

Required permissions: Studio Scripts > View

Opening a script allows you to view a script that's currently on the CXone servers. You can open a script that was created in Desktop Studio. If you have a script file on your computer, you can import it.

  1. In CXone, click the app selector and select Omnichannel RoutingStudioThree arrows joined at the base. One points straight up, one up and to the right, and one up and to the left. .
  2. Locate the script you want to open. If it's located in a folder, double-click to open the folder. To return to the root folder, click Scripts at the top of the page.
  3. If you have trouble finding the script you want, click the drop-down in the top right corner of the scripts list and select Inactive. This shows you all scripts that are currently deactivated. Deactivated scripts must be reactivated before you can open them.
  4. Double-click the script you want to open. It opens in a new browser tab.

Import a Script

Importing allows you to load a script file from your computer to CXone Studio. For example, if you exported a script from CXone Studio as a backup, you might need to import it to revert back to that version.

In CXone Studio, scripts are in JSON. Desktop Studio scripts are in XML. This means that you can only import scripts into the application they were exported from. However, after importing a script, you can open and edit it with either Studio application. This is because the applications convert between JSON and XML when opening, but not when exporting or importing.

Scripts open automatically in a separate browser tab after being imported. However, they must be saved or the file is not kept in CXone Studio.

  1. In CXone, click the app selector and select Omnichannel RoutingStudioThree arrows joined at the base. One points straight up, one up and to the right, and one up and to the left. .
  2. Click Load Script at the top of the Scripts page.
  3. Add the script to the window that appears. You can drag the script from your desktop or click the browse for files link to choose a JSON script file.
  4. Click Open. The script opens in a new tab.
  5. On the script's tab, click Create. This allows you to save the script. If you don't save it, the file does not save to CXone Studio.
  6. Enter a Name if you want to change the script's existing name.
  7. Select the Location where you want to save the script.
  8. Click Create.

Export a Script

Exporting a script saves a copy of the script in a file on your computer. You can do this to create backups of important scripts, or to send scripts via email to other Studio users. For example, when working with NICE CXone technical support, you may need to send in a script file. If your organization has more than one CXone business unitClosed High-level organizational grouping used to manage technical support, billing, and global settings for your CXone environment, you may need to move scripts between them. You can do this by exporting from one business unit and importing into another.

In CXone Studio, scripts are in JSON. Desktop Studio scripts are in XML. This means that exported scripts can only be imported into the application they were exported from. However, after importing a script, you can open and edit it with either Studio application. This is because the applications convert between JSON and XML when opening, but not when exporting or importing.

  1. In CXone, click the app selector and select Omnichannel RoutingStudioThree 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 the script you want to export.
  3. Click Options Three dots in a row. in the script's row and select Export from the menu.
  4. In the Save As window, choose where you want to save the script on your computer and click Save.
  5. Alternatively, you can:
    1. Open a script.
    2. Click the script name in the toolbar at the top of the canvas workspace and select Export.
    3. In the Save As window, choose where you want to save the script on your computer and click Save.

Add and Configure an Action in a Script

Required permissions: Studio Scripts > Create/Edit

  1. In CXone, click the app selector and select Omnichannel RoutingStudioThree arrows joined at the base. One points straight up, one up and to the right, and one up and to the left. .
  2. Open a script or create a new one.
  3. Click Actions A rectangle, circle, and triangle partially layered on top of each other. Click to open the Actions panel. in the left icon menu to open the Actions palette.

  4. Locate the action you need using the search bar. You can also scroll down the list of actions and expand or close category folders to locate an action.
  5. Click an action and drag it to the canvas.
  6. Click the action on the canvas to view its properties. Action properties appear in the Properties section on the right side of the canvas.

  7. Configure the properties of the action. Each action has different properties. See the help page for the action you're adding for information about its properties.
  8. If you need to remove an action from your script, select it on the canvas, then press DELETE on your keyboard.
  9. Save your script.

Connect Actions

Required permissions: Studio Scripts > Create/Edit

Connecting actions creates the flow of your script. Actions have connection points on all four sides. They appear as empty circles A white circled outlined in blue. until you hover the cursor over one, when it changes to a blue circle with an arrow inside A blue circle with a white arrow pointing down. Click to drag a connector to another action. .

  1. In CXone, click the app selector and select Omnichannel RoutingStudioThree arrows joined at the base. One points straight up, one up and to the right, and one up and to the left. .
  2. Open a script or create a new one.
  3. Add two actions to the canvas workspace.
  4. Move the cursor over the first action so the empty connection points appear A white circled outlined in blue.. A gray connector line appears and shows where the default connection will be made.
  5. To create the default connection:
    1. Hover the cursor over a connection point until it changes to the blue connector circle A blue circle with a white arrow pointing down. Click to drag a connector to another action. .
    2. Click the blue connector circle. The default connection is made. It has the Default condition.

    3. To change the condition, click Condition A circle with two horizontal lines attached to it. One has a check mark and the other has an X next to it. and select the new condition.

  6. To create a connection and choose a condition:
    1. Click and hold the blue connection icon A blue circle with a white arrow pointing down. Click to drag a connector to another action. and drag the connector to the connection point A white circle with a blue outline. on the action you want to connect it to.
    2. Drop the connector onto a connection point of the second action. The Choose Condition menu pops up.

    3. Select the condition for this branch from the Choose Condition menu that appears.

      The available conditions belong to the action you're connecting from. In the example image in the preceding step, Menu is being connected to Play, so the conditions that appear after the connection is made belong to Menu.

  7. If you want to create multiple branches from one action, add additional actions to the script and repeat these steps to connect each one.
  8. To move an action on the canvas, click and drag it to a new location. The connector stays attached and automatically adjusts its path to the connected action.

    You cannot modify a connector's path. If you don't like how the connector appears after moving an action, you can delete the connector and add it back using different connector points.

  9. To remove a connector, click the connector line and click Delete A trash can. on the pop-up menu. You can also press Delete on your keyboard.
  10. Save your script.

Add Actions from the Choose Action Menu

Required permissions: Studio Scripts > Create/Edit

Instead of connecting to an existing action in your script, you can use the Choose Action menu to add an action and connect to it in one step. This menu appears when you drag a connector away from an action and release it without attaching it to another action. .

The Choose Action menu includes the Top Suggested list. This is a selection of the most commonly-used actions. Studio populates this list automatically. You can click an option in the list to add and connect to it.

  1. In CXone, click the app selector and select Omnichannel RoutingStudioThree arrows joined at the base. One points straight up, one up and to the right, and one up and to the left. .
  2. Open a script.
  3. Add the action you want to work with to the canvas workspace, if it isn't there already.
  4. Click and drag the action's connection icon A blue circle with a white arrow pointing down. Click to drag a connector to another action. away from the action and release it to pop up the Choose Actions menu.
  5. To search for an action: 

    1. In the Search actions field, enter the name or part of the name of the action you want to add.
    2. Click the action you want from the search results on the Choose Action menu.
  6. To use an action from the Top Suggested list, click the action you want to add.
  7. Change the branch condition for the connector that was just added, if necessary. Actions added using the Choose Action menu have the Default branch condition.

Change a Branch Condition

Required permissions: Studio Scripts > Create/Edit

You can change the condition that a branch uses. The condition determines what must happen for the script to take a particular branch.

  1. In CXone, click the app selector and select Omnichannel RoutingStudioThree arrows joined at the base. One points straight up, one up and to the right, and one up and to the left. .
  2. Open a script.
  3. Click to select the connector whose condition you want to change. If you have trouble selecting it, move one of the connected actions further away. Connectors cannot be selected if the actions are too close together.

  4. Click Condition in the menu that pops up.

  5. Select a new condition from the Choose Condition menu.

  6. To choose a custom condition: 

    1. Scroll down in the list of conditions on the Choose Condition menu to the Custom Conditions section. This section only appears when custom conditions have been added to the selected action. Not all actions support custom conditions.

    2. Click the custom condition you want to assign to this branch. Conditions in the Custom Conditions section are currently assigned to other branches. If you click it, the condition is reassigned to the current branch and removed from its previous location.

Create a Custom Condition

Required permissions: Studio Scripts > Create/Edit

Custom conditions allow you to define what must happen for the script to follow a particular branch. This is helpful when creating IVRClosed Automated phone menu that allows callers to interact through voice commands, key inputs, or both, to obtain information, route an inbound voice call, or both. menus. You can create a branch for each menu option and set the condition for each one to be the DTMFClosed Signaling tones that are generated when a user presses or taps a key on their telephone keypad. digit the contact must enter to select that option.

  1. In CXone, click the app selector and select Omnichannel RoutingStudioThree arrows joined at the base. One points straight up, one up and to the right, and one up and to the left. .
  2. Open a script.
  3. Add an action that supports custom conditions, such as Menu.
  4. Add a second action to your script. For example, you can add an action such as Play or Reqagent to create an IVRClosed Automated phone menu that allows callers to interact through voice commands, key inputs, or both, to obtain information, route an inbound voice call, or both. menu with Menu.
  5. Connect the two actions and click Add Custom Condition in the Choose Condition menu.

  6. Enter a name in the Enter condition name field. For example, for an IVR menu, enter the number key the contact must press to follow that branch, such as 1 or 2.

  7. Click Confirm A checkmark.. The condition name appears in an oval with the connector line on the canvas workspace.

Modify a Script

Required permissions: Studio Scripts > Create/Edit

  1. In CXone, click the app selector and select Omnichannel RoutingStudioThree arrows joined at the base. One points straight up, one up and to the right, and one up and to the left. .
  2. Open a script.
  3. Make changes to the actions in your script. In addition to adding or removing actions, you can:
    • Cut, copy, and paste actions. You can use keyboard shortcuts or right-click on an action or group of actions and select the option you want to do. Keyboard shortcuts are Ctrl+C to copy, Ctrl+X to cut, Ctrl+V to paste, and Delete.
    • Select multiple actions by clicking on the canvas and dragging a selection rectangle to include the desired actions. Click one of the actions in the selection rectangle to drag the group and reposition it on the canvas.
    • Update an action's properties or branch condition.
  4. To save the modified version of the script with a different name, click the script name at the top of the canvas workspace and select Duplicate. If you want, you can deactivate the old version.
  5. To save changes to the same script file, click Save.

Locate Actions in a Script

Required permissions: Studio Scripts View, Create/Edit

You can view a list of the actions in an open script. From the list, you can search or sort to locate a particular action.

This list shows you the actions currently in the open script. The numbers to the right of the action names are action IDs. Action IDs are assigned in the order that actions are added to the script. If you delete an action and add it back to the script, it's assigned a new action ID.

  1. In CXone, click the app selector and select Omnichannel RoutingStudioThree arrows joined at the base. One points straight up, one up and to the right, and one up and to the left. .
  2. Open a script.
  3. Click the canvas workspace to ensure no actions are selected.
  4. In the list of actions on the right side of the canvas:
    • Enter the name or part of the name of an action in the Search canvas field. As you type, the list narrows to show only actions matching the search term.
    • Sort the action list by clicking Sort By A list of lines with an arrow pointing down and the word ID next to it. and selecting the option for how you want the list of actions sorted.

  5. Click the action in the list of actions on the right side of the page.

    The script highlights the selected action on the canvas in blue and displays the action's properties instead of the list of actions. You may need to zoom out to see the highlighted action. The script doesn't snap to the selection.

Add or Modify an Action's Caption

You can add captions to actions on the script canvas. This allows you to add documentation to your script. For example, you could include information about the action and the function it serves in the script.

  1. In CXone, click the app selector and select Omnichannel RoutingStudioThree arrows joined at the base. One points straight up, one up and to the right, and one up and to the left. .
  2. Open a script or create a new one.
  3. Add an action to the script.
  4. Click the action name and select Add CaptionA square with a T and a +. .
  5. Enter text in the Add Caption field below the action on the canvas.
  6. Press Enter or click away from the action to exit edit mode.
  7. To edit an existing caption, double-click the caption field to enter edit mode. You can also click the action name and select Edit CaptionA square with a T and a +..
  8. To delete a caption, double-click the caption field and delete the text from it, then press Enter.
  9. Save your script.

Add a Note or Annotation to a Script

In Studio, there are two actions you can use to add documentation to your script: Annotation and Note. Annotation allows you to add text that is visible on the script canvas. The text in a Note action can only be seen by viewing the action's properties. You do not need to connect either action to the other actions in your script.

When you first add a NOTE action to your script, it appears as a small chat bubble filled in solid black: A chat bubble filled with solid black.. After you add text to it, the appearance changes to a small chat bubble filled with blue and some horizontal lines representing text: A speech bubble filled with solid blue and some horizontal lines..

  1. In CXone, click the app selector and select Omnichannel RoutingStudioThree arrows joined at the base. One points straight up, one up and to the right, and one up and to the left. .
  2. Open a script or create a new one.
  3. To add a note to the script: 
    1. Click Actions A rectangle, circle, and triangle partially layered on top of each other. Click to open the Actions panel. in the left icon menu to open the Actions palette.
    2. Search for note and drag the NOTE action to the canvas.
    3. Click to select the NOTE action, then enter your message in the Comments field in the action's properties.
  4. To add an annotation to the script, you can do any of the following:

    • Right-click on the script canvas and click Text. The cursor changes to a cross and you can draw a rectangle on the canvas. When you release the cursor, the focus is on the ANNOTATION action rectangle so you can start typing immediately without additional clicks.
    • Press T on your keyboard to change the cursor so you can draw an ANNOTATION on the script canvas.
    • Click TextA stylized capital T. in the left icon menu. The cursor changes to a cross and you can draw the action on the script canvas.
    • Click ActionsA square, triangle, and circle layered that overlap. in the left icon menu, search for annotation, and drag it to the canvas.
  5. To edit a note, select the action and change the text in the Comments field.
  6. To edit an annotation, double-click the ANNOTATION action on the canvas and make your changes.
  7. Save your script.