Manage Scripts

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

This page provides information about tasks you may need to do to manage the state of your scripts. The Work with Scripts help page can help you learn how to create and modify scripts. The Work with Actions in Scripts page can help you learn how to add and configure actions in your scripts.

View a Script's Properties

Required permissions: ACD > Studio > Scripts > View

Script properties are available on the panel on the right side of the script canvas. Currently, only some of the information that's available in a script's properties in Desktop Studio is available in Studio. These options are available in different locations in Studio: 

  • Script tracing configuration: These are available when you click Trace on the script canvas.
  • Parameter values to start a script with a trace: These are available when you click Trace on the script canvas.
  • Name of the business unit where the script is saved: You can access the name of the business unit by selecting My Profile from your initials A circle with the letters NC inside it. in the upper right corner of CXone Mpower.
  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. On the right side of the script canvas, view the properties pane. The default tab is the Actions tab, where you can: 
    • View actions in the script: View a list of all actions currently in the script. Beside each action is the action's ID, a numeric identifier assigned in the order the action was added to the script. Beneath each action is its caption, if it has one. Click an action in the list to highlight the corresponding action on the canvas.
    • Search canvas: Allows you to search the script canvas. The search can find actions or terms in captions or annotations on the script canvas. It cannot search values in action properties, including in editor windows. Results of your search appear below the search field, replacing the list of actions.
    • Sort By: Allows you to sort Icon of three stacked horizontal lines next to a down arrow. the list of actions. You can sort by name or action ID, and in ascending or descending order.
    • View errors and warnings: Allows you to see if the script currently has any errors or warnings. If there are any, the button label includes the number. Click the button to view a list of the errors or warnings.
  4. Click the Variables tab. On this tab you can:

    • View related actions: Expand each variable to see the action or actions that use the variable. You can affect all variables with the expand all Icon of three stacked horizontal lines next to a down arrow. and collapse all Icon of three stacked horizontal lines next to a right arrow. options. If you make changes to the variables in the script, you can reload Icon of a circular arrow pointing at its own tail. the list.
    • View related action properties: Click one of the actions to see the properties of the action and highlight the action on the script canvas. The action properties replace the variables list on the properties pane.
    • Redact variables: Create a list of variables in this script that you want to redact Icon of an eye with a backslash across it. in traces and logs.  

View a Script's History

Required permissions: ACD > Contact Settings > Scripts > View

You can view previous versions of a script, see the date and time the script was changed, and the user who made the change. The previous versions of the script open in the same tab as the active version of the script. Previous versions of the script cannot be modified.

A script's version history is limited to the development stage it's currently in. You can see any changes that have been made since the script was promoted to that stage. To see changes made from an earlier stage, you must open the script in that stage's folder. Development stages are an optional feature that must be enabled in Studio.

  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.
    1. Click the script name at the top of the page and select Version History. The Version History pane opens on the left side of the page.

    2. On the Version History pane, click a previous version to see the script at that point in time. The script displayed in the tab changes to that version.
    3. To save a previous version with a new name, click Save Version As in the upper right corner of the page. Specify the name and location and click Save. The saved version becomes the active script in the current tab.

      If you save a previous version of a script with the same name as the active version of any script, Studio overwrites active script with the past version you're attempting to save.

  3. To return to the editable view of the active version of the script, click the arrow next to the date in the top left corner of the page.

Revert to Previous Version of Script

Studio keeps previous versions of all scripts. Each time you save your changes, another version is added to the script file's history. You can revert to a previous version of a script file.

If you have saved a copy of a script under a different name as a backup and want to revert back to it, don't follow these steps. Instead, open the backup copy you want to revert to. You can work in the backup copy, or you can duplicate it to create a new working copy and leave the backup in place. You can deactivate copies of scripts that you don't want anymore.

Revert to a Previous Version of a Script from Studio

Permissions required:  Applications > Studio > Scripts > Create/Edit

  1. In CXone Mpower, click the app selector and select Studio.
  2. Open the script you want to revert. If the script you want to revert is currently deactivated, you must reactivate it first.
  3. Click the script name at the top of the page and select Version History. The Version History pane opens on the left side of the page.

  4. On the Version History pane, click a previous version to see the script at that point in time. The script displayed in the tab changes to that version.
  5. Click Restore.
  6. Click Restore again to confirm that you want to revert to the open version. The selected script becomes active in the current browser tab.

Revert to a Previous Version of a Script from CXone Mpower

Permissions required:  ACD > Contact Settings > Scripts > Edit

When scripts are reverted from CXone Mpower, the name of the file doesn't change as it does when you revert from Studio.

You must close the script in Studio before you revert it. If the script is open, you won't see the changes unless you close and reopen the script. If you leave the script open when you revert it, then make changes and save the script without closing and reopening it, you overwrite the reversion and must revert it again.

  1. In CXone Mpower, click the app selector and select ACD > Scripts.
  2. Click the script you want to revert. If the script you want to revert is currently deactivated, you must reactivate it first.
  3. On the Version History tab, select the version you want to revert to from the Previous Versions list and click Revert Back.

  4. In Studio, open the script you reverted and continue working on it.

Compare Two Scripts

Required permissions: Studio Scripts View

You can compare two scripts to see the differences between them. The scripts can be two historical version of the same script, or two different scripts. Studio compares the actions in each script according to their action ID and notes differences in the Find Results window.

Action IDs are assigned to actions in the order they're added to a script. If you delete an action and add another action of the same kind, it's assigned the next sequential ID number. The script does not reuse action IDs when you delete an action from the script.

When you run a script comparison, Studio compares the actions with ID 1, then 2, and so on. It lists any differences between the two actions in the Find Results pane. If the order of the actions is the same but their action IDs are different, the script comparison will report them as differences.

You can choose which information you want to be reported in the Find Results window. You can compare: 

  • The position of the actions on the script canvas.

  • The configuration of action properties and parameters.

  • The parameters

  • A line-by-line comparison of an action's properties. Applicable only for actions such as SNIPPET that have properties with multi-line configurations.

  • The branches that each action uses.

  • The actions' captions.

Compare Different 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. Open the scripts you want to compare. They must be open in the same browser window. Each script must be fully loaded in its tab.

  3. In one of the open scripts, click the script name at the top of the page and select Compare.
  4. On the Compare Scripts window, choose a script from the Left Script dropdown.
  5. From Right Script, select the script you want to compare to the first script.
  6. Under Compare Settings, select the script components you want to compare between the selected scripts.

  7. Click Compare. The Find Results window opens on the page.
  8. Review the differences between the scripts in the Find Results window.

Compare Historical Versions of a Script

  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 enter the criteria to search for a script, press Enter.
  3. Select All Versions from the drop-down on the top right side of the page. The page displays the current and historical versions of the scripts that match your search.
  4. Double-click on each version of the script you want to compare to open them.
  5. In one of the open versions of the script, click the script name at the top of the page and select Compare.
  6. On the Compare Scripts window, choose one version of the script from the Left Script dropdown.
  7. From Right Script, select the version of the script you want to compare to the first script.
  8. Under Compare Settings, select the script components you want to compare between the selected scripts.

  9. Click Compare. The Find Results window opens on the page.
  10. Review the differences between the scripts in the Find Results window.

Redact Variables from Traces and Logs

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

Variable redaction eliminates variable values from traces and logs generated by a script. You can redact variables and objects.

Redaction is configured at the script level in the VariableRedaction field of a script's properties. Redacted values are replaced with a string of X characters. The length of the variable value determines how many Xs are used, meaning that a redacted five-letter word would result in five Xs. Partial variable redaction, such as part of a credit card number, is not supported.

Variable redaction occurs at the script level. It isn't an inheritable property. If a redacted variable is passed to other scripts, such as with a RunScript or RunSub action, that variable isn't automatically redacted in the subsequent scripts. If you want a variable to always be redacted, you must configure variable redaction in all scripts it might be passed to.

Variables that are passed into other scripts have a global scope. To redact them, you must include global: before the variable name in the VariableRedaction field to ensure that it's redacted.

Best practice is to never keep sensitive data in a script longer than necessary. In addition to redacting variable values, you can delete the data from the variable.

To redact variables in Desktop Studio:

To redact variables in Studio:

  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. In the properties panel on the right side of the script, click the Variables tab.
  4. Click Redacted An eye with a diagonal line through it. .

  5. In the field on the Variables tab, enter the name of each variable you want to redact.  Press Enter after each variable. These names should correspond to variables created in Assign or SNIPPET actions in the script.
  6. Click Redacted An eye with a diagonal line through it. again to hide the list of variable names.

  7. Save your script.

Delete Sensitive Data from a Variable

In addition to configuring variable redaction, you can configure your script to delete sensitive data from a variable. This helps ensure that it doesn't persist in the script longer than necessary.

  1. In your script, place a Snippet action after the sensitive data has been used and is no longer needed.
  2. In the Snippet editor of the Snippet action, add the appropriate line for each variable you want to clear sensitive data from: 
    • For a dynamic data object: DYNAMIC <object name>
    • For a regular variable: ASSIGN <var name> = ""
  3. Save your changes.

 

Lock and Unlock Scripts

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

Scripting locking allows you to lock a script so that only you can edit it. This prevents multiple Studio users from modifying a script at the same time. This is an optional feature that must be enabled in CXone Mpower.

When you want to edit a script, you must lock it. This puts the script into edit mode. Scripts stay locked until you unlock them, or until another Studio user overrides your lock. When you're finished working with a script, you can unlock it. This places the script in read-only mode and makes it available for other Studio users to edit if they need to.

Before you lock a script, Studio refreshes the script. This loads any changes that may have been made by other Studio users between the time you opened the script and when you lock 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. 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. Hover the cursor over the eye A line drawing of an eye. next to the script name in the toolbar at the top of the canvas workspace and select Edit Script (Lock).

  4. When you're finished working with the script, hover your cursor over the lock A lock. next to the script name in the toolbar at the top of the canvas workspace and click View Only Script (Unlock).

Override a Locked Script

Required permissions: ACD > Studio > Scripts > Lock Override

When you open a script that's locked for editing, the icon next to the script name above the canvas workspace is a closed lock A closed padlock style lock.. You can hover the cursor over the icon to see who locked the script. If it's you, you have the option to unlock the script and put it into read-only mode. If it was locked by another user, it shows the name of the user.

If your CXone Mpower role includes the Lock Override permission, the drop-down also includes the option to override the lock. When you override a script lock, Studio loads the latest saved version of the script. If the other user has unsaved changes they cannot be saved after the lock is overridden. If the other user attempts to save the script after the lock is overridden, they see an error message letting them know about the override. When a script's lock has been overridden, it can be duplicated and saved with another name.

You can review changes to a script by viewing a previous version of it. This is helpful if another user has edited a script and you want to know what they changed.

Be sure to follow your organization's guidelines for overriding other users' script locks.

  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 the ellipsis next to the script you want to override and select Lock Override.
  3. Alternatively, you can: 
    1. Open a script that's locked by another user.
    2. Click the lock A closed padlock style lock. next to the script name in the toolbar above the canvas workspace and click Lock Override.
    3. Click OK when prompted to confirm you want to override the other user's lock. A status message appears when the lock is successfully overridden.

Deactivate a Script

Required permissions: ACD > Studio > Scripts > Deactivate

Scripts cannot be deleted from Studio. Instead, you can deactivate them. Deactivated scripts are only visible in Studio if you choose to view All or Inactive scripts on the Studio Scripts tab. You can also see them on the Scripts page in the CXone MpowerACD application.

You don't need to deactivate a script to prevent CXone Mpower from using it. CXone Mpower only uses scripts that are assigned to a skillClosed Used to automate delivery of interactions based on agent skills, abilities, and knowledge. and a point of contactClosed The entry point that an inbound contact uses to initiate an interaction, such as a phone number or email address..

  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 deactivate.
  3. Click the three horizontal dots Three dots in a row. next to the script and select Deactivate. You can also open a script and click the down arrow button next to the script name and select Deactivate from the drop-down menu.
  4. Confirm that you want to deactivate the script. A notification appears in the lower right corner of the window when the deactivation is complete.
  5. You can add notes to the script in CXone Mpower if you want to explain why you deactivated the script:
    1. In CXone Mpower, click the app selector and select ACDScripts.
    2. Select Inactive from the Show drop-down.
    3. Click the script and add your comments on the Notes tab.

Reactivate a Script

Required permissions: ACD > Studio > Scripts > Deactivate

You can reactivate a script to make it visible in Studio again. Currently, you cannot reactivate a script from within Studio.

  1. In CXone Mpower, click the app selector and select ACDScripts.
  2. Select Inactive from the Show drop-down.
  3. Click the script you want to reactivate.
  4. Click Activate on the Details tab of the script's page.

Put a Script into Production

Required permissions: ACD > Contact Settings > Points of Contact Edit

When a script is fully tested and ready to put into use in CXone Mpower, you can put it into production. To do that, you need to assign a script to a point of contactClosed The entry point that an inbound contact uses to initiate an interaction, such as a phone number or email address. in CXone Mpower ACD.

If you use a naming convention to identify scripts that are in development or production, it helps you and other scripters in your organization know which scripts are ready to use. However, it also introduced untested changes to a production environment. If your organization uses development workflows, it avoids changing the name of the script by copying the script into a production folder.

Only assign scripts to points of contact if you're certain that they're fully tested and ready for production. Putting a script that isn't ready into production can result in contacts not being routed for the selected point of contact.

  1. Click the app selector icon of app selector and select ACD.
  2. Go to Contact SettingsPoint of Contact.

  3. Click the point of contact you want to assign a script to.
  4. Click Edit.

  5. Select the Script that you want this point of contact to use. The drop-down list shows all active scripts currently available for the Media Type of the current point of contact.
  6. Click Done.