From Bright Pattern Documentation
Jump to: navigation, search
(Marked this version for translation)
m (Formatting)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<translate>= BPXML Syntax and Samples= <!--T:1-->
+
= BPXML Syntax and Samples=  
 
You can create a custom BPXML report template and use it to export CSV data. This section explains the syntax and structure of BPXML report templates.
 
You can create a custom BPXML report template and use it to export CSV data. This section explains the syntax and structure of BPXML report templates.
  
== Syntax == <!--T:2-->
+
== Syntax ==  
 
The top level "BPcsvReport" element contains optional "parameters" and "queryString" sub-elements.
 
The top level "BPcsvReport" element contains optional "parameters" and "queryString" sub-elements.
  
<!--T:3-->
 
 
"queryString" is a common SQL statement, and it can contain some parameters.  
 
"queryString" is a common SQL statement, and it can contain some parameters.  
  
=== Parameter Types === <!--T:4-->
+
== Links ==
 +
[[Reporting-database-specification/GeneralInformationAboutStatisticalData|Reporting DB structure for Statistical Data.]]
 +
 
 +
[[Reporting-database-specification/GeneralInformationAboutDetailedRecords|General Information About Detailed Records]]
 +
 
 +
=== Parameter Types ===  
 
The following is the full set of supported parameters:
 
The following is the full set of supported parameters:
 
* '''"agent"''' – agent selector
 
* '''"agent"''' – agent selector
Line 23: Line 27:
 
** '''"string"''' - an arbitrary string value
 
** '''"string"''' - an arbitrary string value
  
== Sample BPXML Report == <!--T:5-->
+
== Sample BPXML Report ==
<?xml version="1.0" encoding="UTF-8"?>
+
<syntaxhighlight lang="xml">
<BPcsvReport version="1.0" resourceBundle="com.brightpattern.reports.oob_reports">
+
<?xml version="1.0" encoding="UTF-8"?>
<parameters>
+
<BPcsvReport version="1.0" resourceBundle="com.brightpattern.reports.oob_reports">
<parameter name="start_time" type="timeframe" subtype="start"/>
+
    <parameters>
<parameter name="end_time" type="timeframe" subtype="end"/>
+
        <parameter name="start_time" type="timeframe" subtype="start" />
<parameter name="login_id" type="agent" />
+
        <parameter name="end_time" type="timeframe" subtype="end" />
</parameters>
+
        <parameter name="login_id" type="agent" />
<queryString>
+
    </parameters>
<![CDATA[
+
    <queryString>
SELECT
+
        <![CDATA[ SELECT  
start_time,
+
                    start_time,  
first_name,
+
                    first_name,  
last_name,
+
                    last_name,  
num_calls_in,
+
                    num_calls_in,  
num_calls_answered,
+
                    num_calls_answered,  
team_name
+
                    team_name  
FROM agent_performance
+
                  FROM  
WHERE start_time > $P{start_time} AND login_id=$P{login_id}
+
                    agent_performance  
]]>
+
                  WHERE  
</queryString>
+
                    start_time > $P{start_time}  
</BPcsvReport>
+
                  AND  
 +
                    login_id=$P{login_id} ]]>
 +
    </queryString>
 +
</BPcsvReport>
 +
</syntaxhighlight>
  
== Examples == <!--T:6-->
+
== Examples ==  
 
The following are examples of various types of BPXML reports. Values that differ from the Sample BPXML Report given above are shown in <font color="ff33cc">pink</font color>.
 
The following are examples of various types of BPXML reports. Values that differ from the Sample BPXML Report given above are shown in <font color="ff33cc">pink</font color>.
  
=== "agentlist" Usage Sample === <!--T:7-->
+
=== "agentlist" Usage Sample ===  
In this sample, parameter ''agentlist'' is being used to add agent data to the Agent Performance report.
+
In this sample, parameter ''agentlist'' is being used to add agent data to the Agent Performance report.<syntaxhighlight lang="xml">
 
 
<!--T:8-->
 
 
<?xml version="1.0" encoding="UTF-8"?>
 
<?xml version="1.0" encoding="UTF-8"?>
<BPcsvReport version="1.0" resourceBundle="com.brightpattern.reports.oob_reports">
+
<BPcsvReport version="1.0" resourceBundle="com.brightpattern.reports.oob_reports">
<parameters>
+
    <parameters>
<parameter name="start_time" type="timeframe" subtype="start"/>
+
        <parameter name="start_time" type="timeframe" subtype="start" />
<parameter name="end_time" type="timeframe" subtype="end"/>
+
        <parameter name="end_time" type="timeframe" subtype="end" />
<parameter name="login_id" type="<font color="ff33cc">agentlist</font color>" />
+
        <parameter name="login_id" type="agentlist" />
</parameters>
+
    </parameters>
<queryString>
+
    <queryString>
<![CDATA[
+
        <![CDATA[ SELECT  
SELECT
+
                    start_time,  
start_time,
+
                    first_name,  
first_name,
+
                    last_name,  
last_name,
+
                    num_calls_in,  
num_calls_in,
+
                    num_calls_answered,  
num_calls_answered,
+
                    team_name  
team_name
+
                  FROM  
FROM agent_performance
+
                    agent_performance  
WHERE start_time > $P{start_time} AND login_id IN ($P{login_id})<br />]]>
+
                  WHERE  
</queryString>
+
                    start_time > $P{start_time}  
</BPcsvReport>
+
                  AND  
 +
                    login_id IN ($P{login_id})
 +
]]>
 +
    </queryString>
 +
</BPcsvReport>
 +
</syntaxhighlight>
  
=== "call_detail" Usage Sample === <!--T:9-->
+
=== "call_detail" Usage Sample ===  
In this sample, metrics  ''hold_time'', ''held'', and ''max_hold'' are being used to add hold time data to the Call Detail report.
+
In this sample, metrics  ''hold_time'', ''held'', and ''max_hold'' are being used to add hold time data to the Call Detail report.<syntaxhighlight lang="xml">
 
 
<!--T:10-->
 
 
<?xml version="1.0" encoding="UTF-8"?>
 
<?xml version="1.0" encoding="UTF-8"?>
<BPcsvReport version="1.0" resourceBundle="com.brightpattern.reports.oob_reports">
+
<BPcsvReport version="1.0" resourceBundle="com.brightpattern.reports.oob_reports">
<parameters>
+
    <parameters>
<parameter name="start_time" type="timeframe" subtype="start"/>
+
        <parameter name="start_time" type="timeframe" subtype="start" />
<parameter name="end_time" type="timeframe" subtype="end"/>
+
        <parameter name="end_time" type="timeframe" subtype="end" />
<parameter name="login_id" type="agent" />
+
        <parameter name="login_id" type="agent" />
</parameters>
+
    </parameters>
<queryString>
+
    <queryString>
<![CDATA[
+
        <![CDATA[ SELECT  
SELECT
+
                    start_time,  
start_time,
+
                    first_name,  
first_name,
+
                    last_name,  
last_name,
+
                    num_calls_in,  
num_calls_in,
+
                    num_calls_answered,  
num_calls_answered,
+
                    hold_time,  
<font color="ff33cc">hold_time,</font color>
+
                    held,  
<font color="ff33cc">held,</font color>
+
                    max_hold,  
<font color="ff33cc">max_hold,</font color>
+
                    team_name  
team_name
+
                  FROM  
FROM <font color="ff33cc">call_detail</font color>
+
                    call_detail  
WHERE start_time > $P{start_time} AND login_id=$P{login_id}
+
                  WHERE  
]]>
+
                    start_time > $P{start_time}  
</queryString>
+
                  AND  
</BPcsvReport>
+
                    login_id=$P{login_id} ]]>
 
+
    </queryString>
 
+
</BPcsvReport>
 
+
</syntaxhighlight>
 
 
</translate>
 

Latest revision as of 08:52, 18 November 2024

• 日本語
• 5.19 • 5.2 • 5.3 • 5.8

BPXML Syntax and Samples

You can create a custom BPXML report template and use it to export CSV data. This section explains the syntax and structure of BPXML report templates.

Syntax

The top level "BPcsvReport" element contains optional "parameters" and "queryString" sub-elements.

"queryString" is a common SQL statement, and it can contain some parameters.

Links

Reporting DB structure for Statistical Data.

General Information About Detailed Records

Parameter Types

The following is the full set of supported parameters:

  • "agent" – agent selector
  • "agentlist" – agent multiple selector
  • "end_time"
  • "service" – service selector
  • "servicelist" – service multiple selector
  • "start_time"
  • "team” – team selector
  • "teamlist" – team multiple selector
  • "timeframe" subtypes:
    • "start"
    • "end" (only one pair per report) – start and end dates selector
    • "string" - an arbitrary string value

Sample BPXML Report

<?xml version="1.0" encoding="UTF-8"?>
<BPcsvReport version="1.0" resourceBundle="com.brightpattern.reports.oob_reports">
    <parameters>
        <parameter name="start_time" type="timeframe" subtype="start" />
        <parameter name="end_time" type="timeframe" subtype="end" />
        <parameter name="login_id" type="agent" />
    </parameters>
    <queryString>
        <![CDATA[ SELECT 
                     start_time, 
                     first_name, 
                     last_name, 
                     num_calls_in, 
                     num_calls_answered, 
                     team_name 
                  FROM 
                     agent_performance 
                  WHERE 
                     start_time > $P{start_time} 
                  AND 
                     login_id=$P{login_id} ]]>
    </queryString>
</BPcsvReport>

Examples

The following are examples of various types of BPXML reports. Values that differ from the Sample BPXML Report given above are shown in pink.

"agentlist" Usage Sample

In this sample, parameter agentlist is being used to add agent data to the Agent Performance report.

<?xml version="1.0" encoding="UTF-8"?>
<BPcsvReport version="1.0" resourceBundle="com.brightpattern.reports.oob_reports">
    <parameters>
        <parameter name="start_time" type="timeframe" subtype="start" />
        <parameter name="end_time" type="timeframe" subtype="end" />
        <parameter name="login_id" type="agentlist" />
    </parameters>
    <queryString>
        <![CDATA[ SELECT 
                     start_time, 
                     first_name, 
                     last_name, 
                     num_calls_in, 
                     num_calls_answered, 
                     team_name 
                  FROM 
                     agent_performance 
                  WHERE 
                     start_time > $P{start_time} 
                  AND 
                     login_id IN ($P{login_id})
]]>
    </queryString>
</BPcsvReport>

"call_detail" Usage Sample

In this sample, metrics hold_time, held, and max_hold are being used to add hold time data to the Call Detail report.

<?xml version="1.0" encoding="UTF-8"?>
<BPcsvReport version="1.0" resourceBundle="com.brightpattern.reports.oob_reports">
    <parameters>
        <parameter name="start_time" type="timeframe" subtype="start" />
        <parameter name="end_time" type="timeframe" subtype="end" />
        <parameter name="login_id" type="agent" />
    </parameters>
    <queryString>
        <![CDATA[ SELECT 
                     start_time, 
                     first_name, 
                     last_name, 
                     num_calls_in, 
                     num_calls_answered, 
                     hold_time, 
                     held, 
                     max_hold, 
                     team_name 
                  FROM 
                     call_detail 
                  WHERE 
                     start_time > $P{start_time} 
                  AND 
                     login_id=$P{login_id} ]]>
    </queryString>
</BPcsvReport>
< Previous | Next >