(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: | ||
− | < | + | = Template Function Library= |
+ | |||
+ | __NOINDEX__ | ||
+ | {{Template:PEC_Migrated}} | ||
+ | |||
+ | |||
+ | Once you know how to [[RTRFormulas9|use formulas]], you can use this function library as reference for additional customization. | ||
+ | |||
+ | |||
+ | Below is a function library for Genesys Pulse standard templates as automatically generated from Genesys Pulse, starting with release 8.5.102.02. | ||
+ | __TOC__ | ||
+ | |||
+ | <h2>GetAgentNonVoiceStatus(state, media) → {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) → {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) → {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> </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><optional></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) → {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> </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><optional></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) → {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) → {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) → {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) → {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) → {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) → {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) → {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> | ||
+ | <br> | ||
+ | |||
+ | In order to correctly use the <tt>GetUserDataValue(state, key)</tt> function, check the <tt>User Data</tt> checkbox in the Current state <tt>(state)</tt> statistic options: | ||
+ | [[File:UDcheckbox.png|thumbnail|none]] | ||
+ | |||
+ | === Example: === | ||
+ | The <tt>Current_Status</tt> statistic is defined by Stat Server options properties. The <tt>ExtendedCurrentStatus</tt> statistic type, defined below, returns a specific object that can be further analyzed. | ||
+ | |||
+ | <tt>'''[ExtendedCurrentStatus]''' <br> | ||
+ | Category=CurrentState <br> | ||
+ | MainMask=* <br> | ||
+ | Objects=Agent <br> | ||
+ | Subject=DNAction</tt> | ||
+ | |||
+ | You can display the value of the attached User Data using the <tt>Current_Status</tt> statistic. | ||
+ | |||
+ | Formula: Get value of attached User Data with key 'NAME' <br> | ||
+ | ''Result = G.GetUserDataValue(Data.Current_Status.Value, ''''NAME'''');'' | ||
+ | |||
+ | [[Category:V:PSAAS:Public]] |
Latest revision as of 12:32, October 2, 2020
Template Function Library
Once you know how to use formulas, you can use this function library as reference for additional customization.
Below is a function library for Genesys Pulse standard templates as automatically generated from Genesys Pulse, starting with release 8.5.102.02.
Contents
- 1 Template Function Library
- 1.1 GetAgentNonVoiceStatus(state, media) → {string}
- 1.2 GetAgentVoiceStatus(state) → {string}
- 1.3 GetANI(state, switchID) → {string}
- 1.4 GetBusinessResult(state)
- 1.5 GetCustomerSegment(state)
- 1.6 GetDNIS(state, switchID) → {string}
- 1.7 GetEmployeeId(state) → {string}
- 1.8 GetExtension(state) → {string}
- 1.9 GetLoginId(state) → {string}
- 1.10 GetPlace(state) → {string}
- 1.11 GetPosition(state) → {string}
- 1.12 GetReasonCodes(state) → {string}
- 1.13 GetServiceSubType(state)
- 1.14 GetServiceType(state)
- 1.15 GetStatusDuration(state) → {Number}
- 1.16 GetSwitches(state, sep)
- 1.17 GetUserDataValue(state, key)
GetAgentNonVoiceStatus(state, media) → {string}
Parameters:
Name | Type | Description |
state | AgentCurrentState | Current state of the agent (typically, Value of the appropriate statistic). |
media | string | Media name. |
Returns:
Type = string
GetAgentVoiceStatus(state) → {string}
Parameters:
Name | Type | Description |
state | AgentCurrentState | Current state of the agent (typically, Value of the appropriate statistic). |
Returns:
Type = string
GetANI(state, switchID) → {string}
Parameters:
Name | Type | Argument | Description |
state | AgentCurrentState | Current state of the agent (typically, Value of the appropriate statistic). | |
switchID | string | <optional> | Optional switch name to limit the search. |
Returns:
Type = string
GetBusinessResult(state)
Parameters:
Name | Type | Description |
state | AgentCurrentState | Current state of the agent (typically, Value of the appropriate statistic). |
Returns:
GetCustomerSegment(state)
Parameters:
Name | Type | Description |
state | AgentCurrentState | Current state of the agent (typically, Value of the appropriate statistic). |
Returns:
GetDNIS(state, switchID) → {string}
Parameters:
Name | Type | Argument | Description |
state | AgentCurrentState | Current state of the agent (typically, Value of the appropriate statistic). | |
switchID | string | <optional> | Optional switch name to limit the search. |
Returns:
Type = string
GetEmployeeId(state) → {string}
Parameters:
Name | Type | Description |
state | AgentCurrentState | Current state of the agent (typically, Value of the appropriate statistic) |
Returns:
Type = string
GetExtension(state) → {string}
Parameters:
Name | Type | Description |
state | AgentCurrentState | Current state of the agent (typically, Value of the appropriate statistic) |
Returns:
Type = string
GetLoginId(state) → {string}
Parameters:
Name | Type | Description |
state | AgentCurrentState | Current state of the agent (typically, Value of the appropriate statistic) |
Returns:
Type = string
GetPlace(state) → {string}
Parameters:
Name | Type | Description |
state | AgentCurrentState | Current state of the agent (typically, Value of the appropriate statistic). |
Returns:
Type = string
GetPosition(state) → {string}
Parameters:
Name | Type | Description |
state | AgentCurrentState | Current state of the agent (typically, Value of the appropriate statistic) |
Returns:
Type = string
GetReasonCodes(state) → {string}
Parameters:
Name | Type | Description |
state | AgentCurrentState | Current state of the agent (typically, Value of the appropriate statistic). |
Returns:
Type = string
GetServiceSubType(state)
Parameters:
Name | Type | Description |
state | AgentCurrentState | Current state of the agent (typically, Value of the appropriate statistic). |
Returns:
GetServiceType(state)
Parameters:
Name | Type | Description |
state | AgentCurrentState | Current state of the agent (typically, Value of the appropriate statistic). |
Returns:
GetStatusDuration(state) → {Number}
Parameters:
Name | Description |
state | Current state of the agent, agent group, DN or campaign (typically, Value of the appropriate statistic). |
Returns:
Type = Number
GetSwitches(state, sep)
Parameters:
Name | Type | Description |
state | AgentCurrentState | Current state of the agent (typically, Value of the appropriate statistic). |
sep | string | Separator to use. Default is ';'. |
Returns:
GetUserDataValue(state, key)
Parameters:
Name | Type | Description |
state | AgentCurrentState | Current state of the agent (typically, Value of the appropriate statistic). |
key | string | User data key |
Returns:
In order to correctly use the GetUserDataValue(state, key) function, check the User Data checkbox in the Current state (state) statistic options:
Example:
The Current_Status statistic is defined by Stat Server options properties. The ExtendedCurrentStatus statistic type, defined below, returns a specific object that can be further analyzed.
[ExtendedCurrentStatus]
Category=CurrentState
MainMask=*
Objects=Agent
Subject=DNAction
You can display the value of the attached User Data using the Current_Status statistic.
Formula: Get value of attached User Data with key 'NAME'
Result = G.GetUserDataValue(Data.Current_Status.Value, 'NAME');