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.
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}
Get agent's status name for the media other than Voice.
Parameters:
Name | Type | Description |
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:
Name | Type | Description |
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:
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:
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:
Name | Type | Description |
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:
Name | Type | Description |
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:
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:
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:
Name | Type | Description |
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:
Name | Type | Description |
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:
Name | Type | Description |
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:
Name | Type | Description |
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:
Name | Type | Description |
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:
Name | Type | Description |
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:
Name | Type | Description |
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:
Name | Type | Description |
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:
Name | Description |
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:
Name | Type | Description |
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:
Name | Type | Description |
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!