Assign
![]() |
Assigns a unique value to a user-defined variable. |
Supported Script Types
Properties
Property | Details |
---|---|
Variable | The name of the variable that you want to hold the variable 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 ![]() |
SavetoDB | |
MaxStringSize | The maximum size of the value that can be stored (in kb). The default size is 2 KB. |
Branches
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 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 200Kb; larger amounts of data may slow MAX performance.
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?