Jump to: navigation, search

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.

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.


In order to correctly use the GetUserDataValue(state, key) function, check the User Data checkbox in the Current state (state) statistic options:

UDcheckbox.png

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');

This page was last edited on May 21, 2018, at 16:53.
Comments or questions about this documentation? Contact us for support!