Application Programming Guide


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


Chapter 8. Data Collection

   

This chapter includes sections about the CallCoordinator application programming interfaces (APIs) and an exit related to data collection. These sections are:

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

There are other CallCoordinator interfaces and APIs used to collect data. They are described in the following sections of this book:

The APIs are defined as general-use programming interfaces. The exit is a product-sensitive programming interface. See "Programming Interfaces" for definitions of general-use and product-sensitive programming interfaces.


Set Control Number API (CAMI730C)

         

What This API Does

   

This API allows an application program to add, change, or delete the control number and business value of a call entry in the Call Management Control Table (CMCT). CallCoordinator writes this information to the MIS log.        

When to Use This API

By adding a control number to the Call Management Control Table (CMCT) entry for a call, the number is recorded and maintained for all telephony event records generated for the call. The number can be used to identify records sent to the MIS log.    

For example, an insurance company can use policy numbers to identify events of calls from its policy holders. It can then generate policy reports by sorting the MIS log data by policy number.      

By adding the business value to an event record for a transaction, a company can tie together certain revenue and/or overhead information with the telephony event data for calls. This enhances the value of business reports generated from the MIS log.      

Another use of this API is to enable your screen control program to determine which transaction to START.       This API is used to get the control number. The CallCoordinator Screen Control Interface is used to pass the information to your screen control program.    

See Chapter 5, "Screen Control" for more information about using the CallCoordinator Screen Control Interface and writing user screen control programs.

How to Use This API

 

To use the Set Control Number API in your application program, do the following:

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

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


    Table 32. CICS Communication Data Area for the Set Control Number API (CAMC730)
    Field Attributes In/out Description
    COMMAREA N/A N/A 01 level name.
    COMMAREA-LEN PIC S9(04) COMP VALUE +1024 N/A Length in bytes of the CICS communication data area.
    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 (CAMI730C).
    RETURN-CODE PIC X(04) Out Indicates the result of the attempted operation.

    0
    No errors were detected. The process completed.

    1
    A Call Data record was not found for the parameters that were passed.

    2
    Insufficient parameter input provided.

    3
    Edit error in NEW-CNTL-NBR, BUS-VLU or BUS-VLU-SIGN.

    4
    Range error in BUS-VLU. The value specified in BUS-VLU when added to the existing business value in the CMCT entry for the call exceeds the maximum allowable value of 2,147,483,647.

    8
    Routing error. see REASON-CODE.

    9
    System error see REASON-CODE.
    TERM-ID PIC X(08) In Identification number of the CallCoordinator agent's terminal. When specified, it requires no other input. It is not required if the following input is provided:
    • CALLED-PARTY, CALLED-PARTY-EQUIP, and SWITCH-ID.

      or

    • CALLER, CALLER-EQUIP, and SWITCH-ID.

      or

    • CMCT-INDEX
    SWITCH-ID PIC X(10) In The switch ID of the called party. SWITCH-ID is required with CALLED-PARTY or CALLER.
    CALLED-PARTY-EQUIP PIC X(01) In Identifies the type of equipment used by the called party. Required if CALLED-PARTY is specified.

    Values are:

    1
    Extension.
    T
    Trunk.

    When specified, it requires additional input of CALLED-PARTY. It is not required if the following input is provided:

    • CALLER, CALLER-EQUIP, and SWITCH-ID

      or

    • TERM-ID.

      or

    • CMCT-INDEX
    CALLED-PARTY PIC X(10) In CallCoordinator agent's telephone number.

    When specified, it requires additional input of CALLED-PARTY-EQUIP. It is not required if the following input is provided:

    • CALLER, CALLER-EQUIP, and SWITCH-ID

      or

    • TERM-ID.

      or

    • CMCT-INDEX.
    CALLER-EQUIP PIC X(01) In Identifies the type of equipment used by the caller. Required when CALLER is specified.

    For this release, values are:

    1
    Extension.
    T
    Trunk.

    When specified, it requires additional input of CALLER. It is not required if the following input is provided:

    • CALLED-PARTY, CALLED-PARTY-EQUIP, and SWITCH-ID.

      or

    • TERM-ID.

      or

    • CMCT-INDEX
    CALLER PIC X(10) In The caller's telephone number.

    When specified, it requires additional input of CALLER-EQUIP. It is not required if the following input is provided:

    • CALLED-PARTY, CALLED-PARTY-EQUIP, and SWITCH-ID.

      or

    • TERM-ID.

      or

    • CMCT-INDEX
    CNTL-NBR PIC X(30) In The existing control number for an entry in the CMCT. Can be alphanumeric and in any format. CNTL-NBR is not required. When provided, they are checked for agreement.
    NEW-CNTL-NBR PIC X(30) In The number to be added or used to replace an existing control number. Can be alphanumeric and in any format. To delete a control number for the current and subsequent events, move spaces to this field.
    CHNG-REQ PIC X(01) In Type of change requested.
    Blank
    Control number.
    V
    Business value.
    B
    Both control number and business value.
    BUS-VLU PIC X(12) In Business value of the transaction. Limited to a value no higher than 2147483647.
    BUS-VLU-SIGN PIC X(01) Input Business value sign.
    Blank
    Not in use.
    +
    Positive.
    -
    Negative.
    FILLER PIC X(01) N/A Reserved for future use.
    REASON-CODE PIC X(04) N/A

    0009
    For routing errors see "API Router".

    0016
    The commarea passed to the Set Control Number API was not the correct length.

    0020
    An addressability error occurred when referencing a CallCoordinator internal table (CCI or ICI).

    1001 thru 1021
    Diagnostic purposes

    3001

    3002
    The business value contained in field BUS-VLU is either non-numeric or blank

    3003
    The business value sign contained in field BUS-VLU-SIGN is not +,- or blank.

    3004
    The change request is for business value (CHNG-REQ is a 'V') but the BUS-VLU-SIGN field is blank or the NEW-CNTL-NBR field contains data.

    3005
    The change request is for both business value and control number (CHNG-REQ is a 'B') but the BUS-VLU-SIGN field is a blank.

    CMCT-INDEX PIC X(5) In The call's CMCT-INDEX.
    COR-SYSID PIC X(04) In CICS SysId of the COR in which the API is to be invoked if CMCT-INDEX is used in a sysplex environment.
    FILLER PIC X(874) N/A Spaces. Reserved for future use.

  2. Initialize the input fields of the communication data area to spaces.

  3. Collect the input data for the API.  

    Required input data must specify the CMCT entry by including:

    Input should also specify the type of change being requested, a new control number or business value and business value sign, and CSA release. See Table 32 for descriptions of the input fields for the data area of the API.

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

  5. Code the following CICS command into your application program:
          EXEC CICS LINK PROGRAM('CAMI730C')
                         COMMAREA(CAMC730-COMMAREA)
                         LENGTH(CAMC730-COMMAREA-LEN)
                         END-EXEC.
    

  6. Test the value returned in the return code field in the CICS communication data area to determine if operation of the API was successful.

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

If operation of the API was successful, the CMCT record indicated by the request contains a new control number and/or a business value associated with the call.


Set ANI ID API (CAMI786C)

       

What This API Does

The CallCoordinator system automatically captures the number of the telephone from which the caller has dialed. This number is provided by the Automatic Number Identification service of your central office. It is called the ANI number. It becomes part of the CMCT record for an active call.  

The Set ANI ID API permits updating the ANI number in the CMCT record. When it is invoked by an application program, an agent can enter a number to replace the ANI number that came in with the call.

After the operation of this API, the ANI Source field of the CMCT contains a two digit code:

See Table 33 for descriptions of the input fields of this API.  

When to Use This API

Application programs can use incoming ANI numbers in processing calls. See "Initiate With Data Interface (CAMC500)" for ways application programs can use ANI numbers.

Sometimes, calls come in with meaningless ANI numbers and without ANI numbers:

In cases such as these, an IVR or live agent can get a meaningful telephone number from the caller. Using this API, the application program updates the ANI number. Then the application program has the ANI number it needs to process the call.

For example, an IVR is set up to screen and route calls.   CallCoordinator STARTs the initial transaction for the IVR and passes it the ANI number in the Initiate With Data Interface.   It accesses a database to verify the ANI number received with the call. If not found, the IVR instructs the caller to enter the correct ANI number. The IVR transfers the call to an ACD group that can handle the call. CallCoordinator STARTs the initial transaction for agents in this group and passes the updated ANI number in the Initiate With Data Interface. The application program uses it to get the account data the agent needs to handle the call. See "Initiate With Data Interface (CAMC500)" for more information about using the Initiate With Data Interface.

In addition to the Initiate With Data Interface, the Inquire Call Data API can supply the ANI number to an application program. See "Inquire Call Data API (CAMI726C)" for more information.      

How to Use This API

To use the Set ANI ID API in your application program, do the following:

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

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

    Table 33. CICS Communication Data Area for the Set ANI ID API (CAMC786)
    Field Attributes In/out Description
    COMMAREA N/A N/A 01 level name.
    COMMAREA-LEN PIC S9(04) I/O Length in bytes of the CICS communication data area.
    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 (CAMI786C).
    RETURN-CODE PIC X(04) Out Indicates the result of the attempted operation.

    0
    No errors were detected. The ANI number associated with the call was stored in the CMCT.

    1
    No call is active for this transaction's terminal.

    2
    Entry missing in Agents Table.

    3
    Agent is not signed on to CallCoordinator.

    4
    Call entry not found in CMCT.

    5
    Outside trunk not used for call.

    8
    Routing error. see REASON-CODE.

    9
    System error see REASON-CODE.
    INTERNAL-COMMAREA PIC X(8) N/A Do not use.
    CMCT-INDEX PIC X(5) In The call's CMCT-INDEX used for programs that do not have a TERMINAL associated with them.
    COR-SYSID PIC X(4) In In a sysplex environment this is required. The CICS SysId of the COR in which the API is to execute.
    REASON-CODE PIC S9(04) COMP Out For routing errors see "API Router".

    16
    The length of the Commarea was specified incorrectly.

    20
    A table addressability occurred.
    FILLER PIC X(37) N/A Spaces. Reserved for future use.
    ANI-ID-CODE PIC X In A user-defined code indicating something about the update of the ANI number, such as the agent responsible for the update. It is stored in the second position of the ANI number in the CMCT.
    NEW-ANI-ID PIC X(32) In The new ANI number to be stored in the CMCT.
    FILLER PIC X(911) N/A Spaces. Reserved for future use.

  2. Collect the input data for the API.   Required input includes the new ANI number and the ANI-ID-CODE. See Table 33 for descriptions of the input fields for the data area of the API.

  3. Move the data to the input fields of the CICS communication data area.

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

  5. Test the value returned in the return code field in the CICS communication data area to determine if the operation of the API was successful.

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

If operation of the API was successful, the CMCT entry contains the new ANI number and the user-defined code indicating that the ANI number was updated using this API.


Write MIS Record API (CAMI700C)

         

What This API Does

   

The Write MIS Record API allows writing records from your business application programs to the CallCoordinator MIS Log.  

Records that you write using this API are processed by the CallCoordinator MIS Interface Manager. You can write your own version of this module to customize the MIS process for CallCoordinator. Customizing the MIS Interface Manager could affect the records you attempt to add using this API. See "MIS Log Exit" for information about customizing this module.  

When to Use This API

The MIS Log is the CallCoordinator event log that stores records of all CallCoordinator telephony activity events. CallCoordinator writes event records (in the order they occur) to this file.    

Using this API, you can add business-related events and historical data from your application to the MIS log. This permits you to have one file containing both telephony and business-related data. You can use this file when generating reports. See Chapter 9, "Data Reporting" for more information about generating reports.

Your business-related data can include the following:

For example, to determine costs associated with making a sale, your application program can use the API to write a record to the MIS Log. The record could include the following data:

Another way to tie in business records with CallCoordinator telephony records is to add control numbers from your business application (such as the policy number of an insurance policy) to the associated CallCoordinator records. This requires using the Set Control Number API.   See "Set Control Number API (CAMI730C)" for more information.

You can also include agent information in your business application records by using the Inquire Agents API to get the agent data from CallCoordinator.   See "Inquire Agents API (CAMI720C)" for more information.

When generating reports, you can use the call indices or control numbers when sorting the MIS records.   For example, sorting records by Party Index can set up the file to produce a report of all parties involved in calls.  

See Figure 9 for a flowchart that shows the complete process of MIS data collection.

Sysplex Environment

 

In a sysplex environment, write your MIS record to the COR associated with the call. You can do this by passing the CICS SysId of the COR to the API in CAMC700 (MIS-COR-SYSID). The SysId can be obtained from a call to the Inquire Call Data API (CAM1726C), from the Start-with-data area passed to the Initial transaction, or from the Trigger-data area passed to the host-based routing transaction. If no SysId is passed, the API is routed to the first active COR in the CAMTCORS TS Queue.

In a non-sysplex environment, the API is routed to the active COR.

About Call Indices

To tie in business data with CallCoordinator data, you can include call index data in records sent to the MIS Log. The call indices are:

See "Inquire Call Data API (CAMI726C)" for information on how to obtain call index data from the CMCT.

Call indices recorded for each telephony event record are written to the MIS Log. Indices are self-maintaining.

Figure 9. MIS Log Data Flow

Data flow to CallCoordinator MIS log

 

How to Use This API

To use the Write MIS Record API in your application program, do the following:

  1. Collect desired data and create your MIS record in working storage. The communication data area of the API allows 460 bytes for the record content. Use the first byte to indicate the source of the record. Do not use a C as the first byte because C indicates CallCoordinator is the source. You might want to make the first byte U to indicate this as a user-written record.

    In addition, you might want to format the record in a structure comparable to CallCoordinator MIS records. This would assist you in associating user-written records with CallCoordinator records and in later sorting the records for analysis. For the CallCoordinator MIS record formats, see the following tables:

  2. Create a CICS communication data area in working storage by copying the CallCoordinator-supplied communication data area for this API.     The fields for this data area are described in Table 34. This layout is provided in the CallCoordinator SEZPCOPY target library, member name CAMC700. Refer to the library member for the actual field names.

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

    Table 34. CICS Communication Data Area for the Write MIS Record API (CAMC700)
    Field Attributes In/out Description
    MIS-COMMAREA N/A N/A 01 level name.
    MIS-COMMAREA-LEN PIC S9(04) COMP VALUE +850 In The length of the CICS communication data area in bytes.
    MIS-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 (CAMI700C).
    MIS-RETURN-CODE PIC X Out Indicates the result of the attempted operation:

    0
    No errors were detected. The record was passed to the MIS log.

    1
    The MIS-MESSAGE field is blank, indicating that no record was passed.

    2
    No record was passed for one of the following reasons:

    • MIS area corrupt

    • MIS queue full message lost

    • CallCoordinator inactive

    3
    The MIS event record has been truncated to 460 bytes.

    8
    Routing error. See REASON-CODE

    9
    System error. See REASON-CODE
    MIS-REASON-CODE PIC S9(4) COMP Out For routing errors see "API Router".

    16
    The length of the Commarea was specified incorrectly.

    20
    A table addressability occurred.
    MIS-COR-SYSID PIC X(04) In The CICS SysId of the COR in which to write the message. If not provided, the message is written to the first active COR found in the CAMTCORS TS Queue. The COR SysId for the current call can be found from the Inquire Call Data API (CAMI726C).
    FILLER PIC X(113) N/A Spaces. Reserved for future use.
    MIS-MESSAGE PIC X(460) In Data to be written to the MIS Log.
    FILLER PIC X(252) N/A Spaces. Reserved for future use.

  3. Collect the input data for the API. This includes the contents of the MIS record you created.

  4. Move the input data to the input fields of the CICS communication data area created for this API. This includes moving the contents of your MIS record to the MIS-MESSAGE field of the CICS communication data area created for this API.

  5. Code the CICS command below into your application program:
          EXEC CICS LINK PROGRAM('CAMI700C')
                         COMMAREA(CAMC700-MIS-COMMAREA)
                         LENGTH(CAMC700-MIS-COMMAREA-LEN)
                         END-EXEC.
    

  6. Test the value returned in the return code field in the CICS communication data area to determine if operation of the API was successful.

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

If operation of the API was successful, the specified record is written on the MIS Log.


MIS Log Exit

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

   

What the MIS Log Exit Does

   

The MIS Log Exit is an interface that provides input to the MIS Interface Manager.

You can use this exit, for example, to identify and log abandoned calls for future client call-backs.

What the MIS Interface Manager Does

   

The MIS Interface Manager receives call records and error messages from the switch (or switches) and from the CallCoordinator CMCT.   It writes the call records and error messages to a CICS user journal called the MIS log.  

Refer to the chapter "What Call Management Does" in the CallPath CallCoordinator/CICS General Information for a detailed description of the Data Collection for Reports Feature of CallCoordinator.

The MIS Log

The MIS data collected by CallCoordinator and put on the MIS Log includes the following data types:  

For easier sorting and correlating, these record types all begin with a record header and a common data section. The complete formats for each record type are described in the following sections. A layout is provided in the CallCoordinator SEZPCOPY target library, member name CAMR002.  

Processed Event Record

   

A processed event record contains data for a call that was processed normally by the CallCoordinator Call Tracking Manager. It has common and message-related sections and a section for the attributes of the call. This is followed by data for up to three parties:

If there are more than three parties (perhaps because a conference call ended), the additional parties are written in continuation records which repeat the record header, the common data, the message-related data, and the call-related data. The record format for this record type is shown in Table 36. Refer to the library member for the actual field names.

Processed Event Continuation Record

   

These records are written after a processed event record. They contain data for the additional parties that changed state as a result of the event record. The first continuation record contains the data for the fourth, fifth, and sixth parties. The second one contains data for seventh, eighth, and ninth parties, and so on. The record format for this record type is shown in Table 37. Refer to the library member for the actual field names.

Non-processed Event Record

   

A non-processed event record results when a message did not contain enough information for Call Tracking Manager (CTM) to process or when the message referenced one or more calls that were not in the current CMCT.

If a disconnected message is sent for a call that is not current, the party data is written in a non-processed record. No error message is written. Other non-processed records are accompanied by error records that give the reason for the failure. The record format for this record type is shown in Table 38. Refer to the library member for the actual field names.

Call-Combining Record

   

The call-combining record is written when telephony action results in adding parties from one unit of work into another unit of work. These records allow the replacement of the unit of work fields in the added call so that the records will sort together when processed. The date and time from host are set to zero so that the record will be found before the records for which unit of work is to be changed. The record format for this record type is shown in Table 39. Refer to the library member for the actual field names.

Error Record

   

Error records sent to the MIS Log indicate problems in the processing of event data. They are written near the messages that caused them. To help in problem determination, they can be sorted with call-related records. The record format for this record type is shown in Table 40. Refer to the library member for the actual field names.

Status Change Record

   

The status change record reflects a notification from CallPath/CICS that the status of a switch link, or the CallPath/CICS Subsystem itself, has changed. The record format for this record type is shown in Table 41. Refer to the library member for the actual field names.

Account Code Record

   

The account code record is produced when CallCoordinator receives a message that contains data entered by an agent through his telephone. If the agent is involved with a call at the time of the data entry, the call-related sections of the MIS record will reference the most recent call with a call purpose of service.

If the agent is not involved with a call, the alphabetic fields of the call-related data are set to spaces and the numeric fields to zeros. In the common data section, the following fields are set to spaces:

In the common data section, the Application connect index field is set to zeros. The record format for this record type is shown in Table 42. Refer to the library member for the actual field names.

When to Customize This Process

 

You can customize the writing of records to the MIS log by writing your own version of the MIS Interface Manager and using the MIS Log exit. Your customized program can reformat, edit, filter, or delete call records.

The reasons for customizing this process include:

   

How to Use This Exit

To write and use your own version of the MIS Interface Manager, do the following:

  1. Write your own MIS Interface Manager to receive and modify call records as desired before sending them to the MIS log. For descriptions of formats of messages which this module can receive, see Table 36, Table 37, Table 38, Table 39, Table 40, Table 41, and Table 42.

  2. Enter the name of your customized MIS Interface Manager CallPath CallCoordinator/CICS System Management Guide ).

  3. Do the following:

    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 35. A layout is provided in the CallCoordinator SEZPCOPY target library, member name CAMC030. Refer to the library member for the actual field names.

      To ensure the integrity of the data do not change the fields of this interface or their attributes.


Table 35. CICS Communication Data Area between the Interface Manager and
the User Exit (CAMC030)   
Field Attributes Description
COMMAREA N/A 01 level name.
COMMAREA-LEN PIC S9(04) COMP VALUE +600 Length in bytes of the CICS communication data area.
COMMAREA-DATA N/A 03 level name.
FROM-PROGRAM- NAME PIC X(08) The name of the program invoking the API
TO-PROGRAM-NAME PIC X(08) The name of the program exited to
WRITE-Flag PIC X(01) Indicates whether or not the MIS log record is to be written to the MIS log.
Y
Yes, write the record to the MIS Log.
N
No, do not write the record to the MIS Log.
MIS-MESSSAGE PIC X(460) The MIS Log record.
FILLER PIC X(121) Spaces. Reserved for future use.

MIS and Processing Options

MIS logging options are available. These options control the logging of and access to the CallPath/CICS messages being received from the switch and CallCoordinator's call tracking component.

These options are specified under MIS Log in the COR Telephony Settings panel (VA32). On this panel, there are three fields. They are:

MIS Option.

Exit Name.

User Journal ID.

The "MIS Option" field can have three values:

'-'
The Log is Inactive. The MIS record is not passed and is not written to the User journal.

'J'
The Log is Active. The MIS record is passed to the EXIT if there is an entry in the 'EXIT NAME' field, and is written to the User journal.

'X'
The Log is Active. The MIS record is passed to the EXIT if there is an entry in the 'EXIT NAME' field. It is not written to the User journal.
The 'EXIT NAME' field contains the name of the user-written MIS exit program. For the MIS records to be passed to the exit, an 'EXIT NAME' is required.

The 'User Journal ID' field is the CICS User Journal to which the the MIS records are written if the MIS option is set to 'J'.

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


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