Commenting Disabled on Discussion Pages

Commenting is temporarily disabled on the Discussion pages. If you have comments or questions about documentation information on a product page on this site, please contact Genesys Technical Publications at Techpubs.webadmin@genesys.com.

Queue Interface

From Genesys Documentation

Jump to: navigation, search

Welcome.png Home > Orchestration Server > Orchestration Developer's Guide > Orchestration Extensions > Queue Interface

Orchestration Developer's Guide


Table of Contents



SCXML Language Reference

Orchestration Extensions [+]

Migration from IRD
Orchestration Server Integration
Orchestration Getting Started Guide
Orchestration Server How-To
External Interfaces
Orchestration Server Sample Applications
Orchestration Server Sample Templates



Installation/Configuration [+]

Orchestration Server Troubleshooting

This Interface provides the ability to allow the orchestration logic to request the appropriate resource for some processing and return the appropriate address information for the resource. The current URS functionality (queuing, prioritization, and so on) will be used for this interface.

Contents

Target Formats

All target definitions are strings, but the strings have a particular format, depending on where they are used.

The following is the list of target formats that are used:

Skill Expressions

All skill expression definitions are strings, but the strings have a particular format. A skill expression is a set of conditional expressions that are linked together via logic operators. When a skill expression contains more than one conditional expression, the conditional expression to the left has precedence over the conditional expression to the right. Parentheses can be used to overrule this precedence. Your can use an ECMAScript logic expression to create the skill expression string. The following are the parts of the skill expression:

A skill expression has the following limitations:

Routing Rules

Currently, Universal Routing Server supports the use of routing rules which are stored in Configuration Server. These are really not rules, but routing profiles which define a unique set of attributes and child elements for a <submit> element. An application can use the <submit> src attribute for using routing rules. These routing rule definitions can come from transaction objects from Configuration Server.

For details, see <submit>. The following are the properties for each routing rule and how they map to the <submit> attributes and child elements:

Routing Rule

Routing Rule Property

Queue Functional Module Interface equivalent

LoadBalancing

VQ name

<submit> queue attribute

List of ACDQueue data (switch and name)

<targets> and <target> or <targetid>

Percentage

 

<submit> ordertype attribute ="percentage"

VQ name

<submit> queue attribute

Type of targets

<targets> type attribute

List of targets and percentages

<targets> <target> (name and weight attributes)

Busy treatment data

<runtreatments> and all child elements

Service Level

 

<submit> ordertype attribute = "min" or "max"

VQ name

<submit> queue attribute

Statserver name

<targets> <target> statserver attribute

Statistic name

<submit> orderstat attribute

Skills to use and their skill levels

<target> skillexpr attribute

Service Factor data (distribute X percent of interaction in Y seconds)

Not supported through an attribute or child element but can be supported through <submit> src attribute and the gdata scheme.

Busy treatment data

<runtreatments> and all child elements

Importance

Not supported through an attribute or child element but can be supported through <submit> src attribute and the gdata scheme.

Statistics

 

<submit> ordertype attribute = "min" or "max"

VQ name

<submit> queue attribute

Statserver name

<targets> <target> statserver attribute

Statistic name

<submit> orderstat attribute

Type of targets

<targets> type attribute

List of target names

<targets> <target> or <targetid>

Busy treatment data

<runtreatments> and all child elements

Workforce

VQ name

<submit> queue attribute

Schedule data (activity name, cut off time)

<activity>

Busy treatment data

<runtreatments> and all child elements

Object Model

_genesys.queue Object

This is the global root object for the Queue functional module interface. This object is maintained by the Queue functional module that implements this interface.

The name of the object will be "_genesys.queue".

There are currently no data properties associated with this object.

_genesys.queue.overwriteType ENUM Object

This represents the DNIS overwrite type enumeration. This enumeration is maintained by the orchestration platform.

This is the set of properties for the object:

Name

Access

Type

Default Value

Valid Values

Description

UseNone

read only

integer

none

0

Use nothing to overwrite the DNIS.

UseANI

read only

integer

none

1

Use the ANI value to overwrite the DNIS.

UseDNIS

read only

integer

none

2

Use the DNIS value to overwrite the DNIS.

UseConfig

read only

integer

none

3

Use a configuration value to overwrite the DNIS.

UseValue

read only

integer

none

4

Use the supplied value to overwrite the DNIS.

_genesys.queue.rType ENUM Object

This represents the rType enumeration. This enumeration is maintained by the orchestration platform.

This is the set of properties for the object:

Name

Access

Type

Default Value

Valid Values

Description

RouteTypeUnknown

read only

integer

none

0

This represents an unknown route type

RouteTypeDefault

read only

integer

none

1

This represents a default route type

RouteTypeLabel

read only

integer

none

2

This represents a label route type

RouteTypeOverwriteDNIS

read only

integer

none

3

This represents an overwrite DNIS route type

RouteTypeDDD

read only

integer

none

4

This represents a DDD route type

RouteTypeIDDD

read only

integer

none

5

This represents an IDDD route type

RouteTypeDirect

read only

integer

none

6

This represents a direct route type

RouteTypeReject

read only

integer

none

7

This represents a reject route type

RouteTypeAnnouncement

read only

integer

none

8

This represents an announcement route type

RouteTypePostFeature

read only

integer

none

9

This represents a post feature route type

RouteTypeDirectAgent

read only

integer

none

10

This represents a direct agent route type

RouteTypePriority

read only

integer

none

11

This represents a priority route type

RouteTypeDirectPriority

read only

integer

none

12

This represents a direct priority route type

RouteTypeGetFromDN

read only

integer

none

13

This represents a from DN route type

RouteTypeAgentID

read only

integer

none

14

This represents an agent ID route type

RouteTypeCallDisconnect

read only

integer

none

15

This represents a call disconnect route type

_genesys.queue.quotaType ENUM Object

This represents the quotaType enumeration. This enumeration is maintained by the orchestration platform.

This is the set of properties for the object:

Name

Access

Type

Default Value

Valid Values

Description

QuotaMin

read only

integer

none

0

This means to filter on the minimum quota values

QuotaTarget

read only

integer

none

1

This represents means to filter on the target-based quota values

QuotaMax

read only

integer

none

2

This means to filter on the maximum quota values

_genesys.queue.statcond ENUM Object

This represents the statcond enumeration. This enumeration is maintained by the orchestration platform.

This is the set of properties for the object:

Name

Access

Type

Default Value

Valid Values

Description

ReadyIfLess

read only

integer

none

0

This represents the condition where the agent is ready and the associated statistic is less than the threshold value.

ReadyIfGreater

read only

integer

none

1

This represents the condition where the agent is ready and the associated statistic is greater than the threshold value.

ReadyIfNotGreater

read only

integer

none

2

This represents the condition where the agent is ready and the associated statistic is not greater than the threshold value.

ReadyIfNotLess

read only

integer

none

3

This represents the condition where the agent is ready and the associated statistic is not less than the threshold value.

_genesys.queue.usecapcond ENUM Object

This represents the usecapcond enumeration. This enumeration is maintained by the orchestration platform.

This is the set of properties for the object:

Name

Access

Type

Default Value

Valid Values

Description

OnStatError

read only

integer

none

0

This indicates to use the statistical tables from the configuration layer when there is an error with the Stat Server results.

Never

read only

integer

none

1

This indicates to never use the statistical tables

Only

read only

integer

none

2

This indicates to only use the statistical tables.

Functions

_genesys.queue.reserveTarget

When the <submit> action returns a ready target, the target is always blocked by the functional module during some time in seconds (the value of the platform's transition_time configuration option). The reserveTarget function allows you to override such behavior and change the time interval or even cancel it entirely (time parameter = 0). During the time the target is reserved, the functional module does not distribute any interactions to the target as specified by the target parameter, which is the result of the <submit> action. This function can be used in cases where a target may have additional conditions (except a Stat Server–reported not-ready state) that should prevent the target from being selected as a valid target. This blocking time will be applied to all <submit> action resulting targets until it is changed again by this function.

void _genesys.queue.reserveTarget(ixnid, target, time)

Parameters:

Returns: void

The following is an example of this function:

_genesys.queue.reserveTarget( _data.ixnid, 'return:ok|n:_data.reqid|agent:703_sip|place:703|dn:703|switch:SipSwitch', 40 );

_genesys.queue.cCTExtractTargets

This function produces a list of targets in "possible target" format from the supplied arguments and stores target DN information associated to each target for subsequent use in number translation of type[TARGET.CCTN].These are maintained for the life of the session by the functional module and can be used for any interaction associated with session.

This function supports these target types:

targets _genesys.queue.cCTExtractTargets(ixnid, statserver, input)

Parameters:

Returns: targets: STRING–The result of the function is a string of the form: "TargetID1@StatServer.TargetType1,...,TargetIDN@StatServer.TargetTypeN". Thus, the targets listed in the result are separated by commas and contain no spaces.

The following is an example of input and output for this function:

_data.myResult = _genesys.queue.cCTExtractTargets( _data.ixnid, 'StatServer', '701.A|702.P|SipGr_3.GA|SipPlGr2.GP' );

_data.myResult will be the following string:

'701@StatServer.A,702@StatServer.P,SipGr_3@StatServer.GA,SipPlGr2@StatServer.GP'

_genesys.queue.checkAgentState

This function instructs the functional module for the associated session (across all associated interactions) as to whether to take into account the state of an Agent, Place, Agent Group, or Place Group as reported by Stat Server or to look only for free DNs belonging to the Agent, Place, or Agent Group. For example, _genesys.queue.checkAgentState(false) makes it possible to route a voice interaction to an agent that Stat Server reports as not ready. If agent capacity rules are set, this function has no effect (as the Genesys Agent Capacity model does not use agent state).

To allow an agent to receive multiple voice interactions, this function must be false. However, the side effect is that the functional module distributes interactions so as to occupy all DNs of Agent A before considering Agent B. When this function is set to false, or the function _genesys.queue.useAgentState is used, the functional module does not apply the verification_time configuration option to agents, but still applies it to agent DNs.

void _genesys.queue.checkAgentState(ixnid, check)

Parameters:

Returns: void

The following is an example of this function:

_genesys.queue.checkAgentState( _data.ixnid, false);

_genesys.queue.clearThresholds

This function invalidates all thresholds previously set by <submit> actions for a given interaction. As a result, the functional module now considers all targets that were previously affected by <submit> actions as unconditionally ready for routing.

void _genesys.queue.clearThresholds(ixnid)

Parameters:

Returns: void

The following is an example of this function:

_genesys.queue.clearThresholds( _data.ixnid );

_genesys.queue.countSkillInGroup

This function determines the number of agents with a skill set or statistical parameters that satisfy the indicated skill expression. It returns the number of the agents belonging to the agent group based on the defined skill expression. You can also just specify a Stat Server and a skill expression without specifying an Agent Group. However, a skill expression and a Stat Server must be specified. The Stat Server is used to query the content of the provided Agent Group (real or virtual).

total _genesys.queue.countSkillInGroup(ixnid, statserver, group, sexpr)

Parameters:

Returns: total: NUMBER — The result of the function is an integer which represents the number of agents that meet the critieria of the skill expression.

The following is an example of input and output for this function:

_data.myResult = _genesys.queue.countSkillInGroup( _data.ixnid, 'StatServer', 'SipGr_2', 'english > 3 & french > 4' );

_data.myResult will be the following:

5

_genesys.queue.createSkillGroup

This function converts the provided Agent Group, Skill Expression, and StatServer into a normal target format that represents all agents belonging to the Agent Group supplied as a parameter that satisfies the logical condition given by the Skill Expression.

tlist _genesys.queue.createSkillGroup(ixnid, statserver, group, sexpr)

Parameters:

Returns: tlist: STRING — The result of the function is a string which represents a list of targets (each target is comma-separated in the string) that meet the critieria of the skill expression. It is of the form:"?GroupName:SkillExpression@statserver.GA".

The following is an example of input and output for this function:

_data.myResult = _genesys.queue.createSkillGroup( _data.ixnid, 'StatServer', 'SipGr_2', 'english>3' );

_data.myResult will be the following string:

'?SipGr_2:english>3@StatServer.GA'

_genesys.queue.excludeAgents

This function instructs the functional module not to route interactions to any agent on the

specified list of agents. This applies across all <submit> actions associated with the session.

prev_agents _genesys.queue.excludeAgents(ixnid, agents)

Parameters:

Returns: prev_agents: STRING — The result of the function is a string which represents a list of previous excluded agents. Each agent ID is comma-separated in the string.

The following is an example of input and output for this function:

_data.myResult1 = _genesys.queue.excludeAgents( _data.ixnid, '702_sip' );
...
_data.myResult2 = _genesys.queue.excludeAgents( _data.ixnid, '703_sip' );

_data.myResult2 will be the following string:

'"702_sip"'

_genesys.queue.extRouterError

This function is used to change the default external routing in the case of a failure to get a remote access number. This is only applicable across all interactions associated with the session when the application is using the <submit> action with the route attribute set to true.

void _genesys.queue.extRouterError(ixnid, enable)

Parameters:

Returns: void

The following is an example of input and output for this function:

_genesys.queue.extRouterError( _data.ixnid, true );

_genesys.queue.extRouteStatus

This function returns true if external routing is possible and false if not.

status _genesys.queue.extRouteStatus(ixnid, switch)

Parameters:

Returns: status: BOOLEAN — The result of the function is a boolean which indicates whether external routing is possible for the given media server (switch).

The following is an example of input and output for this function:

_data.myResult = _genesys.queue.extRouteStatus( _data.ixnid, 'SipSwitch' );

_data.myResult will be the following string:

true

_genesys.queue.findServiceObjective

This function returns a value that is defined in a configuration layer objective table object for a given a Service Objective, which is a unique combination of Customer Segment, Service Type, and Media Type. If the Update parameter is true, the Service Objective with Service Type and Customer Segment are automatically attached to the interaction.

value _genesys.queue.findServiceObjective(ixnid, table, media, service, segment, update)

Parameters:

Returns: value: NUMBER — The result of the function is an integer which represents the configured value for this service objective. Zero is returned if there are any issues (unsuccessful search — no service objective defined) while processing this function.

The following is an example of input and output for this function:

_data.myResult = _genesys.queue.findServiceObjective( _data.ixnid, 'OBT3', 0, 'help', 'Bronze', true );

_data.myResult will be the following number:

150

_genesys.queue.incrementPriority

This function results in incrementing the selected interaction priority by the increment every interval second. It affects the priority of the interaction for <submit> actions the interaction is already waiting for and those it may be waiting for in the future.

void _genesys.queue.incrementPriority(ixnid, increment, interval)

Parameters:

Returns: void

The following is an example of this function:

_genesys.queue.incrementPriority( _data.ixnid, 2, 10 );

_genesys.queue.priorityLimits (since ORS 8.1.200.40 and URS 8.1.200.21)

This function results in imposing additional limits on values of priority the interaction can have in any routing queue. Without it interaction priority can accept any value in range [-1,000,000,000 : 1,000,000,000].

void _genesys.queue.priorityLimits(ixnid, min, max)

Parameters (all parameters are mandatory):

Returns: void

The following is an example of this function:

_genesys.queue.priorityLimits( _data.ixnid, 1, 10 );

_genesys.queue.nMTExtractTargets

This function enables you to track the number of active interactions at a device that is not configured in the Configuration Database. It establishes a counter for all active interactions at the non-configured device. Using this counter, you can compare the number of active interactions to a specified threshold and stop routing interactions to the device when the threshold has been reached.

This function parses a list of targets, which is a comma-separated list of attributes produced by a database query or some outside application (an application on an application server, for example) such as <fetch>. Each target can be described using four attributes: Target Name, Threshold, Speaking Time, and RetryTime. These attributes are explained below:

The following is an example of input and output for this function:

_data.myResult = _genesys.queue.nMTExtractTargets( _data.ixnid, '701,702,703', 1, 2, 5, 3 );

_data.myResult will be the following string:

'{RStatCallsInQueue<=2}701.DN,{RStatCallsInQueue<=2}702.DN,{RStatCallsInQueue<=2}703.DN'
Using the Function

Use of this function to track the number of interactions at non-configured devices usually includes:

Note: The functional module has no information about the current state of the device — only the number of interactions active on it. Active interactions are considered to be the number of interactions the functional module has sent to the target, minus the number of interactions that were terminated. In addition to generating output, this function also

overwrites the default values (15 seconds and 600 seconds) for Retry Time and Speaking Time. Thresholds for non-configured devices set using the _genesys.FMname.SetThresholdEx function, for example, use the current default values for

Retry Time and Speaking Time that were set by the latest invocation of this function.

Note: Changes applied to default settings (RetryTime, Speaking Time) specified in this function work only for non-configured devices that were created after this function was used. Those non-configured devices that were created previously are not affected by any changes made using this function. If the information about the non-configured devices (numbers, threshold values) is retrieved from an outside source (for example, a database), use this function to transform the result of this query into a target list suitable for use by the <submit> action. In this case, the use of this function automatically sets all the specified thresholds and you do not need to call the _genesys.FMname.setThresholdEx function.

Setting Multiple Thresholds

You can set more than one threshold by using this function in more than one logic definition or you can use it multiple times in the same logic. In this way, you can set a different allowable number of concurrent interactions for different situations, as described below.

Note: If you use the same non-configured device in other logic definitions or in multiple places in the same logic, the functional module uses the same counter for that device. So this definition is global across the functional module.

Using NMTExtractTargets to Set Multiple Thresholds — Example:

You can set different thresholds for the same non-configured device to take account of different business conditions. For example, between 9:00 AM and 5:00 PM, an outsourcer with a nonconfigured device can handle 100 concurrent interactions. After 5:00PM, the outsourcer can handle only 50 concurrent interactions on this device.

Here is how it works:

  1. Place this function in two places. You can use it twice in one logic definition or use two separate logic definitions to handle this situation, depending on what is best suited to your environment. A global counter is created for the non-configured device.
  2. Using one instance of this function, set a default threshold value of 100 to be attached as an attribute to all interactions that arrive between 9:00 AM and 5:00 PM.
  3. Using the other instance of the function, set a default threshold value of 50 to be attached as an attribute to all interactions that arrive between 5:00 PM and 9:00 AM.

When an interaction is ready to be routed, the interaction attribute is compared to the global counter, which is incremented or decremented to correspond to the number of active interactions on this non-configured device. If the value on the counter is greater than the interaction's Threshold attribute, the interaction is not routed until the counter's value drops below the appropriate threshold.

Deployment Considerations

Only one orchestration platform can send interactions to the non-monitored device. If you require multiple numbers to distribute to the same non-monitored device, align the SN-to-DN table, the network switch, and platform so that all interactions sent to a nonmonitored device are processed by the same platform. You can use a network-controlling server (for example, T-Server or a SIP Server) as the network switch. To use this function, the platform and functional module must register on a special device (called switch::) in order to receive notification from the controlling server (for example, T-Server) about the termination of interactions. If you do not register, the RStatCallsInQueuestatistic is not correctly calculated for non-monitored targets. Registration is not automatic and is controlled by platform (using the call_monitoring configuration option).

tlist _genesys.queue.nMTExtractTargets(ixnid, targets, dThreshold, dSpeakTime, dRetryTime, recordSize)

Parameters:

Returns: tlist: STRING — The result of the function is a string of the form: "{RStatCallsInQueue<=TargetThres1}TargetName1.DN,...,{RStatCallsInQueue<=TargetThresN}TargetNameN.DN". Thus, the targets listed in the result are separated by commas and contain no spaces.

_genesys.queue.onRouteError

This function allows you to specify an individual functional module reaction for every type of error. If used, this option overwrites theon_route_error configuration option for all interactions associated with the current session. In the case of an error, the functional module behaves in the following way:

Note: This function should ONLY be used when using the <submit> action with the route attribute set to true.

void _genesys.queue.onRouteError(ixnid, type, option)

Parameters:

Returns: void

The following is an example of input and output for this function:

_genesys.queue.onRouteError( _data.ixnid, 140, 'strategy_error' );

_genesys.queue.priorityTuning

The functional module always puts interactions into waiting queues according to their priorities. This function defines how the functional module handles interactions with the same priorities. By default, interactions with the same priority are ordered according to the time the interaction began to wait for some target. This applies across all <submit> actions.

void _genesys.queue.priorityTuning(ixnid, useAge,usePredict, useObjective)

Parameters:

Returns: void

The following is an example of this function:

_genesys.queue.priorityTuning( _data.ixnid, true, true, true );

_genesys.queue.resetAdjustment

This function cancels any adjustment that may have been set for a statistic for a given target using _genesys.queue.setAdjustment.

void _genesys.queue.resetAdjustment(_data.ixnid, target, statistic)

Parameters:

Returns: void

The following is an example of this function:

_genesys.queue.resetAdjustment(_data.ixnid,'SipGr_2.GA','StatAgentsAvailable');

_genesys.queue.routed

This function marks the interaction as routed. When routing functions, such as <submit> actions with the route attribute set to true, are successfully executed, an interaction is implicitly marked as routed. This function explicitly marks the interaction as routed. This function allows the functional module to dispose of the interaction when the strategy is completed and not route the interaction to the default destination.

void _genesys.queue.routed(ixnid)

Parameters:

Returns: void

The following is an example of this function:

_genesys.queue.routed( _data.ixnid );

_genesys.queue.selectTargets

This function removes from a list of Agent Groups, Place Groups, or Queue Targets those targets that have already received a number of calls in excess of their quota for the interval when the function is called. These types of quotas are specified in the configuration layer in the Statistical Days belonging to Statistical Tables of type Quota Table, associated with each of the Agent Groups or Place Groups. The queue is associated with that Quota Table that is associated with an Agent Group for which the queue is an origination DN. If no agent group is found, the queue is associated with the Quota Table that is associated to an Agent Group named after the alias of the queue. If an Agent Group or Place Group target on the list has no Quota Table associated with it or no Statistical Day in the table matches the current date, the target is retained in the list returned by the function: it has not exceeded its quota since no quota was set for it.

Configuring Quota Tables Associated to Groups of Agents or Places

A Quota Table is configured in the configuration layer as a Statistical Table object of Quota Table type (see the configuration layer documentation for more details on the process of configuration). TheQuota Table associated with an Agent Group or a Place Group must be specified inside the Advanced properties of the group. The sameQuota Table can be associated with more than one Agent Group or Place Group. The Quota Table must contain Statistical Days. Use the information about Statistical Days, but not the information about Statistical Values. The relevant values for Statistical Values are as follows: Statistical Value 1, Statistical Value 2, and Statistical Value 3 for each Interval of the day — during every interval. Value 1 is used when Quota type has a value of 0 (QuotaMin). Value 2 is used when Quota type has a value of 1 (QuotaTarget). Value 3 is used when Quota type has a value of 2 (QuotaMax). All other properties of Statistical Days are irrelevant for the purpose of setting up quotas. Note: The same Statistical Day can belong to more than one Quota Table.

tlist _genesys.queue.selectTargets(ixnid, filter, targets)

Parameters:

Returns: tlist: STRING — The result of the function is a string of targets in the possible Target Formats that matches the quota filter criteria. However, if the function encounters a list element in a different format, it does one of the following:

The following is an example of input and output for this function:

_data.myResult = _genesys.queue.selectTargets( _data.ixnid, 1, 'SipGr_3@StatServer.GA,SipPlGr2@StatServer.GP' );

_data.myResult will be the following string:

'SipGr_3@StatServer.GA,SipPlGr2@StatServer.GP'

_genesys.queue.selectTargetsByThreshold

This function finds the best available target(s) from a list of targets by applying a statistic with a threshold comparison against the input target list. This function returns a subset of the targets List parameter (possibly empty).

tlist _genesys.queue.selectTargetsByThreshold(ixnid, targets, statistic, value, cond)

Parameters:

Returns: tlist: STRING — The result of the function is a string of targets in the possible Target Formats that matches the threshold filter criteria.

The following is an example of input and output for this function:

_data.myResult = _genesys.queue.selectTargetsByThreshold( _data.ixnid, '701_sip.A,702_sip.A,703_sip.A', 'StatCallsAnswered', 3, 0 );

_data.myResult will be the following string:

'702_sip@StatServer.A,703_sip@StatServer.A'

_genesys.queue.setInteractionAge

This function overrides the default age of an interaction from a routing perspective. This function can be useful if the age of the interaction will be used for placing interactions into waiting queues. The interaction age is the time accumulated since the interaction was known by Genesys (normally set at the very first resource or device the interaction enters).

By default, the interaction age is defined by the time of the last event (for example, EventRouteRequest). However, if an interaction is going to be routed more than once (for example, if an agent transfers an interaction on a routing point for re-routing or if the Voice Callback Universal Callback Server resubmits a callback interaction to URS), the time of the last event (for example, EventRouteRequest) is not always the best way to define interaction age.

void _genesys.queue.setInteractionAge(ixnid, keep)

Parameters:

Returns: void

The following is an example of this function:

_genesys.queue.setInteractionAge( _data.ixnid, true );

NOTE: This method currently applies to voice interactions only. For multimedia interactions the following can be employed to provide the equivalent information. Do not apply the following to voice interactions.

To set the interaction age at the time that the interaction is present, similar to keep set to true, for example within a script on the entry to the next state:

   var timestamp = Math.floor((new Date().getTime())/1000 ) + ' 0'; 
var setIXNAge = { RouterData70 : '("t"="' + timestamp + '")' }; 
_genesys.ixn.setuData(setIXNAge);

For the equivalent of keep set to false:

   _genesys.ixn.deleteuData( "RouterData70" );

_genesys.queue.setAdjustment

This function enforces an adjustment of the values of a specified statistic for a particular target. The adjustment does not apply to the result of explicit Stat Server queries by the function's _genesys.statistic.sData() function. It is only used for thresholds, statistical interaction distribution, or when a statistic is supplied as an argument to the <submit> actions. Once set, an adjustment can be cleared by invoking the _genesys.queue.resetAdjustment function. This applies across all interactions and the corresponding <submit> actions for the session.

void _genesys.queue.setAdjustment(ixnid, target, statistic, sign, value)

Parameters:

Returns: void

The following is an example of this function:

_genesys.queue.setAdjustment( _data.ixnid, 'SipGr_2.GA', 'StatAgentsAvailable', '*', 2 );

_genesys.queue.translationOverride

This function overrides any translation specified in configured Switch Access Codes for routing to remote targets later in the session, and instructs the functional module to use the information specified in the parameters for the purpose of number translation.

void _genesys.queue.translationOverride(ixnid, source, destination, location, rType, DNIS, reason, extension)

Parameters:

Returns: void

The following is an example of input and output for this function:

_genesys.queue.translationOverride( _data.ixnid, 'source', 'dest', 'location', 1, '702', 'reason', 'ext' );

_genesys.queue.targetSelectionTuning

This function activates a configured cost-based routing solution for this session and the associated functional module objects (interactions and so on).

void _genesys.queue.targetSelectionTuning(ixnid, useCostFactor)

Parameters:

Returns: void

The following is an example of this function:

_genesys.queue.targetSelectionTuning( _data.ixnid, true );

_genesys.queue.useAgentState

This function specifies the agent state the functional module will use instead of the default reported by Stat Server. This will apply to the entire session and all the <submit> actions until the next _genesys.queue.useAgentState invocation.

To use this option you must first set up URS as follows:

Function[DNtype]<op1>Function[DNtype]<op1>...Function[DNtype]<op2>number...(Format1 expression)<op3>(Format1 expression)<op3>...


Where:

DN type for these predefined functions is the agent's DN. Types include ACDPosition, Extension, E-mail, Eaport, Cellular, Chat, Cobrowse, Fax, Voicemail, Voip, Video, and Workflow.

For example, the agent is defined as ready if the agent has no calls on his or her extension or position busy[extension]+busy[acdposition] = 0. An agent in this state will be considered not ready if the agent has at least one call on the extension or position. The agent will be considered ready in all other situations. So, for example, if the agent has the e-mail DN busy, the agent is still considered ready.

Important Information

void _genesys.queue.useAgentState(ixnid, state)

Parameters:

Returns: void

The following is an example of this function:

_genesys.queue.useAgentState( _data.ixnid, 'ready' );

_genesys.queue.useAgentStatistics

This function makes the functional module apply statistics for target selection at the level of individual Agents or Places even if the targets are groups of corresponding objects, such as Agent Groups or Place Groups.

This function may be used for any appropriate statistic. It can also be used for cost-based routing.

void _genesys.queue.useAgentStatistics(ixnid, use)

Parameters:

Returns: void

The following is an example of this function:

_genesys.queue.useAgentStatistics( _data.ixnid, true );

_genesys.queue.useCapacity

This function instructs the functional module on the condition for using configured capacity tables for computing statistical values. If OnStatError is supplied to the parameter, the functional module will compute a statistical value from statistical tables whenever an attempt to obtain the corresponding value from Stat Server results in an error. The other two options are either always use statistical tables for such values or never use them.

void _genesys.queue.useCapacity(ixnid, use)

Parameters:

Returns: void

The following is an example of this function:

_genesys.queue.useCapacity( _data.ixnid, 1 );

_genesys.queue.useCustomType

This function instructs the functional module on the value of a target property that the target must to have to be considered a valid target for the current session and the associated interaction and the <submit> actions that are being used.

void _genesys.queue.useCustomType(ixnid, tType, property, value)

Parameters:

Returns: void

The following is an example of this function:

_genesys.queue.useCustomType( _data.ixnid, 'DN', 'Extension', '702' );

_genesys.queue.useDNType

This function instructs the functional module on the type of DN to use when routing to a target. Choose the DN-based type of session and interaction being routed. This delivers various sessions and interactions to the correct DN on an agent's desktop.

Important information

void _genesys.queue.useDNType(ixnid, type)

Parameters:

Returns: void

The following is an example of input and output for this function:

_genesys.queue.useDNType( _data.ixnid, _genesys.resource.resourceType.CFGACDPosition );

_genesys.queue.useMediaType

This function instructs the functional module on the media types (for examples, voice, e-mail, or chat) that a target is associated with. In order to accept sessions and interactions of a particular media type, a target must be associated with that media type. If the interaction is not a voice interaction, the functional module sets the initial media type from the Media Type attribute of the trigger event. The UseMediaType function overrides this initial setting. The functional module can pick up for routing either the available media of an agent or a ready DN of an agent.

Important Information

void _genesys.queue.useMediaType(ixnid, type)

Parameters:

Returns: void

The following is an example of this function:

_genesys.queue.useMediaType( _data.ixnid, 'CFGEmail' );

_genesys.queue.expandGroup

This function creates a list of resources associated with a group. This list of (agent) resources can be used for the following purposes:

resourcelist _genesys.queue.expandGroup(ixnid, group)

Parameters:

Returns: resourcelist: STRING — The result of the function is a string which contains a comma-separated list of Agents or Place resources belonging to the specified Agent Group or Place Group. For example, "agent1@StatServer1.A,...,agentN@StatServer1.A"

The following is an example of input and output for this function:

_data.myResult = _genesys.queue.expandGroup( _data.ixnid, 'SipGr_2.GA' );

_data.myResult will be the following string:

'701_sip@StatServer.A,702_sip@StatServer.A'

_genesys.queue.getSkillInGroup

This function returns the list of the agents belonging to the Agent Group based on the defined skill expression. You can also just specify a Stat Server and a skill expression without specifying an Agent Group. However, a skill expression and a Stat Server must be specified. The Stat Server is used to query the content of the provided Agent Group (real or virtual).

resourcelist _genesys.queue.getSkillInGroup(ixnid, statserver, group, sexpr)

Parameters:

Returns: resourcelist: String — The result of the function is a string which contains a comma-separated list of Agents or Place resources that meet the conditions of the skill expression. For example, "agent1@StatServer1.A,...,agentN@StatServer1.A"

The following is an example of input and output for this function:

_data.myResult = _genesys.queue.getSkillInGroup( _data.ixnid, 'StatServer', 'SipGr_2', 'english>3' );

_data.myResult will be the following string:

'701_sip@StatServer.A,702_sip@StatServer.A'

_genesys.queue.expandActivity

This function creates a list of resources associated with a workforce management activity. It is intended for use with Genesys Workforce Management. It takes as a parameter a Workforce Management Activity name (defined in the configuration layer) and returns the list of resources assigned to the Activity from the current moment up to the next CutOffTime number of seconds. If a resource assigned to the Activity in the given time interval has a break of any

kind (including assignment to another activity), that resource will not be included in the returned list.

resourcelist _genesys.queue.expandActivity(ixnid, activity, cutoff)

Parameters:

Returns: resourcelist: STRING — The result of the function is a string which contains a comma-separated list of agent resources belonging to the specified activity and meeting the cutoff time criteria. For example, "agent1@StatServer1.A,...,agentN@StatServer1.A" If the specified activity is not found, a null will be returned.

The following is an example of input and output for this function:

_data.myResult = _genesys.queue.expandActivity( _data.ixnid, 'taskA', 3 );

_data.myResult will be the following string:

'702_sip@StatServer.A'

_genesys.queue.resetTreatments (since 8.1.200.00)

This function clears the treatments associated with all outstanding <submit> actions associated with this session and can suspend the <submit> processing for the current session until the appropriate state has been reached to begin the next treatments.

When a list of busy treatments is used in a <queue:submit>, Universal Routing Server uses this list and plays the busy treatments one after another (by default, this list loops around). When the function _genesys.queue.resetTreatments is sent to Universal Routing Server, it will clear the list of busy treatments. However, if a treatment was being played while this function is received, the treatment currently playing will not be cleared. It is recommended to disable looping using repeat in the resource attribute for <dialog:playsound>.

void _genesys.queue.resttreatments(ixnid)

Parameters:

Returns: void

The following is an example of this function being used:

<state id="findAgent">
	<onentry>
		<queue:submit priority="5" timeout="60">
			<queue:targets>
				<queue:target type="agent" name="'agent1'" />
			</queue:targets>

			<dialog:runtreatments>
				<dialog:playsound type="'music'" resource="'music/on_hold;repeat=1'" duration="15" />
				<dialog:playsound type="'music'" resource="'music/in_queue;repeat=1'" duration="15" />
			</dialog:runtreatments>
		</queue:submit>
	</onentry>

	<transition event="stopMusic" target="resetTreatments" />
	<transition event="queue.submit.done" target="state2" />
	<transition event="error.queue.submit" target="state3" />
</state>

<state id="resetTreatments">
	<onentry>
		<script>
			_data.myResult = _genesys.queue.resetTreatments(_data.ixnid);
		</script>
	</onentry>
</state>

If the stopMusic event is received within the first 15 seconds while the music/on_hold is playing, it will play until the end of the file (ignoring the duration attribute), and music/in_queue will never be played because resetTreatments has cleared it from the list.

If the stopMusic event is received 50 seconds after entering the state findAgent, music/in_queue will be playing when the event is received, and the file will play until the end (igoring the duration attribute). No other music file will be played after this.

_genesys.queue.setDNIS

This function replaces the DNIS of the interaction by the appropriate value. It will override any previous_genesys.queue.setDNIS() function invocations.

Important Note: In order to get this DNIS override into the actual interaction on the controlling server (T-Server), the session- and interaction-originating event (for example, EventRouteRequest) must have had the routing type of RouteTypeOverwriteDNIS to make the change in the server. Otherwise, the override is only set within the session and its associated interaction object.

void _genesys.queue.setDNIS(ixn, type, value)

Parameters:

Returns: void

The following is an example of input and output for this function:

_genesys.queue.setDNIS( _data.ixnid, 2, '3318' );

_genesys.queue.useMediaChannel (since ORS 8.1.200.48 and URS 8.1.200.25)

This function provides information about the type of controller that owns the interaction (either T-Server/SIP-Server or Interaction Server). In most cases, Queue FM itself defines the right controller type and there is no need to use this function explicitly. However, some types of media interactions (like chats) can be managed by either type of controller and Queue FM needs to be made aware of the exact controller type.

If Queue FM is called in "interactionless" context (when ixnid is set to null), Queue FM assumes T-Server/SIP-Server as the default controller type. If this is not the case, function useMediaChannel can be used to change this default.

void _genesys.queue.useMediaChannel(ixnid, enable)

Parameters (all parameters are mandatory):

Returns: void

The following is an example of this function. When an SCXML session is started through Web API and Queue FM is used to find an agent ready to accept chats controlled by Interaction Server, the following should be invoked:

_genesys.queue.useMediaChannel(null, true);

Parameter Elements

The <submit> action element has parameter elements that can be used as input for the target and outbound attributes.

<targets>

This is the top-level element which defines the set of targets from which a given target is selected for the submit request.

Attributes

Name

Required

Type

Default Value

Valid Values

Description

type

false

NMTOKEN

none

agent, place, agentgroup, placegroup, queue, dn, skill, campaigngroup, routepoint, label

This specifies the default resource type that should be used if a type attribute is not specified in the associated <target> elements.

statserver

false

value expression

none

any value expression that returns a valid string

A value expression which returns the default statserver that should be used if a statserver attribute is not specified in the associated <target> elements.

See SCXML Legal Data Values and Value Expressions for details.

Children

<targetid>

This defines a specific means of representing a set of targets.

Attributes

Name

Required

Type

Default Value

Valid Values

Description

expr

true

value expression

none

Any value expression that returns a string that follows the format defined in the description

This is the ID of the target that is to be used. It is a string with a set of comma-separated sub-strings with the following format: {threshold}[weight]name@server.type or {threshold}[weight]?name:skillexpression@server.type

The following is an example:

"'{StatCallsInQueue <10}[25]8001.Q, {StatCallsInQueue < 10}[25]8002.Q, {StatCallsInQueue < 20}[50]8003.Q"'

The following are the details of the different elements of the sub-strings.

  • weight — same as defined in <target> element
  • name — same as defined in <target> element
  • server — same as defined in statserver attribute in the <target> element
  • type — same as defined in <target> element, but with the following abbreviations:
    • A (for agent),
    • AP (for agent place)
    • GA (for group of agents)
    • GP (for group of places)
    • Q (for Queues)
    • DN (for dn)
    • GA (for skill)
    • GC (for campaign group)
    • RP (for routing points)
    • DL (for destination label)
  • skilexpr — same as defined in <target> element
  • threshold — same as defined in <target> element

See SCXML Legal Data Values and Value Expressions for details.

Children

None

<target>

This defines the resource criteria for selecting a target.

Attributes

Name

Required

Type

Default Value

Valid Values

Description

name

false

value expression

none

Any value expression that returns a valid string which represents a resource of the defined type.

A value expression which returns the name of the target that is to be used.

See SCXML Legal Data Values and Value Expressions for details.

skillexpr

false

value expression

none

Any value expression that returns a valid string which represents a valid skill expression

This is the skill expression associated with this <target> element. For details on the format, see the Skill Expressions section.

See SCXML Legal Data Values and Value Expressions for details.

type

false

NMTOKEN

none

agent, place, agentgroup, placegroup, queue, dn, skill, campaigngroup, routepoint, label

This specifies the resource type associated with this <target> element. The skill and agentgroup types are synonymous.

statserver

false

value expression

none

Any value expression that returns a valid string which represents a valid stat server.

A value expression which returns the statserver that should be used for this target definition.

See SCXML Legal Data Values and Value Expressions for details.

threshold

false

value expression

none

Any value expression that returns a valid string which represents a valid threshold expression

A value expression which returns a criteria definition that is used to further filter the potential possible targets associated with this <target> attribute. threshold is an analog of the strategy function SetTargetThreshold and defines additional conditions the target must meet to be considered as valid target for routing. The following queue-specific methods can be used in a value expression. These methods are not executed inline as part of interpreting this attribute but are processed by the underlying queue functional module:

  • sdata(target, statistic)— Use this function to affect routing conditions based on statistics.
  • Acfgdata(Application name, folder, property, default value) — Use this function to affect routing conditions based on external data stored in properties of configuration layer application objects (ApplicationConFigDATA).
  • Lcfgdata(list name, folder, property, default value) — Use this function to affect routing conditions based on external data stored in IRD list objects.
  • callage[] — Use this function to return the age of an interaction in seconds.

See SCXML Legal Data Values and Value Expressions for details. Note: Orchestration evaluates this expression to create a string that is sent to Universal Routing Server.  That is, variables and functions available in ORS may be used to construct this string; however URS has no notion of these values.  The resultant string must be a completely self contained expression for URS.  In other words, if you have a variable x in your strategy, and you want to use callage[] < x, it should be written as: 'callage[] < ' + x.

weight

false

value expression

none

Any value expression that returns a valid string

A value expression which returns a value that defines the weight of this <target> element against other <target> elements.

See SCXML Legal Data Values and Value Expressions for details.

Children

None

<activity>

This defines the workforce management activity criteria for selecting a target.

Attributes

Name

Required

Type

Default Value

Valid Values

Description

name

true

value expression

none

Any value expression that returns a valid string which represents the name of a WFM activity

A value expression which returns the name of a WFM activity that is to be used for target selection.

See SCXML Legal Data Values and Value Expressions for details.

cutofftime

false

value expression

none

Any value expression that returns an integer

A value expression which returns the cutoff time in seconds. This defines the window time in which a potential target resource must be assigned to the given activity.

See SCXML Legal Data Values and Value Expressions for details.

Children

None

<workbin>

This defines the workbin criteria for selecting a target.

Attributes

Name

Required

Type

Default Value

Valid Values

Description

type

true

NMTOKEN

none

agent, place, agentgroup, placegroup

This specifies the resource type associated <workbin> element.

name

true

value expression

none

Any value expression that returns a valid string which represents a workbin.

A value expression which returns the name of the workbin that is to be used.

See SCXML Legal Data Values and Value Expressions for details.

loggedinonly

false

boolean expression

false

Any value expression that returns true or false

A boolean expression which returns whether logged out agents can pull interactions.

(Dis)Allow using of logged out agents.

Children

None

Action Elements

<submit>

This action queues the request for a target based on the criteria specified in the request.

Attribute Details

Name

Required

Type

Default Value

Valid Values

Description

requestid

false

location expression

none

Any valid location expression

This is the location for the request ID that is returned as part of this request. Any data model expression evaluating to a data model location. See SCXML Location Expressions for details. The location's value will be set to an internally generated unique string identifier to be associated with the action being sent. This value will only be valid when the queue.submit.requestid event is received. If this attribute is not specified, the event identifier is dropped. This identifier can be tested by the completion event handler to distinguish among several outstanding requests. If this attribute is not specified, the identifier can be acquired from the action completion event. Every request must receive a unique identifier.

queue

false

value expression

none

Any value expression which returns a valid string

A value expression which returns the name of the (virtual) queue that this request should be put in. See SCXML Legal Data Values and Value Expressions for details.

priority

false

value expression

0

Any value expression which returns a value integer

A value expression which returns the priority that the interaction will be given in the queue.

See SCXML Legal Data Values and Value Expressions for details.

ordertype

false

value expression

any

max, min, any, percentage

A value expression which returns how type of ordering that should be used on the targets. It is used together with orderstat. See SCXML Legal Data Values and Value Expressions for details.

orderstat

false

value expression

none

Any value expression which returns a valid string

A value expression which returns the name of the statistic that will be used as a target selection criterion for ordering the targets. No orderstat specified means any target and order. See SCXML Legal Data Values and Value Expressions for details.

interactionid

false

value expression

none

Any value expression which returns a valid string

A value expression which returns the _genesys.ixn.interactions[x].g_uid associated with this request. There is a special value that can be returned:

  • ECMAScript Null means the functional module will not use an interaction for the request.

Note: if the <outbound> element is present then this attribute is ignored because a new interaction will be created.

See SCXML Legal Data Values and Value Expressions for details.

route

false

boolean expression

true

Any expression which returns a boolean (true, false)

A boolean expression which returns whether or not this action should also redirect the interaction to the selected destination. There are two values that can be returned:

  • "false" means the functional module will not attempt to route the associated interaction.
  • "true" means the functional module will use the associated interaction to route the interaction. Note: a value of "true" is only supported for voice-related interactions.

See SCXML Conditional Expressions for details.

clearontimeout

false

boolean expression

true

Any expression which returns a boolean (true, false)

A boolean expression which indicates whether or not the request and all associated <submit> requests for this interaction and queue should be removed from the queue after the timeout of this request.

See SCXML Conditional Expressions for details.

timeout

false

value expression

0

A value expression which returns an integer

A value expression which returns an integer that represents the number of seconds to wait. See SCXML Legal Data Values and Value Expressions for details. The integer returned must be interpreted as a time interval. This interval begins when <submit> is executed. A failed and timed-out submit must return the error.queue.submit event.

If the <outbound> element is present, this attribute is only used while waiting for an agent to become available and not for the request in its entirety.

threshold

false

value expression

none

Any value expression that returns a valid string which represents a valid threshold expression.

A value expression which returns a criteria definition that is used to further filter the potential possible targets associated with the queue attribute. threshold is an analog of the strategy function SetVQTargetThreshold and defines additional conditions the target must meet to be considered as a valid target for routing with this queue. The following queue-specific methods can be used in a value expression. These methods are not executed inline as part of interpreting this attribute but are processed by the underlying queue functional module:

  • sdata(target, statistic) — Use this function to affect routing conditions based on statistics.
  • acfgdata(Application name, folder, property, default value) — Use this function to affect routing conditions based on external data stored in properties of configuration layer application objects (ApplicationConFigDATA).
  • lcfgdata(list name, folder, property, default value) — Use this function to affect routing conditions based on external data stored in IRD list objects.
  • callage function — Use this function to return the age of an interaction in seconds.

See SCXML Legal Data Values and Value Expressions for details.

src

false

value expression

none

A value expression which returns one of the following valid URI schemes:

  • gdata

This allows a developer to supply a URI which identifies the location of a <submit> definition that is to be used in the application. This attribute is mutually exclusive with the following attributes:

  • queue
  • ordertype
  • orderstat
  • priority

This attribute is also mutually exclusive with the children of this element. This source definition will replace the entire <submit> element in the application at load time.

See SCXML Legal Data Values and Value Expressions for details.

Other Considerations

The following are examples of different types of target selection that can be done with <submit> and SCXML:

As you can see if you want to perform load balance functionality similar to the load balancing function block, you would use one of the load balancing statistics (this is using the basic one). In addition, you can really only load balance on DN-related resources (queue and dn types).

<state id="load_balancing">
<datamodel>
  <data id="reqid"/>
</datamodel>
<onentry>
  <queue:submit requestid="_data.reqid" orderstat="'StatLoadBalance'" ordertype="'min'" timeout="100" >
    <queue:targets type="queue">
      <queue:target name="'queue1'"/>
      <queue:target name="'queue2'"/>
    </queue:targets>
  </queue:submit>
</onentry>
<transition event="queue.submit.done" target="statex">
  <assign location="target" expr="_event.data.targetselected"/>
</transition>
<transition event="error.queue.submit" target="statey"/>
</state>

As you can see, if you want to perform percentage routing functionality similar to the percentage function block, you set the ordertype attribute to "percentage" and set the appropriate target weights.

<state id="percentage">
<datamodel>
  <data id="reqid"/>
</datamodel>
<onentry>
  <queue:submit requestid="_data.reqid" ordertype="'percentage'" timeout="100" >
    <queue:targets type="agentgroup">
      <queue:target name="'agtgrp1'" weight="'20'"/>
      <queue:target name="'agtgrp2'" weight="'80'"/>
    </queue:targets>
  </queue:submit>
</onentry>
<transition event="queue.submit.done" target="statex"/>
<transition event="error.queue.submit" target="statey"/>
</state>

This type of target selection is generic and can be used to combine several different forms of target selections. The biggest difference is the ability to define thresholds for a given target definition. This example shows how to do that.

<state id="Selection">
<datamodel>
  <data id="reqid"/>
</datamodel>
<onentry>
  <queue:submit queue="'VQ1'" requestid="_data.reqid" ordertype="'max'" orderstat="'StatTimeInReadyState'" timeout="100">
    <queue:targets type="agentgroup" statserver="'www.genesyslab.stserver1.com'">
      <queue:target name="'agtgrp1'" threshold= "'sdata(agtgrp1.GA, StatAgentsAvailable) > 10'"/>
      <queue:target name="'agtgrp2'"/>
    </queue:targets>
  </queue:submit>
</onentry>
<transition event="queue.submit.done" target="statex"/>
<transition event="error.queue.submit" target="statey"/>
</state>

As you can see here, if you want to perform statistical routing functionality similar to the statistics function block, you just have to specify the ordertype and orderstat on the action and either specify a single statserver for all targets or a specific one for each to do target selection.

<state id="Statistics">
<datamodel>
  <data id="reqid"/>
</datamodel>
<onentry>
  <queue:submit queue="'VQ1'" requestid="_data.reqid" ordertype="'min'" orderstat="'StatExpectedWaitingTime'" timeout="100">
    <queue:targets type="agentgroup" statserver="'www.genesyslab.stserver1.com'">
      <queue:target name="'agtgrp1'"/>
      <queue:target name="'agtgrp2'"/>
    </queue:targets>
  </queue:submit>
</onentry>
<transition event="queue.submit.done" target="statex"/>
<transition event="error.queue.submit" target="statey"/>
</state>

As you can see here, if you want to perform skills-based routing functionality similar to that which is available on several function blocks, you just have to specify the skillexpr attribute on a target element. This can be mixed with other targets as well.

<state id="Skills-based">
<datamodel>
  <data id="reqid"/>
</datamodel>
<onentry>
  <queue:submit queue="'VQ1'" requestid="_data.reqid" ordertype="'min'" orderstat="'StatExpectedWaitingTime'" timeout="100">
    <queue:targets type="agentgroup" statserver="'www.genesyslab.stserver1.com'">
      <queue:target skillexpr="'service1 > 5 & english > 3'"/>
      <queue:target name="'agtgrp2'"/>
    </queue:targets>
  </queue:submit>
</onentry>
<transition event="queue.submit.done" target="statex"/>
<transition event="error.queue.submit" target="statey"/>
</state>

As you can see here, if you want to perform treatments in conjunction with routing functionality you need to specify the appropriate <runtreatments> element defining which treatments are to run while waiting for a target to be found.

<state id="Skills-based_with_treatments">
<datamodel>
  <data id="reqid"/>
</datamodel>
<onentry>
  <queue:submit queue="'VQ1'" requestid="_data.reqid" ordertype="'min'" orderstat="'StatExpectedWaitingTime'" timeout="100">
    <queue:targets type="agentgroup" statserver="'www.genesyslab.stserver1.com'">
      <queue:target skillexpr="'service1 > 5 & english > 3'"/>
      <queue:target name="'agtgrp2'"/>
    </queue:targets>
    <dialog:runtreatments>
      <dialog:playsound type="'music'" resource="'EMusicDN'" duration="100"/>
      <dialog:play language="'English (US)'" >
        <dialog:prompts type="'tts'">
          <dialog:prompt interrupt="true" text="'The estimated wait time is' + _genesys.statistic.sData('agtgrp2@.GA', 'StatExpectedWaitingTime')"/>
        </dialog:prompts>
      </dialog:play>
    </dialog:runtreatments>
  </queue:submit>
</onentry>
<transition event="queue.submit.done" target="statex"/>
<transition event="error.queue.submit" target="statey"/>
</state>

As you can see here, if you want to perform activity(WFM)-based routing functionality similar to that which is available on several function blocks, you just have to specify the <activity> element in the <targets> element.

<state id="Activity-based">
<datamodel>
  <data id="reqid"/>
</datamodel>
<onentry>
  <queue:submit queue="'VQ1'" requestid="_data.reqid" ordertype="'min'" orderstat="'StatExpectedWaitingTime'" timeout="100">
    <queue:targets statserver="'www.genesyslab.stserver1.com'">
      <queue:activity name="'service1'"/>
    </queue:targets>
  </queue:submit>
</onentry>
<transition event="queue.submit.done" target="statex"/>
<transition event="error.queue.submit" target="statey"/>
</state>

As you can see here, if you want to perform routing rule routing functionality similar to the existing routing function block, you just have to specify the src attribute using the gdata URI scheme.

<state id="RoutingRules_from_Configuration_Server">
<datamodel>
  <data id="reqid"/>
</datamodel>
<onentry>
  <queue:submit src="gdata:routingrule1"/> 
</onentry>
<transition event="queue.submit.done" target="statex"/>
<transition event="error.queue.submit" target="statey"/>
</state>
Children
Events

The following events can be generated as part of this action:

Note: For every <queue.submit> action, one and only one event can be created with the reference id generated with this submit.action. Specifically:

<cancel>

This action removes the requests from the queue and from consideration as targets. This is equivalent to doing another <submit> with the clearqueue attribute set to true or to issuing the IRD function ClearTargets.

Attribute Details

Name

Required

Type

Default Value

Valid Values

Description

requestid

false

location expression

none

Any valid location expression

This is the location of the ID of the outstanding request which is to be canceled. Any data model expression evaluating to a data model location. See SCXML Location Expressions for details.

queue

false

value expression

none

Any value expression which returns a valid string

A value expression which returns the name of the (virtual) queue that this request is for. If there was more than one <submit> request for the same interaction and this queue, then all these requests will be removed from this queue and from consideration as a target. See SCXML Legal Data Values and Value Expressions for details.

interactionid

false

value expression

none

Any value expression which returns a valid string

A value expression which returns the _genesys.ixn.interactions[x].g_uid associated with this request. This is only used in conjunction with the queue attribute. There is a special value that can be returned:

  • ECMAScript Null means the functional module will not use an interaction for the request.

See SCXML Legal Data Values and Value Expressions for details.

The requestid and queue attributes are mutually exclusive. If the requestid is present, then just that request is cleared from the queue and from target selection.

If the queue is present, then all outstanding requests are cleared from the defined queue. As part of this processing, the appropriate queue.cancelled events will be fired for all requests that are cleared.

The interactionid attribute is only used in conjunction with the queue attribute and is only needed when your application is handling multiple interactions.

The following are some examples:

<state id="cancel">
<datamodel>
  <data id="reqid"/>
</datamodel>
<onentry>
  <queue:cancel requestid="_data.reqid"/>
</onentry>
<transition event="queue.cancel.done" target="statex"/>
<transition event="error.queue.cancel" target="statey"/>
</state>

<state id="cancel">
<onentry>
  <queue:cancel queue="'vq1'" />
</onentry>
<transition event="queue.cancel.done" target="statex"/>
<transition event="error.queue.cancel" target="statey"/>
</state>

<state id="cancel">
<datamodel>
  <data id="ixnid"/>
</datamodel>
<onentry>
  <queue:cancel queue="'vq1'" interactionid="_data.ixnid" />
</onentry>
<transition event="queue.cancel.done" target="statex"/>
<transition event="error.queue.cancel" target="statey"/>
</state>
Children

None

Events

The following events can be generated as part of this action:

Note: The queue.cancelled events will be sent before the queue.clear.done.

<update>

This action updates the criteria associated with an outstanding submit request.

Attribute Details

Name

Required

Type

Default Value

Valid Values

Description

requestid

True

location expression

none

Any valid location expression

This is the location of the ID of the outstanding request which is to be updated. Any data model expression evaluating to a data model location. See SCXML Location Expressions for details.

interactionid

False

value expression

none

Any value expression which returns a valid string

A value expression which returns the _genesys.ixn.interactions[x].g_uid associated with this request. If the interactionid attribute value is not associated with an outstanding and corresponding <submit> action, then an error event (error.queue.cancelled) will be generated. There is a special value that can be returned:

  • ECMAScript Null means the functional module will not use an interaction for the request.

See SCXML Legal Data Values and Value Expressions for details.

priority

False

value expression

none

Any value expression that returns a valid integer

A value expression which returns the priority that the interaction will be assigned in the queue.

See SCXML Legal Data Values and Value Expressions for details.

timeout

False

value expression

none

A value expression which returns an integer

A value expression which returns an integer that represents the number of seconds to wait. See SCXML Legal Data Values and Value Expressions for details. The integer returned must be interpreted as a time interval. This interval begins when <update> is executed. A failed and timed-out submit must return the error.queue.update event.

If the original submit request an outbound one, this attribute is only used while waiting for an agent to become available and not for the request in its entirety.

The following are examples:

This example updates the timeout value for this request:

<state id="update">
<datamodel>
  <data id="reqid"/>
  <data id="ixnid"/>
</datamodel>
<onentry>
  <queue:update requestid="_data.reqid" interactionid="_data.ixnid" timeout="300"/>
</onentry>
<transition event="queue.update.done" target="statex"/>
<transition event="error.queue.update" target="statey"/>
</state>

This example updates the priority for this request:

<state id="update">
<datamodel>
  <data id="reqid"/>
</datamodel>
<onentry>
  <queue:update requestid="_data.reqid" priority="6" />
</onentry>
<transition event="queue.update.done" target="statex"/>
<transition event="error.queue.update" target="statey"/>
</state>

This example updates the set of targets to select from for this request:

<state id="update">
<datamodel>
  <data id="reqid"/>
</datamodel>
<onentry>
  <queue:update requestid="_data.reqid"/>
    <queue:targets>
      <queue:target skillexpr="'service1 > 5 & english > 3'"/>
    </queue:targets>
  </queue/update>
</onentry>
<transition event="queue.update.done" target="statex"/>
<transition event="error.queue.update" target="statey"/>
</state>

This example updates the treatments of this request:

<state id="update">
<datamodel>
  <data id="reqid"/>
</datamodel>
<onentry>
  <queue:update requestid="_data.reqid">
    <dialog:runtreatments>
      <dialog:playsound type="'music'" resource="'EMusicDN'" duration="'100'"/>
    </dialog:runtreatments>
  </queue:update>
</onentry>
<transition event="queue.update.done" target="statex"/>
<transition event="error.queue.update" target="statey"/>
</state>
Children
Events

The following events can be generated as part of this action:

<query>

This action queries the status of the request.  It returns the following information in the queue.query.done event for a specific interaction:

This action can be used in two cases:

Attribute Details

Name

Required

Type

Default Value

Valid Values

Description

requestid

true

location expression

none

Any valid location expression

This is the location of the ID of the outstanding request which is to be queried. Any data model expression evaluating to a data model location. See SCXML Location Expressions for details.

interactionid

false

value expression

none

Any value expression which returns a valid string

A value expression which returns the _genesys.ixn.interactions[x].g_uid associated with this request. If the interactionid attribute value is not associated with the outstanding corresponding <submit> action, then an error event (error.queue.query) will be generated. There is a special value that can be returned:

    • ECMAScript Null means the functional module will not use an interaction for the request.

See SCXML Legal Data Values and Value Expressions for details.

The interactionid attribute is only used when your application is handling multiple interactions.

The following is an example:

<state id="Query">
<onentry>
  <queue:query requestid="_data.reqid">
</onentry>
<transition event="queue.query.done" target="statex">
  <if cond="_event.data.positioninqueue > 200">
    <queue:update requestid="_data.reqid" priority="_event.data.priority + 5"/>
  </if>
</transition>
<transition event="error.queue.query" target="statey"/>
</state>
Children

None

Events

The following events can be generated as part of this action:

<default>

This action will redirect the interaction to its associated default destination or may optionally returns the configured default target address with out redirecting the interaciton. This may be used when the orchestration logic cannot find a suitable destination to redirect the interaciton to.

Attribute Details

Name

Required

Type

Default Value

Valid Values

Description

requestid

false

location expression

none

Any valid location expression

This is the location for the request ID that is returned as part of this request. Any data model expression evaluating to a data model location. See SCXML Location Expressions for details. The location's value will be set to an internally generated unique string identifier to be associated with the action being sent. This value will only be valid when the queue.default.requestid event is received. If this attribute is not specified, the event identifier is dropped. This identifier can be tested by the completion event handler to distinguish among several outstanding requests. If this attribute is not specified, the identifier can be acquired from the completion event. Every request must receive a unique identifier.

interactionid

false

value expression

none

A valid value expression

A value expression which returns the _genesys.ixn.interactions[x].g_uid associated with this request. There is a special value that can be returned:

    • ECMAScript Null means the functional module will not use an interaction for the request.

See SCXML Legal Data Values and Value Expressions for details.

route

false

boolean expression

true

Any expression that returns a boolean (true, false)

A boolean expression which returns true or false. The meaning of which implies the following:

  • "false" means the functional module will not attempt to route the associated interaction and only the default destination associated will be returned in the queue.default.done event.
  • "true" means the functional module will use the associated interaction to route the interaction. Note: a value of "true" is only supported for voice-related interactions.

See SCXML Conditional Expressions for details.

The following is an example:

<state id="Default">
  <onentry>
    <queue:default/>
  </onentry>
  <transition event="queue.default.done" target="statex"/>
  <transition event="error.queue.default" target="statey"/>
</state>
Children

None

Events

The following events can be generated as part of this action:

Events

The following are the Queue action result events:

Event

Attributes

Description

queue.submit.done

 

This event indicates the success of the request and that a target has been selected.

requestid

This is the ID associated with the request.

targetselected

This is the DN and the switch name of the target to which the interaction was routed or should be routed to definitively; the target format is (Name@SwitchName.Type).

vqselected

This is the virtual queue that was selected.

targetcomponentselected

This is the agent-level target to which the interaction was routed or should be routed to definitively.

If the target specified in <submit> and selected for routing is of type Agent, Place, Queue, or Routing Point, this contains the target itself. If the desired target type is Agent Group, Place Group, or Queue Group, the function returns the agent, place, or queue from the corresponding group the interaction was sent to. The target format is (Name@StatServerName.Type).

targetobjectselected

This is the high-level target (one that you specify in a <submit>) to which the interaction was routed or should be routed to definitively. If a skill expression is used, the function returns: ?:SkillExpression@statserver.GA or even ?GroupName:SkillExpression@statserver.GA

The target format is (Name@StatServerName.Type).

resource

This is an ECMAScript resource object which represents the target selected and can be used on any interaction-related action. See the Resource object for details.

access

This attribute is optional and provided only if <submit>  parameter route set to false and siwtch access code is defined between source and destination swithces for target type that match type of selected target. When present  it is an ECMAScript object which represents switch access code and has following sert of properties: prefix, rtype, destination, location and dnis.  Their values match to following switch access code fileds: Code, Route Type, Destination Source, Location Source and DNIS Source.

queue.submit.requestid

 

This event provides the application with request ID for the given request that was invoked.

requestid

This is the ID associated with the request from the orchestration application or the resource.

error.queue.submit

 

This indicates that an abnormal condition occurred while trying to perform the request. This event will be sent as a result of a timeout of the request, as well as problems with the request or interaction itself.

requestid

This is the ID associated with the request.

error

This is the type of error that occurred. The following are the possible values:

  • -001 Timeout
  • 0001 Unknown error
  • 0008 Routing done
  • 0013 Remote error
  • 0018 Unknown object
  • 0019 Translation failed

description

if error parameter has value '0013 Remote error' then this field might contain additional error information as provided by call/interaction controller (for example by TServer). Format of this string field is 'ErrorNumber ErrorMessage'

queue.cancel.done

 

This event indicates the success of the clear request and that the request has been removed from the queue.

requestid

This is the ID of the <cancel> request.

error.queue.cancel

 

This indicates that an error occurred while trying to perform the <cancel> request.

requestid

This is the ID associated with the request.

error

This is the type of error that occurred.

description

This is a more detailed description of the error.

queue.update.done

 

This event indicates that the request has been updated successfully.

requestid

This is the ID of the <update> request.

error.queue.update

 

This indicates that an error occurred while trying to perform the <update> request.

requestid

This is the ID associated with the request.

error

This is the type of error that occurred. The following are the possible values:

  • Invalidrequestid

description

This is a more detailed description of the error.

The following are the possible values:

  • Invalidrequestid — The request id xxxx does not match any outstanding <submit> requests. xxxx is the value of the requestid attribute.

queue.query.done

 

This event indicates the success of the query request.

requestid

This is the ID of the <query> request.

priority

This is the current priority of the request.

positioninqueue

This is the current position of the request in the queue.

invqwaittime

This is the expected wait for the queue in relationship to the request.

error.queue.query

 

This indicates that an error occurred while trying to perform the <query> request.

requestid

This is the ID associated with the request.

error

This is the type of error that occurred.

description

This is a more detailed description of the error

queue.default.done

 

This event indicates the success of the request and that a default target has been selected.

requestid

This is the ID associated with the request.

defaultselected

This is the default configured target address.

queue.default.requestid

 

This event provides the application with request ID for the given request that was invoked.

requestid

This is the ID associated with the request from the orchestration application or the resource.

error.queue.default

 

This indicates that an error occurred while trying to perform the <default> request.

requestid

This is the ID associated with the request.

error

This is the type of error that occurred:

  • timeout
  • invalidattribute
  • abandoned
  • unknown
  • invalidstate.state (null, ringing, hold, transferring, treating, routed)
  • badtranslation
  • remote

description

This is a more detailed description of the error.

The following are the possible values:

  • timeout — the interaction was not redirected to the default target in a timely manner.
  • invalidattribute — The attribute yyy:xxx has an invalid value (zzz) or is not allowed under the conditions of the request. yyy is the name of the element associated with the attribute. xxx is the name of the attribute. zzz is the value of the attribute.
  • abandoned — The customer has abandoned the interaction.
  • unknown — The cause of the failure is unknown.
  • invalidstate.state — The interaction is in an invalid state and cannot be redirected to the default target.
  • badtranslation — The destination address xxx could not be translated. xxx is the address of the default target.
  • remote — There was an error in the media server while trying to redirect the interaction to the default target.

The following are the queue asynchronous events:

Event

Attributes

Description

queue.cancelled


This event indicates that a target has been selected from another <submit> action request and that this <submit> action request has been cancelled.

requestid

This is the submit request ID associated with the interaction.

Notes

Prior to version 8.1.200.27, the Interaction's age was ignored for Multimedia Interactions.

Personal tools
Namespaces
Variants
Actions
Navigation
Genesys
Create a PDF
Social Side Bar
Share
Toolbox