|
Genesys 8.1 SCXML Technical Reference |
||
< Parameter Elements Events > |
This action queues the request for a target based on the criteria specified in the request.
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 fetch completion event. Every request must receive a unique identifier, even if the request is for the same URL. |
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. A value of "none" means any target and order. See SCXML Legal Data Values and Value Expressions for details. |
interactionid |
false |
value expression |
0 |
Any value expression which returns a valid string |
A value expression which returns the _genesys.FMname.interactions[x].g_uid associated with this request. There are two special values that can be returned:
Note: if the 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:
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 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 If the |
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:
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:
|
This allows a developer to supply a URI which identifies the location of a
This attribute is also mutually exclusive with the children of this element. This source definition will replace the entire See SCXML Legal Data Values and Value Expressions for details. |
Other Considerations
<submit>
action does not work for targets such as multimedia queues. The <redirect>
action is a way to place interactions into those queues.<redirect>
action. The error.queue.submit will be generated if this attribute is implicitly or explicitly set to true for all other interaction media types. <scxml>
document has _type=routingstrategy and there are no interactions associated with the session (for example, a session is started through web interfaces), the special value null can be used. This will result in the Queue functional module using a platform-specific interactionid for communication purposes.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" statorder="'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("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>
<targets>
— Occurs 1 time. This instance defines a named set of targets.<runtreatments>
— Occurs 0 or 1 times. This instance defines a set of treatments to apply while this request is queued. The treatment-related events will not be generated as part of this request. The treatment can have an additional parameter, duration (if it doesn't have it yet). When the treatment expires, the next treatment in the definition will be applied. If treatments that collect digits are used, the application will only get the digits collected by the last treatment that collected the digits when this action has ended (successfully or unsuccessfully). These digits will be available to the application via the _genesys.FMname.interactions[x].voice.ced property. The following events can be generated as part of this action:
<submit>
action, in which case it indicates that this <submit>
action request was cancelled, or when a <submit>
action request has been cancelled using the <cancel>
action.<submit>
request.Note: For every <queue.submit>
action, one and only one event can be created with the reference id generated with this submit.action. Specifically:
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.
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 |
interactionid |
false |
value expression |
0 |
Any value expression which returns a valid string |
A value expression which returns the _genesys.FMname.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:
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>
None
The following events can be generated as part of this action:
Note: The queue.cancelled events will be sent before the queue.clear.done.
This action updates the criteria associated with an outstanding submit request.
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 |
0 |
Any value expression which returns a valid string |
A value expression which returns the _genesys.FMname.interactions[x].g_uid associated with this request. If the interactionid attribute value is not associated with an outstanding and corresponding
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 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 ordering of targets to be selected from, as well as the timeout value for this request:
<state id="update"> <datamodel> <data id="reqid"/> </datamodel> <onentry> <queue:update requestid="_data.reqid" order="'any'" timeout="'300'"/> </onentry> <transition event="queue.update.done" target="statex"/> <transition event="error.queue.update" target="statey"/> </state>
This example updates the statistic used for ordering the targets for this request:
<state id="update"> <datamodel> <data id="reqid"/> </datamodel> <onentry> <queue:update requestid="_data.reqid" orderstat="'StatAgentsAvailable'"/> </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 priority of this request:
<state id="update"> <datamodel> <data id="reqid"/> </datamodel> <onentry> <queue:update requestid="_data.reqid" priority="'30'"/> </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>
The following events can be generated as part of this action:
This action queries the status of the request. TIt returns the following information in the queue.query.done event for a specific interaction:
This action can be used in two cases:
<submit>
requests are outstanding, to determine what to do next. For example, while the application waits for a target, if the customer presses the "I cannot wait anymore" number, this event is processed by the application (<transition>
). The application queries the status of the request to determine what type of treatment to present to the customer. If the customer has been waiting 10 minutes and the queue depth has not changed then the application may offer the customer the option of having a callback set up for him or her (using a dialog or treatment).<submit>
request has timed out, if the interaction was not cleared from target selection. The application may need to collect information on where this interaction stands with respect to it still being in the queue. This information would then be used to determine what to do next (for example, provide the customer with other options, do another <submit>
but with different target selection criteria (other targets, a new queue, and so on).
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 |
0 |
Any value expression which returns a valid string |
A value expression which returns the _genesys.FMname.interactions[x].g_uid associated with this request. If the interactionid attribute value is not associated with the outstanding corresponding
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"> <datamodel> <data id="reqid"/> </datamodel> <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> re>
None
The following events can be generated as part of this action:
This action returns the configured default target address. This is used when the orchestration logic cannot find the destination. It also has the option of allowing this action to redirect the interaction to this destination, as well.
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, even if the request is for the same URL. |
interactionid |
false |
value expression |
0 |
A valid value expression |
A value expression which returns the _genesys.FMname.interactions[x].g_uid associated with this request. There is a special value that can be returned:
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 the _genesys.FMname.interactions[x].g_uid associated with this request. Two values can be returned:
See SCXML Conditional Expressions for details. |
The following is an example:
<state id="query"> <datamodel> <data id="reqid"/> </datamodel> <onentry> <queue:default> </onentry> <transition event="queue.default.done" target="statex"/> <transition event="error.queue.default" target="statex"/> </state>
None
The following events can be generated as part of this action:
|
Genesys 8.1 SCXML Technical Reference |
||
< Parameter Elements Events > |