Manage Scripts

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

This page provides information about tasks you may need to do when working with scripts.

Other script management tasks found elsewhere in the online help include:

  • Revert to a previous version of a script.
  • Promote a script to the next development workflow stage.
  • Commit script changes to a source control system such as GitHub.

View a Script's Properties

Required permissions: ACD > Studio > Scripts > View

The script properties are available on the panel on the right side of the script canvas. The properties panel doesn't show everything that's available in the Properties tab in Desktop Studio. For example, you cannot change the script's media type at this time.

  1. In CXone, 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 a script.
  3. On the right side of the script canvas, view the properties panel. This panel contains the following options: 
    • Actions tab: Shows 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.
    • Sort By: Allows you to sort the list of actions. You can sort by name or action ID, and in ascending or descending order.
    • Variables tab: Allows you to list variables that should be redacted from traces and logs.
    • 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.
    • 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.

Revert to Previous Version of Script

Permissions required: Contact Settings > Scripts >  Edit

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 from 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, or you can move them into a separate folder.

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

Put a Script into Production

Required permissions: Points of Contact Edit

When a script is fully tested and ready to put into use in CXone, 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 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. A naming convention doesn't tell CXone which scripts to use.

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

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 X's are used, meaning that a redacted five-letter word would result in five X's. 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 to ensure that it's redacted.

  1. In CXone, 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 a script.
  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.

Search Within a Script (Simple Search)

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. The search bar is at the top of the properties panel on the right side of the script canvas.

  1. In CXone, 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 a script.
  3. Enter a search term in the search bar. Results of your search appear below the search field as you type, replacing the list of actions.
  4. Click an option in the search results to highlight the corresponding action on the script canvas.

Configure Script Locking

Permissions required: Contact Settings > Scripts > Edit

Studio can lock scripts when one user has the script open. This prevents multiple users from making changes to the same script and causing issues with one save overwriting the other. A CXone administrator can configure Studio to allow script locking.

  1. In CXone, click the app selector and select ACD.
  2. Go to ACD ConfigurationBusiness Units.
  3. On the Details tab, click Edit.

  4. Select Allow Script Locking.
  5. Select the Default Behavior that you want Studio to do when a script is opened.

  6. Click Done.

Lock and Unlock Scripts

Required permissions: Studio Scripts View, 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.

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, 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 a script.
  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: 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 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, 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 Scripts page. You can also see them on the Scripts page in the CXoneACD application.

You don't need to deactivate a script to prevent CXone from using it. CXone 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, 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 if you want to explain why you deactivated the script:
    1. In CXone, 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 CXone Studio.

  1. In CXone, 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.