Jump to: navigation, search
(Created target blank page For Version: PSAAS:Public)
 
(Modified comment string {{Template:PEC_Migrated}} with __NOINDEX__ {{Template:PEC_Migrated}})
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<!-- Creation of the target page -->
+
= Template function library=
 +
 
 +
__NOINDEX__
 +
{{Template:PEC_Migrated}}
 +
 
 +
 
 +
{{BEC_Head
 +
|context=
 +
Once you know how to [[RTRFormulas|use formulas]], you can use this function library as reference for additional customization.
 +
 
 +
Below is a function library for Pulse standard templates.
 +
|dimension=
 +
}}
 +
__TOC__
 +
 +
<h2>GetAgentNonVoiceStatus(state, media) &rarr; {string}</h2>
 +
 
 +
<div>Get agent's status name for the media other than Voice.</div>
 +
<h3>Parameters:</h3>
 +
<table>
 +
 +
<tr><td>Name</td><td>Type</td><td>Description</td></tr>
 +
 
 +
<tr>
 +
<td><tt>state</tt></td>
 +
<td>AgentCurrentState</td>
 +
<td>Current state of the agent (typically, <strong>Value</strong> of the appropriate statistic).</td>
 +
</tr>
 +
<tr>
 +
<td><tt>media</tt></td>
 +
<td>string</td>
 +
<td>Media name.</td>
 +
</tr>
 +
 +
</table>
 +
<h3>Returns:</h3>
 +
<div><em>Status name</em>, if <strong>state</strong> and <strong>media</strong> are available, <em>empty string</em> if information about given media is not available in the given current state, <em>null</em> if <strong>state</strong> is null or not an agent state, or <strong>media</strong> is null, not specified or empty.</div>
 +
 +
Type = string
 +
 
 +
<h2>GetAgentVoiceStatus(state) &rarr; {string}</h2>
 +
 
 +
<div>Get agent's status name for the Voice media.</div>
 +
<h3>Parameters:</h3>
 +
<table>
 +
 +
<tr><td>Name</td><td>Type</td><td>Description</td></tr>
 +
 
 +
<tr>
 +
<td><tt>state</tt></td>
 +
<td>AgentCurrentState</td>
 +
<td>Current state of the agent (typically, <strong>Value</strong> of the appropriate statistic).</td>
 +
</tr>
 +
 +
</table>
 +
<h3>Returns:</h3>
 +
<div><em>Status name</em>, if <strong>state</strong> is available, <em>null</em> if <strong>state</strong> is null or not an agent state.</div>
 +
 +
Type =  string
 +
 
 +
<h2>GetANI(state, switchID) &rarr; {string}</h2>
 +
 
 +
<div>Get a first available ANI attribute in the given agent state.</div>
 +
<h3>Parameters:</h3>
 +
<table>
 +
 +
<tr><td>Name</td><td>Type</td><td>Argument</td><td>Description</td></tr>
 +
 
 +
<tr>
 +
<td><tt>state</tt></td>
 +
<td>AgentCurrentState</td>
 +
<td>&nbsp;</td>
 +
<td>Current state of the agent (typically, <strong>Value</strong> of the appropriate statistic).</td>
 +
</tr>
 +
<tr>
 +
<td><tt>switchID</tt></td>
 +
<td>string</td>
 +
<td>&lt;optional&gt;</td>
 +
<td>Optional switch name to limit the search.</td>
 +
</tr>
 +
 +
</table>
 +
<h3>Returns:</h3>
 +
<div><em>ANI value</em>, if found, <em>empty string</em> if not found, <em>null</em> if <strong>state</strong> is null or not an agent state.</div>
 +
 +
Type = string
 +
 +
<h2>GetBusinessResult(state)</h2>
 +
 +
<div>Get "Business Result" user data value.</div>
 +
<h3>Parameters:</h3>
 +
<table>
 +
 +
<tr><td>Name</td><td>Type</td><td>Description</td></tr>
 +
 
 +
<tr>
 +
<td><tt>state</tt></td>
 +
<td>AgentCurrentState</td>
 +
<td>Current state of the agent (typically, <strong>Value</strong> of the appropriate statistic).</td>
 +
</tr>
 +
 +
</table>
 +
<h3>Returns:</h3>
 +
<div><em>Business Result value</em>, if available, <em>empty string</em>, if required user data is not available, <em>null</em> if <strong>state</strong> is null or not an agent state.</div>
 +
 
 +
<h2>GetCustomerSegment(state)</h2>
 +
 
 +
<div>Get "CustomerSegment" user data value.</div>
 +
<h3>Parameters:</h3>
 +
<table>
 +
 +
<tr><td>Name</td><td>Type</td><td>Description</td></tr>
 +
 
 +
<tr>
 +
<td><tt>state</tt></td>
 +
<td>AgentCurrentState</td>
 +
<td>Current state of the agent (typically, <strong>Value</strong> of the appropriate statistic).</td>
 +
</tr>
 +
 +
</table>
 +
<h3>Returns:</h3>
 +
<div><em>CustomerSegment value</em>, if available, <em>empty string</em>, if required user data is not available, <em>null</em> if <strong>state</strong> is null or not an agent state.</div>
 +
 
 +
<h2>GetDNIS(state, switchID) &rarr; {string}</h2>
 +
 
 +
<div>Get a first available DNIS attribute in the given agent state.</div>
 +
<h3>Parameters:</h3>
 +
<table>
 +
 +
<tr><td>Name</td><td>Type</td><td>Argument</td><td>Description</td></tr>
 +
 
 +
<tr>
 +
<td><tt>state</tt></td>
 +
<td>AgentCurrentState</td>
 +
<td>&nbsp;</td>
 +
<td>Current state of the agent (typically, <strong>Value</strong> of the appropriate statistic).</td>
 +
</tr>
 +
<tr>
 +
<td><tt>switchID</tt></td>
 +
<td>string</td>
 +
<td>&lt;optional&gt;</td>
 +
<td>Optional switch name to limit the search.</td>
 +
</tr>
 +
 +
</table>
 +
<h3>Returns:</h3>
 +
<div><em>DNIS value</em>, if found, <em>empty string</em> if not found, <em>null</em> if <strong>state</strong> is null or not an agent state.</div>
 +
 +
Type = string
 +
 +
<h2>GetEmployeeId(state) &rarr; {string}</h2>
 +
 
 +
<div>Get agent's Employee ID designated in the given agent state.</div>
 +
<h3>Parameters:</h3>
 +
<table>
 +
 +
<tr><td>Name</td><td>Type</td><td>Description</td></tr>
 +
 
 +
<tr>
 +
<td><tt>state</tt></td>
 +
<td>AgentCurrentState</td>
 +
<td>Current state of the agent (typically, <strong>Value</strong> of the appropriate statistic)</td>
 +
</tr>
 +
 +
</table>
 +
<h3>Returns:</h3>
 +
<div><em>Agent's Employee ID</em>, if available, <em>empty string</em> if not available (typically, when agent is logged out), <em>null</em> if <strong>state</strong> is null or not an agent state.</div>
 +
 +
Type = string
 +
 +
<h2>GetExtension(state) &rarr; {string}</h2>
 +
 
 +
<div>Get agent's Extension designated in the given agent state.</div>
 +
<h3>Parameters:</h3>
 +
<table>
 +
 +
<tr><td>Name</td><td>Type</td><td>Description</td></tr>
 +
 
 +
<tr>
 +
<td><tt>state</tt></td>
 +
<td>AgentCurrentState</td>
 +
<td>Current state of the agent (typically, <strong>Value</strong> of the appropriate statistic)</td>
 +
</tr>
 +
 +
</table>
 +
<h3>Returns:</h3>
 +
<div><em>Agent's Extension</em>, if available, <em>empty string</em> if not available (typically, when agent is logged out), <em>null</em> if <strong>state</strong> is null or not an agent state.</div>
 +
 +
Type = string
 +
 +
<h2>GetLoginId(state) &rarr; {string}</h2>
 +
 
 +
<div>Get agent's Login ID designated in the given agent state.</div>
 +
<h3>Parameters:</h3>
 +
<table>
 +
 +
<tr><td>Name</td><td>Type</td><td>Description</td></tr>
 +
 
 +
<tr>
 +
<td><tt>state</tt></td>
 +
<td>AgentCurrentState</td>
 +
<td>Current state of the agent (typically, <strong>Value</strong> of the appropriate statistic)</td>
 +
</tr>
 +
 +
</table>
 +
<h3>Returns:</h3>
 +
<div><em>Agent's Login ID</em>, if available, <em>empty string</em> if not available (typically, when agent is logged out), <em>null</em> if <strong>state</strong> is null or not an agent state.</div>
 +
 +
Type = string
 +
 +
<h2>GetPlace(state) &rarr; {string}</h2>
 +
 +
<div>Get agent's place designated in the given agent state.</div>
 +
<h3>Parameters:</h3>
 +
<table>
 +
 +
<tr><td>Name</td><td>Type</td><td>Description</td></tr>
 +
 
 +
<tr>
 +
<td><tt>state</tt></td>
 +
<td>AgentCurrentState</td>
 +
<td>Current state of the agent (typically, <strong>Value</strong> of the appropriate statistic).</td>
 +
</tr>
 +
 +
</table>
 +
<h3>Returns:</h3>
 +
<div><em>Agent's Place name</em>, if available, <em>empty string</em> if not available (typically, when agent is logged out), <em>null</em> if <strong>state</strong> is null or not an agent state.</div>
 +
 +
Type = string
 +
 
 +
<h2>GetPosition(state) &rarr; {string}</h2>
 +
 
 +
<div>Get agent's ACD Position designated in the given agent state.</div>
 +
<h3>Parameters:</h3>
 +
<table>
 +
 +
<tr><td>Name</td><td>Type</td><td>Description</td></tr>
 +
 
 +
<tr>
 +
<td><tt>state</tt></td>
 +
<td>AgentCurrentState</td>
 +
<td>Current state of the agent (typically, <strong>Value</strong> of the appropriate statistic)</td>
 +
</tr>
 +
 +
</table>
 +
<h3>Returns:</h3>
 +
<div><em>Agent's ACD Position</em>, if available, <em>empty string</em> if not available (typically, when agent is logged out), <em>null</em> if <strong>state</strong> is null or not an agent state.</div>
 +
 +
Type = string
 +
 
 +
<h2>GetReasonCodes(state) &rarr; {string}</h2>
 +
 
 +
<div>Get reason codes corresponding to the current status of the agent from all media types. Reason codes can be obtained only for the following agent statuses: LoggedIn, AfterCallWork, NotReadyForNextCall, WaitForNextCall.</div>
 +
<h3>Parameters:</h3>
 +
<table>
 +
 +
<tr><td>Name</td><td>Type</td><td>Description</td></tr>
 +
 
 +
<tr>
 +
<td><tt>state</tt></td>
 +
<td>AgentCurrentState</td>
 +
<td>Current state of the agent (typically, <strong>Value</strong> of the appropriate statistic).</td>
 +
</tr>
 +
 +
</table>
 +
<h3>Returns:</h3>
 +
<div><em>Reason codes</em>, splitted by '; ', if available, <em>empty string</em> if reason code is not available, <em>null</em> if <strong>state</strong> is null or not an agent state.</div>
 +
 +
Type = string
 +
 +
<h2>GetServiceSubType(state)</h2>
 +
 +
<div>Get "ServiceSubType" user data value.</div>
 +
<h3>Parameters:</h3>
 +
<table>
 +
 +
<tr><td>Name</td><td>Type</td><td>Description</td></tr>
 +
 
 +
<tr>
 +
<td><tt>state</tt></td>
 +
<td>AgentCurrentState</td>
 +
<td>Current state of the agent (typically, <strong>Value</strong> of the appropriate statistic).</td>
 +
</tr>
 +
 +
</table>
 +
<h3>Returns:</h3>
 +
<div><em>ServiceSubType value</em>, if available, <em>empty string</em>, if required user data is not available, <em>null</em> if <strong>state</strong> is null or not an agent state.</div>
 +
 
 +
<h2>GetServiceType(state)</h2>
 +
 
 +
<div>Get "ServiceType" user data value.</div>
 +
<h3>Parameters:</h3>
 +
<table>
 +
 +
<tr><td>Name</td><td>Type</td><td>Description</td></tr>
 +
 
 +
<tr>
 +
<td><tt>state</tt></td>
 +
<td>AgentCurrentState</td>
 +
<td>Current state of the agent (typically, <strong>Value</strong> of the appropriate statistic).</td>
 +
</tr>
 +
 +
</table>
 +
<h3>Returns:</h3>
 +
<div><em>ServiceType value</em>, if available, <em>empty string</em>, if required user data is not available, <em>null</em> if <strong>state</strong> is null or not an agent state.</div>
 +
 
 +
<h2>GetStatusDuration(state) &rarr; {Number}</h2>
 +
 
 +
<div>Get duration of the current status of the agent.</div>
 +
<h3>Parameters:</h3>
 +
<table>
 +
 +
<tr><td>Name</td><td>Description</td></tr>
 +
 
 +
<tr>
 +
<td><tt>state</tt></td>
 +
<td>Current state of the agent, agent group, DN or campaign (typically, <strong>Value</strong> of the appropriate statistic).</td>
 +
</tr>
 +
 +
</table>
 +
<h3>Returns:</h3>
 +
<div><em>Duration</em>, in seconds, if <strong>state</strong> is available, <em>null</em> if <strong>state</strong> is null.</div>
 +
 +
Type = Number
 +
 
 +
<h2>GetSwitches(state, sep)</h2>
 +
 +
<div>Get list of switches where agent is logged in.</div>
 +
<h3>Parameters:</h3>
 +
<table>
 +
 +
<tr><td>Name</td><td>Type</td><td>Description</td></tr>
 +
 
 +
<tr>
 +
<td><tt>state</tt></td>
 +
<td>AgentCurrentState</td>
 +
<td>Current state of the agent (typically, <strong>Value</strong> of the appropriate statistic).</td>
 +
</tr>
 +
<tr>
 +
<td><tt>sep</tt></td>
 +
<td>string</td>
 +
<td>Separator to use. Default is <em>';'</em>.</td>
 +
</tr>
 +
 +
</table>
 +
<h3>Returns:</h3>
 +
<div><em>List of switches</em>, if available, <em>empty string</em>, if agent is completely logged out, <em>null</em> if <strong>state</strong> is null or not an agent state.</div>
 +
 
 +
<h2>GetUserDataValue(state, key)</h2>
 +
 
 +
<div>Get value of the first found user data with given key.</div>
 +
<h3>Parameters:</h3>
 +
<table>
 +
 +
<tr><td>Name</td><td>Type</td><td>Description</td></tr>
 +
 
 +
<tr>
 +
<td><tt>state</tt></td>
 +
<td>AgentCurrentState</td>
 +
<td>Current state of the agent (typically, <strong>Value</strong> of the appropriate statistic).</td>
 +
</tr>
 +
<tr>
 +
<td><tt>key</tt></td>
 +
<td>string</td>
 +
<td>User data key</td>
 +
</tr>
 +
 +
</table>
 +
<h3>Returns:</h3>
 +
<div><em>User data value</em>, if available, <em>empty string</em>, if required user data is not available, <em>null</em> if <strong>state</strong> is null or not an agent state or <strong>key</strong> is null.</div>
 +
 
 +
[[Category:V:PSAAS:Public]]

Latest revision as of 12:32, October 2, 2020

Template function library

Important
This content may not be the latest Genesys Engage cloud content. To find the latest content, go to Reporting in Genesys Engage cloud.



Once you know how to use formulas, you can use this function library as reference for additional customization.

Below is a function library for Pulse standard templates.

GetAgentNonVoiceStatus(state, media) → {string}

Get agent's status name for the media other than Voice.

Parameters:

NameTypeDescription
state AgentCurrentState Current state of the agent (typically, Value of the appropriate statistic).
media string Media name.

Returns:

Status name, if state and media are available, empty string if information about given media is not available in the given current state, null if state is null or not an agent state, or media is null, not specified or empty.

Type = string

GetAgentVoiceStatus(state) → {string}

Get agent's status name for the Voice media.

Parameters:

NameTypeDescription
state AgentCurrentState Current state of the agent (typically, Value of the appropriate statistic).

Returns:

Status name, if state is available, null if state is null or not an agent state.

Type = string

GetANI(state, switchID) → {string}

Get a first available ANI attribute in the given agent state.

Parameters:

NameTypeArgumentDescription
state AgentCurrentState   Current state of the agent (typically, Value of the appropriate statistic).
switchID string <optional> Optional switch name to limit the search.

Returns:

ANI value, if found, empty string if not found, null if state is null or not an agent state.

Type = string

GetBusinessResult(state)

Get "Business Result" user data value.

Parameters:

NameTypeDescription
state AgentCurrentState Current state of the agent (typically, Value of the appropriate statistic).

Returns:

Business Result value, if available, empty string, if required user data is not available, null if state is null or not an agent state.

GetCustomerSegment(state)

Get "CustomerSegment" user data value.

Parameters:

NameTypeDescription
state AgentCurrentState Current state of the agent (typically, Value of the appropriate statistic).

Returns:

CustomerSegment value, if available, empty string, if required user data is not available, null if state is null or not an agent state.

GetDNIS(state, switchID) → {string}

Get a first available DNIS attribute in the given agent state.

Parameters:

NameTypeArgumentDescription
state AgentCurrentState   Current state of the agent (typically, Value of the appropriate statistic).
switchID string <optional> Optional switch name to limit the search.

Returns:

DNIS value, if found, empty string if not found, null if state is null or not an agent state.

Type = string

GetEmployeeId(state) → {string}

Get agent's Employee ID designated in the given agent state.

Parameters:

NameTypeDescription
state AgentCurrentState Current state of the agent (typically, Value of the appropriate statistic)

Returns:

Agent's Employee ID, if available, empty string if not available (typically, when agent is logged out), null if state is null or not an agent state.

Type = string

GetExtension(state) → {string}

Get agent's Extension designated in the given agent state.

Parameters:

NameTypeDescription
state AgentCurrentState Current state of the agent (typically, Value of the appropriate statistic)

Returns:

Agent's Extension, if available, empty string if not available (typically, when agent is logged out), null if state is null or not an agent state.

Type = string

GetLoginId(state) → {string}

Get agent's Login ID designated in the given agent state.

Parameters:

NameTypeDescription
state AgentCurrentState Current state of the agent (typically, Value of the appropriate statistic)

Returns:

Agent's Login ID, if available, empty string if not available (typically, when agent is logged out), null if state is null or not an agent state.

Type = string

GetPlace(state) → {string}

Get agent's place designated in the given agent state.

Parameters:

NameTypeDescription
state AgentCurrentState Current state of the agent (typically, Value of the appropriate statistic).

Returns:

Agent's Place name, if available, empty string if not available (typically, when agent is logged out), null if state is null or not an agent state.

Type = string

GetPosition(state) → {string}

Get agent's ACD Position designated in the given agent state.

Parameters:

NameTypeDescription
state AgentCurrentState Current state of the agent (typically, Value of the appropriate statistic)

Returns:

Agent's ACD Position, if available, empty string if not available (typically, when agent is logged out), null if state is null or not an agent state.

Type = string

GetReasonCodes(state) → {string}

Get reason codes corresponding to the current status of the agent from all media types. Reason codes can be obtained only for the following agent statuses: LoggedIn, AfterCallWork, NotReadyForNextCall, WaitForNextCall.

Parameters:

NameTypeDescription
state AgentCurrentState Current state of the agent (typically, Value of the appropriate statistic).

Returns:

Reason codes, splitted by '; ', if available, empty string if reason code is not available, null if state is null or not an agent state.

Type = string

GetServiceSubType(state)

Get "ServiceSubType" user data value.

Parameters:

NameTypeDescription
state AgentCurrentState Current state of the agent (typically, Value of the appropriate statistic).

Returns:

ServiceSubType value, if available, empty string, if required user data is not available, null if state is null or not an agent state.

GetServiceType(state)

Get "ServiceType" user data value.

Parameters:

NameTypeDescription
state AgentCurrentState Current state of the agent (typically, Value of the appropriate statistic).

Returns:

ServiceType value, if available, empty string, if required user data is not available, null if state is null or not an agent state.

GetStatusDuration(state) → {Number}

Get duration of the current status of the agent.

Parameters:

NameDescription
state Current state of the agent, agent group, DN or campaign (typically, Value of the appropriate statistic).

Returns:

Duration, in seconds, if state is available, null if state is null.

Type = Number

GetSwitches(state, sep)

Get list of switches where agent is logged in.

Parameters:

NameTypeDescription
state AgentCurrentState Current state of the agent (typically, Value of the appropriate statistic).
sep string Separator to use. Default is ';'.

Returns:

List of switches, if available, empty string, if agent is completely logged out, null if state is null or not an agent state.

GetUserDataValue(state, key)

Get value of the first found user data with given key.

Parameters:

NameTypeDescription
state AgentCurrentState Current state of the agent (typically, Value of the appropriate statistic).
key string User data key

Returns:

User data value, if available, empty string, if required user data is not available, null if state is null or not an agent state or key is null.
This page was last edited on October 2, 2020, at 12:32.
Comments or questions about this documentation? Contact us for support!