Assign
This help page is for CXone Studio. This information is also available for Desktop Studio.
|
Assigns a unique value to a user-defined variable. |
Supported Script Types
|
|
|
|
|
|
|
|
Generic |
Chat | Phone | Voicemail | Work Item | SMS | Digital |
Input Properties
These properties define data that the action uses when executing.
Property |
Description |
---|---|
|
Enter a short phrase that uniquely identifies this action in the script. The caption appears on the script canvas under the action icon. |
Variable | The name of the variable that you want to hold the value. |
Value | The value or data to be stored. |
Type | Choose from String, Numeric, or Datetime. 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 |
A property of the variable you create. When set to true, the variable's value appears in the default screen pop A configurable pop-up window with information about the contact. It appears on an agent's screen after a certain event, usually when the agent connects to a contact. displayed for the agent. The Use Screen Pop option must be enabled for the current ACD skill Used to automate delivery of interactions based on agent skills, abilities, and knowledge . The default is
In Value Mode:Click to Yes to enable this value to be displayed in the default screen pop. In Expression Mode:Enter True to enable this value to be displayed in the default screen pop. |
Save to DB |
A property of the variable you create, which controls whether the variable's value is saved to the CXone platform database. You can access the stored data in two ways:
You can also use the The default is In Value Mode: Click to Yes to enable this value to be saved to the database. In Expression Mode: Enter True to enable this value to be saved to the database. |
Max String Size | The maximum size in KB of the value that can be stored. The default size is 2 KB. Select from these options: Limit 2K, Limit 4K, Limit 8K, Limit 16K, Limit 32K. |
Result Branch Conditions
Result branch conditions allow you to create branches in your script to handle different outcomes when an action executes.
Condition |
Description |
---|---|
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.
- Learn about using the Assign action to add or edit the value of a variable on the Variables help page.
- Script variable values will automatically be merged or pre-populated into the Quick Reply variables in the agent application when the variable names match and the script Assign action is set to ScreenPop = true. If variable values are successfully merged, 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 the agent application's performance.
- Create a global variable in a subscript by including the keyword global in front of the variable name. For example: Global:varName
Script Example
This is an example to show how this action can be used in scripts. It is not intended to be a complete script. Additional scripting may be required.
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 for Skill ID 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?