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 contact 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.
- Click the app selector
and select ACD.
-
Go to Contact Settings > Point of Contact.
- Click the point of contact you want to assign a script to.
- Click Edit.
- Select the Script that you want this point of contact to use.
- 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.
- Open both scripts that you want to compare. Be sure to save any changes that you recently made.
- Click Edit > Compare to open the Compare Scripts window.
- 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.
-
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.
Learn more about fields in this step
Field Details Ignore Case Select if you want the comparison to ignore differences in case in the elements that are compared. For example, if you select Ignore Case, the captions First Level Menu and First level menu aren't noted as differences, but they are you don't select it. Compare Captions
Select if you want to compare the captions of actions in each script.
Compare Parameters Select if you want to compare the properties of actions in each script. Compare Parameters Line by Line Select if you want to compare the parameters line by line. Compare Branches Select if you want to compare the configured branches in each script. Compare Position Select if you want to compare the location of the actions on the canvas of each script. This option reports the position of each action with its X-Y axis coordinates. For example, {X=464, Y=416). - 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.
- In Studio, click the Browse tab.
- Right-click on a script and click History
- 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.
- In Studio, click on the script canvas to make sure nothing is selected.
- Click the Properties tab.
- Click the ellipsis button
next to the VariableRedaction field to open the String Collection Editor.
- Enter the names of the variables you want to redact. These names should correspond to variables created in Assign actions in the script.
- 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.
- In CXone, click the app selector
and select ACD.
- Go to ACD Configuration > Business Units.
- Click Allow Script Locking.
-
Select the Default Behavior that you want Studio to do when a script is opened.
Learn more about fields in this step
Field Details Lock On Open Studio automatically locks scripts when they're opened. When a user opens a script, the icon next to the script name changes to a lock and the script appears on the Locked tab. Read Only On Open
Studio opens scripts in read-only mode. The script canvas is gray instead of white. To edit the script,lock it.
- 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.
- In CXone, click the app selector
and select ACD.
- Go to ACD Configuration > Business Units.
-
On the Details tab, click Edit.
-
In the Max Script History field under Scripts, enter the maximum number of versions of each script that you want to keep.
- 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
- On the Browse tab in Studio, locate the script you want to revert.
- 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.
- 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.
- In CXone, click the app selector
and select ACD > Scripts.
- Click on the script you want to revert. If the script you want to revert is currently deactivated, you must reactivate it first.
-
On the Version History tab, select the version you want to revert to from the Previous Versions list and click Revert Back.
- In Studio, open the script you reverted and continue working on it.