提供: Bright Pattern Documentation
< 5.19:Custom-reporting-tutorial‎ | BPXMLSyntaxandSamples
Revision as of 13:50, 14 November 2019 by Marina (talk | contribs) (Created page with "== 構文 == トップレベルの"BPcsvReport"エレメントには、 オプショナル "parameters" と "queryString"のサブエレメントが含まれています。")
移動先: 案内検索
• English
• 5.19 • 5.3 • 5.8

BPXML構文とサンプル

カスタムBPXMLレポートテンプレートを作成し、それを使うと、CSVデータをエクスポートできます。このセクションでは、BPXMLレポートテンプレートの構文と構成について説明します。

構文

トップレベルの"BPcsvReport"エレメントには、 オプショナル "parameters" と "queryString"のサブエレメントが含まれています。

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

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>

< 前へ | 次へ >