Definition of local, global, and local persistent variables

Last Updated : Jun 04, 2019 |

The variable type of a vector determines the scope of the vector variable. Based on the variable type, the scope can be global, local, or local persistent.

Local scope

When a variable has a local scope, the value of the variable is assigned on the basis of call-specific information and is applied only in the vector that currently processes the call.

For example, asaiuui variables always have a local scope. If variable B is administered as an ASAI variable and included in a vector step, variable B is assigned the unique ASAI user data value for each new call processed by the vector.

Local persistent scope

When the scope of a collect variable type is local persistent, that is, the P scope, the variable value is assigned on the basis of call-specific information and is applied in more than one vector that process the inbound call. Unlike an L scope local variable, wherein the value is valid only until the call is being processed by the current vector, the value assigned to the P scope local persistent variable persists until the call disconnects. Applications continue to use the P scope variable and the last assigned value when the call leaves an assigned VDN. The call is either returned to the assigned VDN through the VDN Return Destination (VRD) feature or is transferred by the answering agent to another VDN for further processing.

Note:

Use variables with local persistent scope to achieve objectives such as the following examples:

  • Store the time of the day or the call duration. You can use the information to re-queue a call with higher priority if the call is transferred among many receivers.

  • Track the last played announcement or the last entered collect digits. Collected digits store the number of attempts made by the customer for the life of a call.

  • Count the number of VRD loops to force a call disconnection if the loop count exceeds a predetermined value. The count prevents calls from continuously reconnecting to the assigned VDN if the caller does not disconnect.

Global scope

Vector variables with a global scope have system-wide values that apply to all vectors in which the variables are used. For example, the value specified for a tod variable type is provided by the system clock. Despite the constantly changing value, at any given time the value is identical across all vectors that use the tod variable type.

For other variable types with a global scope such as collect or value, the assigned value is defined by a call center supervisor or an administrator. In this case, the user-defined value applies to all vectors that use the variable type.