Application Programming Guide


 Return to Library  Contents  Previous Topic  Bottom of Topic  Next Topic  Index  Help


Chapter 7. Transfer Load Balancing

 

This chapter includes sections about the CallCoordinator application programming interfaces (APIs) and exit related to Transfer Load Balancing. These sections are:

Each section of this chapter explains the function of the API or exit and describes when it would be useful. It also explains how to use the API and exit and defines the CICS communication data area.

The CallCoordinator APIs are defined as general-use programming interfaces. See "Programming Interfaces" for a definition of general-use programming interfaces.


Transfer Load Balancing API (CAMI705C)

       

What This API Does

When an application requires to transfer a call, it request the telephone number of an ACD group that performs the desired function. This API communicates that request to the CallCoordinator Load Balancing module. This module determines which ACD group is the least busy at that time. The API returns the number of the least busy ACD group along with a backup number.

The API may optionally be run to gather information about the requested function, that is Balance Points and Queue Count, without reserving the Transfer Load Balancing number. The API may also optionally be run to perform inter-switch transfer without finding the least-busy ACD group. By requesting and using these numbers, applications can help to balance the call load between ACD groups.          

Refer to the Planning section of the CallPath CallCoordinator/CICS System Management Guide for information about how Transfer Load Balancing works.  

When to Use This API

The Transfer Load Balancing API is useful when:

For example, a CallCoordinator agent who handles auto insurance wants to transfer a call to a CallCoordinator agent who handles life insurance. There are several agent groups that handle life insurance. The agent requests the number of the least busy life insurance group by entering LIFE in a space provided on the auto insurance application screen. Then the following occurs:

 

How to Use This API

To use the Transfer Load Balancing API in your application program, do the following:

  1. Create a CICS communication data area in working storage of the program by copying the communication data area for this API.     The fields for this data area are described in Table 8. A layout for this data area is provided in the CallCoordinator SEZPCOPY target library, member name CAMC705. Refer to the library member for the actual field names.

    If calling the API from COBOL II or later, INITIALIZE the Communication data area (CAMC705-LBA-COMMAREA-DATA) before setting any of the fields.

    Table 29. CICS Communication Data Area for the Transfer Load Balancing API (CAMC705)
    Field Attributes In/out Description
    LBA-COMMAREA N/A N/A 01 level name.
    LBA-COMMAREA-LEN PIC S9(04) COMP VALUE +250 In Length in bytes of the CICS communication data area.
    LBA-COMMAREA-DATA N/A N/A 03 level name.
    FROM-PROGRAM-NAME PIC X(08) In The name of the program invoking this API.
    TO-PROGRAM-NAME PIC X(08) In The name of this API (CAMI705C).
    LBA-RETURN-CODE PIC X(10) Out Indicates the result of the attempted operation performed by the Load Balancing module. See "Transfer Load Balancing Exit". If an error condition persists, refer to CallPath CallCoordinator CICS/MVS: Inbound Problem Determination for problem determination and recovery procedures for each return code listed here.

    Data about these errors is written to the active trace log, which is either the EZPTRAV or EZPTRBV log file. This data includes the actual ACD group name.

    The last character of the return code indicates the severity of the error:

    W
    Warning.
    E
    Severe error.
    Possible return codes are:
    Spaces
    No errors. Load balanced numbers selected.
    CAM600002E
    ORIG-TERM-ID or FUNCTION field is blank.
    CAM600003E
    No backup number is available.
    CAM600026E
    The value of FUNCTION field is not valid.
    CAM600027E
    TABLE LOAD error
    CAM600029E
    The CICS link command returned a return code that is not valid.
    CAM705001E
    The value of ORIG-TERM-ID is not valid. The terminal is not signed on to CallCoordinator or is in a HOLD condition. (In a HOLD condition, no telephone call is connected to the terminal).
    CAM705003E
    TABLE LOAD error
    CAM705005W
    Load balancing has not been requested as a global variable.
    CAM705006E
    The terminal ID (ORIG-TERM-ID) is not found in the Agents Table.
    CAM705008E
    Routing error.
    CAM705014E
    The Load Balancing Module failed to release the reserve status of the inter-switch tracking number after call transfer was completed.
    RETURN-CODE PIC 9(04) Out Indicates the result of the attempted operation.
    0
    No errors. Load balanced numbers are selected.
    1
    Not found. See REASON-CODE.
    2
    COR-SYSID missing with CMCT-INDEX specified.
    5
    Load balancing has not been requested as a global variable.
    6
    The terminal ID (ORIG-TERM-ID) is not found in the Agents Table.
    8
    Routing error. See REASON-CODE.
    9
    System error. See REASON-CODE.
    14
    The Load Balancing Module failed to release the reserve status of the inter-switch tracking number after call transfer was completed.
    99
    An error was detected in a customized version of the Load Balancing algorithm. See LBA-RETURN-CODE for more information.
    ACTION PIC X(1) In Indicates which action is to be performed. Valid values are :
    1
    Request the number of the least busy ACD group for a specific function. The API will reserve an available inter-switch tracking number and return the Queue Count and Balance Point numbers for this ACD group.
    2
    Return only the queue-count and Balance Point numbers for the least-busy ACD group for a specific function. No reserve is performed.
    3
    Reserve an available inter-switch tracking number for the supplied ACD group.

    The default is 1

    CMCT-INDEX PIC X(05) In The CMCT index of the call data record associated with the requesting transaction.
    COR-SYSID PIC X(04) In Sysid of COR owning the call. Required if CMCT-INDEX is passed.
    REASON-CODE PIC 9(04) Out For routing errors see "API Router".
    1
    No call found for CMCT-INDEX.
    2
    No connection found for call.
    3
    No party found for call.
    4
    Party connection count zero for call.
    5
    No agent found for TermID.
    6
    No party found for agent.
    7
    Party connection count zero for agent.
    8
    Reserve failed.
    16
    The length of the Commarea was specified incorrectly.
    20
    TABLE LOAD error
    FILLER PIC X(92) N/A Spaces. Reserved for future use.
    ORIG-TERM-ID PIC X(08) In Terminal ID (EIBTRMID) of the requesting agent.
    FUNCTION PIC X(10) In The name of the function of ACD groups that handle this type of call as defined in the Load Balancing Function Table. For example, LIFE for ACD groups that handle calls about life insurance.
    PRIMARY-NUMBER PIC X(32) Out The telephone number of the ACD group of indicated function that was determined the least busy by the Load Balancing module and reserved for the call transfer. It is the dialable pilot number of the selected ACD group if in same switch. It is an inter-switch tracking number for the ACD group number     if in a different switch. The data is displayed unformatted, left-justified, and filled with spaces.
    BACKUP-NUMBER PIC X(10) Out The backup number associated with the pilot number of the selected ACD group. The agent uses the backup number if the call cannot be transferred to the target pilot number. The data is displayed unformatted, left-justified, and filled with spaces.
    QUEUE-COUNT PIC X(3) Out Contains the Queue Count for the ACD group identified by the PRIMARY-NUMBER.
    BPN1 PIC X(3) Out Balance Point Number 1
    BPN2 PIC X(3) Out Balance Point Number 2
    ACD-GROUP PIC X(06) In ACD group
    LOGON-COUNT PIC 9(3) Out Number of agents logged on to ACD group
    AVAIL-COUNT PIC 9(3) Out Number of agents available in ACD group
    TOT-Q-COUNT PIC 9(6) Out Cumulative number of calls that have been queued at this ACD group
    TOT-Q-ABSTIME PIC S9(15)
    COMP-3
    Out Cumulative amount of time that calls have been queued at this ACD group
    FILLER PIC X(17) N/A Spaces. Reserved for future use.

  2. Collect the input for the API.  

    The required input includes the desired function of the group to which the call is to be transferred (FUNCTION) and the ID of the requesting terminal (ORIG-TERM-ID), or CMCT-INDEX and COR-SYSID. See Table 29 for descriptions of the input fields for the data area of the API.

  3. Move the input data to the input fields of the CICS communication data area created for this API.

  4. Code the following CICS command into your application program:
          EXEC CICS LINK PROGRAM('CAMI705C')
                         COMMAREA(LBA-COMMAREA)
                         LENGTH(LBA-COMMAREA-LEN)
                         END-EXEC.
    

  5. Test the value returned in the return code field in the CICS communication data area to determine if operation of the API was successful. This can be a check for a W or E in the tenth position of the return code.

  6. If operation of the API was not successful, take action applicable to the error indicated by the return code.

If the operation of the API was successful, the output fields of the communication data area contain the number for the selected ACD group and a backup number.

Sample Program

Sample program source code for the Sample Transfer Load Balancing program is provided as a source library member in the CallCoordinator SEZPSRCE target library, member name CAMB600C. Relevant code can be found in paragraph 9000-LINK-TO-LOAD-BALANCING.


Transfer Load Balancing Exit

+-------------Product-sensitive programming interface information--------------+

       

What the Transfer Load Balancing Exit Does

The Transfer Load Balancing Exit is an interface that provides input to the Load Balancing Module.

Refer to the Planning part of the CallPath CallCoordinator/CICS System Management Guide for information about how Transfer Load Balancing works.

What the CallCoordinator Sample Load Balancing Module Does

     

CallCoordinator Call Tracking Manager continually monitors the queues of primary ACD groups, keeping count of all calls queued. When an agent requests a load-balanced number for call transfer, the Transfer Load Balancing API carries the request to the Load Balancing Module. See "Transfer Load Balancing API (CAMI705C)". The Load Balancing Module acts to fulfill the request by doing the following:  

  1. If TLB is requested, it determines which ACD group of the function specified by the agent is the least busy. This is done using an algorithm that compares the queue counts to   user-defined balance points and related information.     Refer to CallPath CallCoordinator/CICS System Management Guide for information about configuring CallCoordinator for the Transfer Load Balancing feature.

  2. It returns the switch ID and backup telephone number of the selected ACD group to the Transfer Load Balancing API (the backup number is always in the same switch as the requesting agent).          

  3. It sends records to the MIS log when there are errors in the input from the Transfer Load Balancing API.

  4. It returns the Queue Count and Balance Numbers for the least busy ACD number for the requested function.      

The API returns the numbers to the requesting agent. When the requesting agent transfers the call to the load-balanced number, the call and screen are transferred. This requires the following events when the transfer is to a different switch:

  1. The Load Balancing Module prefixes a dialing code to the selected inter-switch tracking number   to route the call. Refer to CallPath CallCoordinator/CICS System Management Guide for information about defining dialing prefixes for each from/to switch combination.

  2. Switch 1 transfers the call to the inter-switch tracking number on switch 2.

  3. CallCoordinator Call Tracking Manager (CTM)     determines which terminal is requesting this transfer (using the terminal ID indicated for the reserved inter-switch tracking number).

  4. CTM determines the terminal ID of the agent who is to receive the call transfer.

  5. CTM sends the IDs of the transferred-from and transferred-to terminals to the screen control program.    

  6. The screen control program transfers the screen.

Customizing the Transfer Load Balancing Module

The CallCoordinator Load Balancing Module contains a load balancing algorithm that you can customize.   It determines which ACD group of a particular function is the least busy. You can write your own algorithm to perform this function and use the Load Balancing exit for access.            

Before you can customize Transfer Load Balancing using static balancing points, you must understand three load balancing activities:

Determining Busy Levels

Transfer Load Balancing looks at the queue count for an ACD group and compares it to the balance points to determine busy level. The queue count in the CallCoordinator Balance Point table is incremented for each queue event. If the call is queued to multiple ACD groups, the queue count for the primary ACD group is the only one incremented. The queue count is decremented when the call is assigned or abandoned. (An ACD group is identified by its switch and target pilot number.)

Transfer Load Balancing uses two balance points to determine the busy level of the queue for each ACD group. Balance point 1 is the number of calls in a queue that an ACD group can handle comfortably at any given time. Balance point 2 is the maximum number of calls in a queue that an ACD group can handle before overload occurs.

The busy levels are as follows:

Busy Level 0
The number of calls in queue is less than balance point 1. Calls are assigned to this group first.

Busy Level 1
The number of calls in queue is equal to balance point 1 or between balance point 1 and balance point 2. Calls may be directed to a less busy group.

Busy Level 2
The number of calls in queue is equal to or greater than balance point 2. The group is too busy and no calls are directed to this group, unless there are no groups at busy level 0 or busy level 1.

Selecting the Least Busy ACD Group   

Transfer Load Balancing selects the least busy ACD group in the following way:

  1. Priority is always given to local ACD groups over remote ACD groups. Local ACD groups are on the same switch as the agent who has requested Transfer Load Balancing. Remote ACD groups are on a different switch from the agent who has requested Transfer Load Balancing.

  2. If a local ACD   group is at busy level 0, Transfer Load Balancing does not search any further. It returns the number of that ACD group to the requesting agent.

  3. If all local ACD groups are at busy level 1 or 2, Transfer Load Balancing searches for a remote ACD   group that is at a lower busy level. Then Transfer Load Balancing does one of the following:

  4. If there is no local ACD group, Transfer Load Balancing returns the number of the remote ACD group with the lowest busy level to the requesting agent. If Transfer Load Balancing finds more than one remote ACD group at the same busy level, it returns the number of the ACD group with the lowest percent busy number to the requesting agent. See "Calculating the Percent Busy Number (PBN)" for detailed information on how to calculate the percent busy number. If Transfer Load Balancing finds no acceptable remote ACD group, it returns the local backup number.

Calculating the Percent Busy Number (PBN)

 

The Percent Busy Number (PBN) is used when more than one ACD group   is at the lowest busy level. Transfer Load Balancing compares the queue count and Balance Points for each available ACD group to calculate which group is least busy:

When calculating the PBN, the decimal fractions are truncated. The PBN is calculated as follows:

PBN =
Percent Busy Number
QC  =
Queue Count
BP1 =
Balance Point 1
BP2 =
Balance Point 2

Busy Levels and Percent Busy Numbers

Table 30 and the explanations that follow show how Transfer Load Balancing uses the busy levels and percent busy numbers (PBN) to assign calls to less busy groups.

Table 30. Busy Levels and Percent Busy Numbers
Group Balance point 1 Balance point 2 Queue Count Busy Level PBN
Group 1 4 10 5 1 16%
Group 2 4 7 4 1 0%
Group 3 9 18 7 0 77%
Group 4 1 4 5 2 0%

Table 30 shows the following about each group:

Setting Balance Points

Before setting balance points for a group, you must consider the following items:

These items are discussed in detail in the sections that follow.

Time of Operation  In setting balance points for a group, you first must look at the hours of operation for your call center. If the level of call activity varies during a day or from one day to another, you should define those time periods based on the differences in call activity. You might enter this information on the CallCoordinator Balance Point Work Sheet. The times specified are based on the specific switch on which the target pilot number is defined.

For example, assume the call activity for an ACD group that handles orders is as follows:

You would set up these four time periods for the billing ACD group as follows before considering the other factors involved in setting balance points:

Any day and time not specified in a detail record defaults to the ACD group and backup number.

Group Characteristics  After deciding the important time periods for transferred calls for each group, you must consider the following characteristics in setting balance points for each group:

Alternatively, you can customise Transfer Load Balancing to use dynamic ACD data. See "When to Customize the Load Balancing Algorithm".

Specific Balance Point Settings  Specific balance point settings cause specific results with Transfer Load Balancing operation. You need to consider the following additional items before setting the balance points:

After you have considered all of the above items, you can enter the balance points for each group on the CallCoordinator Balance Point panel (refer to the Operations part of the CallPath CallCoordinator/CICS System Management Guide. ). When your system has been in operation for several weeks, you might need to reset the balance points to improve your level of client service.

Adding a New ACD Group   

When a new ACD group is added, or a new date/time record is added, the algorithm may not immediately toggle between two eligible ACD groups. The algorithm requires that the least selected of two or more eligible ACD groups is selected. This will result in one group being selected until its number of times selected catches up with the other eligible ACD groups. To avoid this, the CallCoordinator host needs to be recycled.

The Transfer Load Balancing Algorithm

The CallCoordinator Transfer Load Balancing module uses an algorithm that distributes the load of transferred calls between groups on the same switch or between groups on more than one switch. The steps that follow show how Transfer Load Balancing works between groups on the same switch. The additional steps for Transfer Load Balancing between switches are described in the section that follows.

Transfer Load Balancing on One Switch  The Transfer Load Balancing algorithm distributes the load of transferred calls between groups on one switch as follows:

  1. The agent initiates a request for Transfer Load Balancing by entering a function on the application panel. Transfer Load Balancing searches the CallCoordinator Load Balancing Function table to find a match for the function requested and the calling agent's switch ID.

  2. If a match is found, the backup number is saved.

  3. Transfer Load Balancing then selects the eligible ACD groups by checking all the entries in the CallCoordinator Balance Point table. To be eligible for consideration:

  4. Transfer Load Balancing calculates a busy level number for each eligible ACD group and then selects the ACD group with the lowest busy level. See "Determining Busy Levels" for more information on busy levels.

  5. If more than one group is at the same busy level, a Percent Busy Number (PBN) is calculated. See "Calculating the Percent Busy Number (PBN)" for more information on the PBN. The ACD group with the lowest PBN is selected. If there is a tie for PBN, then the available ACD group which has been selected least, is selected.

  6. After an ACD group is selected, the target pilot number for that ACD group is displayed for the agent as the primary number for the agent to use. The backup number is also displayed for the agent.

Transfer Load Balancing Between Switches

The Transfer Load Balancing module uses the same algorithm to distribute the load of transferred calls between ACD groups on several switches. However, the following conditions are checked besides the basic algorithm:

 

When to Customize the Load Balancing Algorithm

Some application programs might require different logic for selecting load balanced numbers. Possible reasons to customize the load balancing algorithm are:

 

How to Use This Exit

To write and use your own version of the load balancing algorithm, do the following:

  1. Modify your application program(s) to allow agents to make transfer load balancing requests. See "Transfer Load Balancing API (CAMI705C)" for these instructions.

  2. Modify values in the Balance Point, Load Balancing Function, Switch to Switch Dialing Prefix, and Inter-switch Tracking Number panels as needed. Refer to CallPath CallCoordinator/CICS System Management Guide for information about configuring CallCoordinator for the Transfer Load Balancing feature.

  3. Write your own load balancing algorithm, making use of the input and output fields provided by the Transfer Load Balancing API (see "Transfer Load Balancing API (CAMI705C)") and use the source for CAMB600C as an example.

    1. Create a CICS communication data area in working storage of the program by copying the communication data area for this exit.     The fields for this data area are described in Table 31. These are the fields in the Communication Data area between the Load Balancing program and the API. A layout for this data area is provided in the CallCoordinator SEZPCOPY target library, member name CAMC025. Refer to the library member for the actual field names. You cannot modify these fields.

    2. If calling the API from COBOL II or later, INITIALIZE the Communication data area (CAMC025-LBM-COMMAREA-DATA) before setting any of the fields.

  4. Change the entry for the Load Balancing Exit name in the COR Telephony Settings panel from the default (CAMB600C) to the name of your customized module.

Table 31. CICS Communication Data Area Between the Load Balancing Program and API/CTM (CAMC025)
Field Attributes In/out Description
COMMAREA N/A N/A 01 level name.
COMMAREA-LEN PIC S9(04) COMP VALUE +300 In Length in bytes of the CICS communication data area.
COMMAREA-DATA N/A N/A 03 level name.
FROM-PROGRAM-NAME PIC X(8) In The name of the program invoking this API.
TO-PROGRAM-NAME PIC X(8) In The name of this API (CAMB600C).
RETURN-CODE PIC X(10) Out Indicates the result of the attempted operation. If an error condition persists, refer to CallPath CallCoordinator CICS/MVS: Inbound Problem Determination for problem determination and recovery procedures for each return code listed here.

Data about these errors is written to the active trace log, which is either the EZPTRAV or EZPTRBV log file. This data includes the actual ACD group name.

The last character of the return code indicates the severity of the error:

W
Warning.
E
Severe error.
Possible return codes are:
Spaces
No errors.
CAM600000I
No errors. Load-balanced numbers selected.
CAM600002E
The CBXID or ACD-QUE-GRP field is blank.
CAM600003E
No backup number available.
CAM600022
Best Count Index not valid.
CAM600026W
Function entered is not valid.
CAM600027E
CallCoordinator global Table load error.
CAM600029E
The CICS LINK command returned a return code that is not valid.
FILLER PIC X(110) N/A Spaces. Reserved for future use.
SWITCH-ID PIC X(8) In Switch ID of the requesting agent.
FUNCTION PIC X(10) In Function name (for example, "LIFE"). This name must be an entry in the Load Balancing Function Table.
FILLER PIC X(50) N/A Spaces. Reserved for future use.
ACD-GROUP PIC X(6) Out Least busy ACD group name.
ACD-SWITCH PIC X(8) Out Switch ID of the ACD group.
QUEUE-COUNT PIC 9(3) Out Queue count of the ACD group.
BPN1 PIC X(3) Out Balance Point Number 1 of the ACD group.
BPN2 PIC X(3) Out Balance Point Number 2 of the ACD group.
BKUP_NBR PIC X(10) Out The backup number to be displayed on your business application screen. The agent calls this number if the call cannot be transferred to the reserved primary number.
LOGON-COUNT PIC X(3) Out Number of agents logged on to ACD group
AVAIL-COUNT PIC X(3) Out Number of agents available in ACD group
TOT-Q-COUNT PIC 9(6) Out Cumulative number of calls that have been queued at this ACD group
TOT-Q-ABSTIME PIC S9(15)
COMP-3
Out Cumulative amount of time that calls have been queued at this ACD group
FILLER PIC X(40) N/A Spaces. Reserved for future use.

Sample Program

         

Sample program source code for the load balancing algorithm is provided as a source library member in the CallCoordinator SEZPSRCE target library, member name CAMB600C.        

+----------End of Product-sensitive programming interface information----------+


 Return to Library  Contents  Previous Topic  Top of Topic  Next Topic  Index  Help