Assigns a unique value to a user-defined variable.

Supported Script Types

The icon for a Generic script type - a rectangle with < and > symbols inside it. The icon for the Email script type - a large @ symbol in a diamond. The icon for the Chat script type - a chat bubble with an ellipsis inside (...), in a diamond shape. The icon for the Phone script type - an old-style phone handset with curved lines indicating sound coming out of it. The icon for the Voicemail script type - a symbol that looks like a cassette tape - two circles sitting on a horizontal line. The icon for the Work Item script type-a piece of paper with one corner folded down and a bullet list on it. The icon for the SMS script type - a smart phone with a chat bubble coming out of it. The icon for the Digital script type - a computer monitor with a smartphone next to it.
Generic Email Chat Phone Voicemail Work Item SMS Digital


Property Details
Variable The name of the variable that you want to hold the value.
Value The value or data to be stored.
Type String, Numeric, or Date/Time. The type you select here changes the Value property to interpret the data entered in the Value field. For example, if you select String and enter the value 1+1, the actual value assigned to the variable is 1+1. However, if you select Numeric and enter the value 1+1, the value assigned to the variable is 2.
ScreenPop Select True or False. If true, the variable and value will display in the default screen pop window assigned at the ACD SkillClosed Used to automate delivery of interactions based on agent skills, abilities, and knowledge level.
SavetoDB Select True or False. If true, the variable and value will be stored in the CXone platform database and can be accessed using the Custom Data report located in Data Download. Refer to Data Download Reports for more information.
MaxStringSize The maximum size of the value that can be stored (in kb). The default size is 2 KB.


Branch Details
Default Path taken unless the script meets a condition that requires it to take one of the other branches. It is also taken if the action's other branches are not defined.
Overflow Path taken if the value assigned to the variable exceeds the maximum string size.

Tips & Tricks

  • Use Assign to set the contents for either string or numeric variables.
  • Use the Assign Properties Editor to edit the value of the variables.
  • Script variable values will automatically be merged / pre-populated into the Quick Reply variables in MAX when the variable names match and the script Assign action is set to ScreenPop = true. If variable values are successfully merged, MAX agents will retain the ability to manually modify the pre-populated Quick Reply fields. The total amount of variable data configured to ScreenPop should not exceed 200 KB; larger amounts of data may slow MAX performance.
  • Create a global variable in a subscript by including the keyword global in front of the variable name. For example: Global:varName

Phone Script Example Using Assign

Begin triggers a Menu that provides three options - press 1 for Sales, 2 for Support, or 3 for Account Management. When the user selects an option, the script uses a specific Assign action to assign a value - the Skill ID (set using the Assign Properties editor) that Countagents uses to determine the number of agents logged in with that skill. The If action then uses an expression (TOTAL=0) to determine which branch to take if agents are logged in - TRUE means the total agents logged in does equal 0 for that Skill, and the script will run a separate script for leaving a message. FALSE means the total agents logged in does not equal 0, and Reqagent uses the variable value in Assign to request an agent with the skill (via the Skill ID in Newskill).

Would you like to download this script?