Manage Scripts

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

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.
  6. Click Done.

Compare Scripts

Required permissions: Studio Scripts View

You can compare two scripts by captions, parameters, branches, or position. The Find Results tab shows the differences and similarities between the selected scripts.

  1. Open both scripts that you want to compare. Be sure to save any changes that you recently made.
  2. Click Edit > Compare to open the Compare Scripts window.
  3. Select a script in the Left field, and the other script in the Right field. Pay attention to which script you select, as all scripts currently open in Studio appear in these drop-downs.
  4. Configure the General Options and Compare Settings sections. These sections allows you to determine which elements of the scripts that you want to compare. Note that the Position element refers to the X and Y axis for each action on the canvas.

  5. Click Compare. The results appear in the Find Results tab. If you do not have the Find Results tab open, click View > Find Results from the menu.

View a Previous Version of a Script

Required permissions: Studio Scripts View

The number of previous versions of a script that Studio keeps is configurable by a CXone administrator.

  1. In Studio, click the Browse tab.
  2. Right-click on a script and click History
  3. Click the version you want to view. If locking is enabled in Studio, the previous version of the script opens in read-only mode.

Redact Variables from Traces and Logs

Required permissions: 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 Studio, click on the script canvas to make sure nothing is selected.
  2. Click the Properties tab.
  3. Click the ellipsis button next to the VariableRedaction field to open the String Collection Editor.
  4. Enter the names of the variables you want to redact. These names should correspond to variables created in Assign actions in the script.
  5. Click OK.

Configure Script Locking

Permissions required: Contact Settings > Scripts > View, 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. Click Allow Script Locking.
  4. Select the Default Behavior that you want Studio to do when a script is opened.

  5. Click Done.

Configure the Number of Script Versions Kept in History

Permissions required: Contact Settings > Scripts >  Edit

Studio keeps previous versions of all scripts. You can configure how many versions of a script are kept in its history. This determines how far back you can go if you need to revert to a previous version of script.

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

  4. In the Max Script History field under Scripts, enter the maximum number of versions of each script that you want to keep.

  5. Click Done.

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 and want to revert back to it, don't follow these steps. Instead, open the copy you want to revert to and use Save As to create a new copy. You can deactivate copies of scripts that you don't want anymore, or you can move them into a separate folder.

Revert to a Previous Version of a Script in Studio

Permissions required: Studio Scripts Create/Edit

  1. On the Browse tab in Studio, locate the script you want to revert.
  2. Right-click on it and select History, then click the version you want to go back to. The selected version opens with the date and time it was saved appended to the end of its name. For example, a script that was saved on August 2, 2022 at 9:32:08, the end of the script name is 08022022093208.
  3. Click File > Save As and save a copy of the file with a new name. Historical versions of script files open in permanent read-only mode.

Revert to a Previous Version of a Script from CXone

Permissions required: Contact Settings > Scripts >  Edit

If you have the appropriate permissions, you can revert to a previous version of a script from the Scripts page in the CXone ACD application.

When scripts are reverted from CXone, 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, click the app selector and select ACD > Scripts.
  2. Click on 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.