Defining the data for a custom report
96 Avaya CMS Custom Reports
Look at the following “where” clause:
Select rows where: SPLIT = $splitvar
This “where” clause tells CMS to search for rows with the Split value the user enters when
ordering the report. The example clause presupposes that the variable name, “splitvar,”
has been defined on the Define Input window.
Multiple “Where” clauses
To put two or more clauses in a statement, use
and
or
or
. Use
and
to define two or
more clauses where CMS finds only rows that meet all conditions. For example, the
following statement searches for rows where splits had an average speed of answer
greater than 30 seconds and abandons greater than 100.
Select rows where: ANSTIME/ACDCALLS > 30 and ABANDONS > 100
Use
or
to define two conditions where CMS finds rows that meet either condition but not
necessarily both. For example, the following statement searches for rows where splits had
too many abandoned calls or too many extension-out calls.
Select rows where: ABANDONS>15 or AUXOACWOUTCALLS>7
“Where” Clause with a Range/List Variable
If a variable name, as defined in the Define Input window, has been assigned the
Range/list option, your “where” clause must use the equals sign (=) with the variable name.
“Where” clause for selecting rows from an ACD
In your “where” statement, you must always include a clause to select the ACD. If you
always want a report to find data for the user's current ACD, append
and ACD = $acd
to the “where” statement, as shown in the following example:
Select rows where: SPLIT = $splitvar and ROW_DATE = $datevar and ACD = $acd
If you use the variable name
acd
, you do not need to define the variable in the Define
Input window. CMS always understands acd to be the current ACD. However, if you want,
you can define a different variable name for the
ACD
database item so the user can
specify the wanted ACDs when ordering the report. You can also hardcode the ACD in a
“where” clause, as in the following example.
Select rows where: ACD = 1
“Where” clause for excluding rows of data
If you want to exclude Split 5 from the report, but include all other splits, you might enter a
“where” clause as follows:
Select rows where: SPLIT != 5
or
Select rows where: SPLIT <> 5