Section II – Functional Modules > Queue Interface > Action Elements         Bottom of Page
Genesys 8.1
SCXML Technical Reference
< Parameter Elements            Events >

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 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:

  • "0" means the functional module will use the _genesys.FMname.interactions[0].g_uid for the request.
  • 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:

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

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:

  • "0" means the functional module will use the _genesys.FMname.interactions[0].g_uid 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

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 <submit> action, then an error event (error.queue.cancelled) will be generated. There is a special value that can be returned:

  • "0" means the functional module will use the _genesys.FMname.interactions[0].g_uid 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 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 &gt; 5 &amp; english &gt; 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>
Children
Events

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

<query>

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:

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

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 <submit> action, then an error event (error.queue.query) will be generated. There is a special value that can be returned:

  • "0" means the functional module will use the _genesys.FMname.interactions[0].g_uid 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">
<datamodel>
	<data id="reqid"/>
</datamodel>
<onentry>
	<queue:query requestid="_data.reqid">
</onentry>
<transition event="queue.query.done" target="statex">
	<if cond="_event.data.positioninqueue &gt; 200">
		<queue:update requestid="_data.reqid" priority="_event.data.priority + 5"/>
	</if>
</transition>
<transition event="error.queue.query" target="statey"/>
</state>
re>
Children

None

Events

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

<default>

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.

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, 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:

  • "0" means the functional module will use the _genesys.FMname.interactions[0].g_uid to route the interaction.

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:

  • "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.

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>
Children

None

Events

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




Section II – Functional Modules > Queue Interface > Action Elements         Top of Page
Genesys 8.1
SCXML Technical Reference
< Parameter Elements            Events >