Work with Scripts

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

The tasks described on this page are essential to using Studio. They include things such as creating or opening scripts, adding and configuring actions, and connecting actions to each other. The Manage Scripts help page can help you learn how to do tasks with your scripts such as viewing version history, redacting variables, and locking or unlocking.

Create a Script

Required PermissionACD > Studio > Scripts > Create/Edit

Currently, 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 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. 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.

Open a Script

Required permissions: ACD > Studio > Scripts > View

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

  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. 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.

Modify a Script

Required PermissionACD > Studio > Scripts > Create/Edit

  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. The script opens in a new tab.
  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.
    • Modify the path a connector takes between actions.
  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.

Create a Copy of a Script

Required permissions: ACD > Studio > Scripts > Create/Edit

Currently, 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 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 the script you want to duplicate.
  3. Click the three dotsThree 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. If your organization uses script development lifecycle management, you must select the Stage and Target Folder for the script you're duplicating.

  8. Click Duplicate.

Export a Script

Required PermissionACD > Studio > Scripts > Import/Export

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, you might need to send a script to your CXone Mpower Account Representative. If your organization has more than one CXone Mpower business unitClosed High-level organizational grouping used to manage technical support, billing, and global settings for your CXone Mpower system., you may need to move scripts between them. You can do this by exporting from one business unit and loading them into another.

Studio scripts are in JSON. Desktop Studio scripts are in XML. This means that exported scripts can only be loaded into the application they were exported from. However, after loading 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 loading.

  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 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.

Load a Script

Required PermissionACD > Studio > Scripts > Import/Export

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

Studio scripts are in JSON. Desktop Studio scripts are in XML. This means that you can only load scripts into the application they were exported from. After loading 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 loading.

Scripts open automatically in a separate browser tab after being loaded. However, you must save them or the file is not kept.

  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. 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 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.

Search for Scripts (Advanced Search)

You can search for scripts on the Scripts page using the following criteria: 

  • One or more words in the script name.
  • An action the script contains.
  • One or more words in the captions of actions in the script.
  • The name or value of a variable referenced in the script.
  • The script media type, such as chat, digital, or phone.

You can add one search term for each criteria.

  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 Add Criteria and select an option: 

    • To search by script name, click Script and enter a word or partial word that's part of the script name.

    • To search by the name of an action, click Action and enter the name of the action. Select the matching action in the drop-down list that appears.

    • To search by action caption text, click Caption and enter one or more word or words to search for.

    • To search by variable name, click Variable and enter some characters in a variable name.

    • To search by variable value, click Variable and enter one or more words or characters in the variable value.

    • To filter by script media typeClosed A medium, such as voice, email, and chat, through which a contact connects with an intended recipient., click Type and select the media type of the script you want to find.

  3. Press Enter to apply the search criteria. The list on the page displays all scripts matching the criteria you added.

  4. Repeat step two to add one of the remaining criteria, if needed.

  5. To remove a criteria, click the X on the box in the search bar.

Locate Actions in a Script

Required PermissionACD > Studio > Scripts > Create/Edit

You can view a list of the actions in the current script on the Actions tab. This tab is located in the script properties pane on the right side of the script canvas. From the list, you can search or sort to locate a particular action.

This list shows you the actions 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 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. The script opens in a new tab.
  3. Click the script canvas to ensure no actions are selected.
  4. On the Actions tab in the properties pane on the right side of the canvas:
    • Review the list of actions in the current script. By default, the list shows you all actions in the script organized by action ID number.
    • 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 an action on the Actions tab.

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

  6. To return to the script properties pane and the list of actions, click the script canvas to deselect the action.

Locate Variables in a Script

Required PermissionACD > Studio > Scripts > Create/Edit

You can view a list of all variables referenced in your script on the Variables tab. This tab is located in the script properties pane on the right side of the script canvas. The tab displays an alphabetical list of the actions that contain references to variables. The variables referenced in each action appear under that action in the list.

  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. The script opens in a new tab.
  3. Click the canvas to ensure no actions are selected.
  4. In the properties pane on the right side of the canvas, click the Variables tab. It displays a list of actions in the script.
  5. Click a variable in the list. The list expands to show the actions that reference that variable.
  6. Click an action under a variable name to view that action's properties.

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

  7. To return to the script properties pane and the Variables tab, click the script canvas to deselect the action.

Add a Note or Annotation to a Script

Required PermissionACD > Studio > Scripts > Create/Edit

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 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. To add a note to the script: 
    1. Click ActionsA 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 Text A 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 Actions A 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.