Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

When to use Global Variables as opposed to Call Variables 1

Status
Not open for further replies.

Steviebgood

Technical User
Nov 12, 2004
23
CA
Hi There,

Could someone assist me in determining the difference between Global Variables and Call Variables and when to use either or?

Thanks
 
What are global variables?
Global variables are script variables that you can use in any script on the system. The value of a global variable can be changed only in the Script Variables window. The value cannot be changed in the script.
Example:
BestAir Airlines has a global variable named business_hours_gv that is assigned a value of 08:00 a.m. to 05:00 p.m. BestAir uses this variable in its script as follows:
IF (TIME OF DAY = business_hours_gv) THEN
GIVE RAN open_ran_gv
END IF

What are call variables?
Call variables are script variables whose value can change for each contact. The value of a call variable follows passes from one script to the next with the contact. The initial value of a call variable is assigned in the Script Variables window. Each incoming contact uses this value unless it is changed in the script by one of the following commands:
-ASSIGN TO
-COLLECT DIGITS
-GET RESPONSE
Non-voice contacts can use only the ASSIGN TO command. The COLLECT DIGITS and GET RESPONSE commands apply to voice contacts only.
Examples:
You can use the ASSIGN TO command in a script to give a value to a variable for the duration of a contact. The following example assigns the value of the total number of active voice contacts, divided by the call rate, plus 10, to the variable int_var.

ASSIGN (TOTAL ACTIVE CALLS / CALL RATE + 10) TO int_var_cv

At BestAir Airlines, voice contacts enter their customer account number. BestAir uses the COLLECT DIGITS command to gather this information. The customer account number is stored in a call variable. In this example, when a voice contact enters a 10-digit account number, the information is stored in the call variable caller_acct_num_cv. The call variable is of the DN type.

COLLECT 10 DIGITS INTO caller_acct_num_cv


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top