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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AACC scripting - use of global vs call variables 1

Status
Not open for further replies.

MikeyTen4

Technical User
Jun 19, 2014
44
GB
Hi everyone

Apologies is this is the wrong area of the forum for this post, I took a guess based on some other AACC scripting related posts. Just looking for some clarification on my understanding of global and call variables.

I have an application where an integer call variable can have a value added to it by the IVR choice of a user dialing in on a particular line. The result is that this same integer call variable is then read within a different application where other calls are arriving, resulting in specific call handling of those calls. So essentially, someone can call in on the first line and the IVR to control the call handling taking place on the second line.

My confusion stems from this integer variable being a call variable. Shouldn't it need to be global in order for the value added to it in on the first call to be present when it is read on another call, under a different application?

This is a feature which has been in place for many years. It works and I've never needed to amend it. But now I need to replicate a similar feature for another line and having turned to this for reference, it's got me scratching my head.

Thanks in advance!
 
What you are referring to is a Wild Variable a bit of an explanation

Call variables are issued to the call when entering a script they can then be manipulated in the script and are only relevant to that call. next call gets its own copy of all the call variables (choices in IVR etc.)

Global variables are more static and are not manipulated by the calls (Days, Dates, Times etc.)

A wild variable you can alter in one script like a call variable but it is stored alot like a Global variable and made available to other scripts. A way I have used it in the past is so a call centre can be closed down remotely, for example a bomb scare everyone leaves no one logs off. You could dial in to a CDN enter a password and make an IVR selection that would alter a wild variable, then in the Master script you could look at that variable and give an emergency message and disconnect.

 
READVAR and SAVEVAR

Enable a call to change the value of a variable and pass the updated value to other calls.

READVAR
READVAR uses an existing integer call variable as a parameter, and then reads the current value of
the call variable from the Wild Variable table. If the value does not exist in the Wild Variable table,
READVAR reads the value from the Call Variable table.

You must terminate a READVAR block by using a SAVEVAR command with limited commands
allowed in the block.

Wild variable is configured using the below:

SAVEVAR
SAVEVAR saves the current value of the call variable to the Wild Variable table.
You can use the following commands only between READVAR and SAVEVAR:
• ASSIGN
• LOG
• IF-THEN-ELSE-END IF

Syntax
READVAR <integer_call_variable>
<optional statements>
SAVEVAR
Parameters
<integer_call_variable> The variable into which you want to read the value.
<optional statements> One of the following commands with appropriate syntax:
• ASSIGN
• LOG
• IF-THEN-ELSE-END IF
 
Bignose21, you hit the nail on the head, thanks very much! The example of how this kind of variable can be used is exactly what I'm using it for - an 'evac control' for the event of fire, bomb threat, etc. the existing feature uses CLID to approve the caller, then offers an IVR where they can either close or open a line. It stopped working when we removed CallPilot due to voice prompts no longer being available, so I'm re-implementing it using the product we used to replace CallPilot.

You're explanation is bang on. This is the relevant part in the scripts I'm looking at...
Code:
READVAR wv_emerg_evac_cv
	IF wv_emerg_evac_cv = 0 THEN
		ASSIGN wv_emerg_evac_cv + 1 TO wv_emerg_evac_cv
	END IF
SAVEVAR

In the scripts where this variable is subsequently read I've got...
Code:
READVAR wv_emerg_evac_cv
SAVEVAR

WHERE wv_emerg_evac_cv EQUALS
	VALUE 1 : EXECUTE SCRIPT evac_message
	DEFAULT : EXECUTE CSC_hours
END WHERE

I'd seen the READVAR and SAVEVAR syntax, but hadn't understood the specific relevance and had never heard the term "wild variable" before. Now I know!

Thanks very much, this is great to learn.
Mike
 
Just out of interest...

I'm not sat in front of it right now, but I'm pretty sure that when I set up a new integer variable I'm given the choice of making it global or call, as usual. Would it still work if I simply used a global integer variable? Or is there any specific reason why I shouldn't do that? Would I be unable to script in the ability for a caller to change the value of a global integer variable?

Not that I have a problem with doing it as detailed above, I'm just eager to understand the reasoning.
 
Wild variables are Integer Call Variables only, you cant change a global variable
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top