Section II – Functional Modules > Interaction Interface > Action Elements Bottom of Page
| Genesys 8.0 SCXML Technical Reference
< Parameter Elements Events >

## Action Elements

The following are the common actions across interactions:

#### <terminate>

This is the action to terminate the interaction. It is equivalent to the TClearCall request in T-Server. For non-voice interactions, this action can only be done when the interaction is "presented" with RequestStopProcessing.

##### 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. 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.
interactionid | true | value expression |  | Any value expression that returns a valid string | A value expression which returns the _genesys.FMname.interactions[x].g_uid associated with this request. See SCXML Legal Data Values and Value Expressions for details.
reason | false | value expression | none | Any value expression that returns a valid string | A value expression which returns a character string which identifies the reason why the interaction is being terminated. See SCXML Legal Data Values and Value Expressions for details.
hints | false | value expression | none | Any valid ECMAScript object | A value expression which returns the ECMAScript object containing information which may be used by the implementing functional module when terminating this interaction. This information may consist of protocol-specific parameters, protocol selection guidelines, and so on. Note: The meaning of these hints is specific to the implementing functional module. See SCXML Legal Data Values and Value Expressions for details.

hints Considerations

The following are the interaction-specific properties that may be supplied in the hints property:

- ucs — This property identifies that UCS should notified of the termination of the interaction. (Values — true and false)
- delete — This property indicates that the interaction record should be deleted. (Values — true and false)
- tpserver — This property indicates the 3rd party that should be notified. It should have the following format: `<applname>\\<type>\\<service>\\<stopprocessing>`. Notes: If only 3 values are specified (that is, `<appl-somename>\<service>\<stopprocessing>`), then the `<appl-somename>` value is compared against the expected application types: "ChatServer", "ClassificationServer", "ContactServer", "EmailServer", "GenericClient", "GenericServer", "ThirdPartyApp", "ThirdPartyServer". If a match is found, then `<appl-somename>` is treated as an application type, otherwise it is treated as an application name. In addition, if the server is a generic one, then the `<applname>` value must be specified.

The following is an example:

    <state id="do_terminate">
    <datamodel>
    	<data id="reqid"/>
    </datamodel>
    <onentry>
    	<ixn:terminate requestid="_data.reqid" reason="'finished service X'"/>
    </onentry>
    <transition event="interaction.terminate.done" target="statex"/>
    <transition event="error.interaction.terminate" target="statey"/>
    </state>

##### Children

None

##### Events

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

- interaction.terminate.done — This event is sent when the request has been accepted by the system and the interaction has started the termination process.
- error.interaction.terminate — This event is sent when the request itself has failed for some reason.
- interaction.deleted — This event is sent when the interaction is actually terminated.

#### <clear>

This is the action to clear a given party from the interaction. Note that in cases of conference interactions, the interaction will remain alive until there is no more than one party in the interaction. This is equivalent to the TReleaseCall request in T-Server. Note: This action is only for voice interactions at this time, but will apply to other media in the future.

##### 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. 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.
interactionid | true | value expression | none | Any value expression that returns a valid string | A value expression which returns the _genesys.FMname.interactions[x].g_uid associated with this request. See SCXML Legal Data Values and Value Expressions for details.
resource | true | value expression | none | Any valid string or resource object | A value expression which returns the resource address currently involved in the interaction for which the connection will be cleared. See SCXML Legal Data Values and Value Expressions for details.
reason | false | value expression | none | Any value expression that returns a valid string | A value expression which returns a character string which identifies the reason why the resource connection with the interaction is being cleared. See SCXML Legal Data Values and Value Expressions for details.
hints | false | value expression | none | Any valid ECMAScript object | A value expression which returns the ECMAScript object containing information which may be used by the implementing functional module when terminating this interaction. This information may consist of protocol-specific parameters, protocol selection guidelines, and so on. Note: The meaning of these hints is specific to the implementing functional module. See SCXML Legal Data Values and Value Expressions for details.

The following is an example:

    <state id="do_clear">
    <datamodel>
    	<data id="reqid"/>
    	<data id="ixnid"/>
    	<data id="rscid"/>
    </datamodel>
    <onentry>
    	<ixn:terminate requestid="_data.reqid" interactionid="_data.ixnid" resource="_data.rscid" reason="'finished service X'"/>
    </onentry>
    <transition event="interaction.clear.done" target="statex"/>
    <transition event="error.interaction.clear" target="statey"/>
    </state>

##### Children

None

##### Events

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

- interaction.clear.done — This event is sent when the request has been accepted by the system and the resource's connection to the interaction has started the clearing process.
- error.interaction.clear — This event is sent when the request itself has failed for some reason.
- interaction.partydeleted — This event is sent when the resources's connection to the interaction is actually cleared.

#### <redirect>

This is the action to redirect the interaction to another resource. This action is used for the following media server actions:

- T-Server — TRedirectCall, TRouteCall, (IRD Functions — DeliverCall, DeliverToIVR, RouteCall, TRoute)
- Interaction Server — RequestPlaceInQueue, RequestPlaceInWorkbin, RequestDeliver (IRD Function Blocks — Queue Interaction, IRD Functions — RouteCall, TRoute)

##### 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. 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.
interactionid | true | value expression | none | Any value expression that returns a valid string | A value expression which returns the _genesys.FMname.interactions[x].g_uid associated with this request. See SCXML Legal Data Values and Value Expressions for details.
from | true | value expression | none | Any valid string or resource object | A value expression which returns the address that this interaction is to be redirected from. For details, on the format, see Addressing Resources section. See SCXML Legal Data Values and Value Expressions
to | true | value expression | none | Any valid string or resource object | A value expression which returns the destination address for this interaction. For details, on the format, see Addressing Resources section. See SCXML Legal Data Values and Value Expressions
type | false | NMTOKEN | RouteTypeDefault | Values from the _genesys.FMname.rType enumeration | This defines the type of redirection processing that is to be done.
hints | false | value expression | none | Any valid ECMAScript object | A value expression which returns the ECMAScript object containing information which may be used by the implementing functional module when redirecting this interaction. This information may consist of protocol-specific parameters, protocol selection guidelines, and so on. Note: The meaning of these hints is specific to the implementing functional module. See SCXML Legal Data Values and Value Expressions for details.

hints Attribute Considerations

Note: you can use a special interaction queue name (`__STOP__`) which will do the processing required to stop the interaction.

- When the interaction is non-voice, inPersistentQueues and OutPersistentQueues properties of the Interaction Server interaction will be set automatically to the appropriate queues defined for the session (this information comes from the trigger information). So these properties do not need to be exposed. BUT if the developer wants to explicitly specify these properties, they can supply them through the hints attribute object. The object should have the following properties

- "inqueues" — This is an ECMAScript object with a collection of string properties. The name of the property is an interaction queue name and the value is a description of that queue.
- "outqueues" — This is an ECMAScript object with a collection of string properties. The name of the property is an interaction queue name and the value is a description of that queue.

The following are some examples:

    <state id="do_redirect_voice_interaction_to_an_agent_dn">
    <datamodel>
    	<data id="reqid"/>
    </datamodel>
    <onentry>
    	<ixn:redirect interactionid="_genesys.ixn.firstixnid" from="'1010'" to="'1111'"/>
    </onentry>
    <transition event="interaction.redirect.done" target="statex"/>
    <transition event="error.interaction.redirect" target="statey"/>
    </state>

    <state id="do_redirect_mm_interaction_to_an_agent">
    <datamodel>
    	<data id="reqid"/>
    </datamodel>
    <onentry>
    	<ixn:redirect interactionid="_genesys.ixn.firstixnid" from="'1010'" to="'1111'"/>
    </onentry>
    <transition event="interaction.redirect.done" target="statex"/>
    <transition event="error.interaction.redirect" target="statey"/>
    </state>

    <state id="do_redirect_mm_interaction_to_an_interaction_queue">
    <datamodel>
    	<data id="reqid"/>
    </datamodel>
    <onentry>
    	<ixn:redirect requestid="_data.reqid" to="'queueF'"/>
    </onentry>
    <transition event="interaction.redirect.done" target="statex"/>
    <transition event="error.interaction.redirect" target="statey"/>
    </state>

    <state id="do_redirect_multi-resource_interaction_to_another_agent">
    <datamodel>
    	<data id="reqid"/>
    </datamodel>
    <onentry>
    	<ixn:redirect requestid="_data.reqid" from="'3444'" to="'6555'"/>
    </onentry>
    <transition event="interaction.redirect.done" target="statex"/>
    <transition event="error.interaction.redirect" target="statey"/>
    </state>

    <state id="do_redirect_voice_interaction_to_another_queue-route_point">
    <datamodel>
    	<data id="reqid"/>
    </datamodel>
    <onentry>
    	<ixn:redirect requestid="_data.reqid" to="'6666'"/>
    </onentry>
    <transition event="interaction.redirect.done" target="statex"/>
    <transition event="error.interaction.redirect" target="statey"/>
    </state>

##### Children

None

##### Events

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

- interaction.redirect.done — This event is sent when the request has been accepted by the system and the interaction has started the redirection process.
- error.interaction.redirect — This event is sent when the request itself has failed for some reason.
- interaction.ondivert — This event is sent when the interaction has been moved to the defined destination.

#### <singlesteptransfer>

This is the action to transfer the interaction to another resource in a single step. This is equivalent to the TSingleStepTransfer request in T-Server. Note: This action is only for voice interactions at this time, but will apply to other media in the future.

##### 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. 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.
interactionid | true | value expression | none | Any value expression that returns a valid string | A value expression which returns the _genesys.FMname.interactions[x].g_uid associated with this request. See SCXML Legal Data Values and Value Expressions for details.
from | true | value expression | none | Any valid string or resource object . | A value expression which returns the address that this interaction is to be transferred from. For details, on the format, see Addressing Resources section. See SCXML Legal Data Values and Value Expressions
to | true | value expression | none | Any valid string or resource object . | A value expression which returns the destination address for this interaction. For details, on the format, see Addressing Resources section. See SCXML Legal Data Values and Value Expressions
hints | false | value expression | none | Any valid ECMAScript object | A value expression which returns the ECMAScript object containing information that may be used by the implementing functional module when redirecting this interaction. This information may consist of protocol-specific parameters, protocol selection guidelines, and so on. Note: The meaning of these hints is specific to the implementing functional module. See SCXML Legal Data Values and Value Expressions for details.

The following are some examples:

    <state id="dosingle_step_transfer_voice_interaction_to_an_agent_dn">
    <datamodel>
    	<data id="reqid"/>
    	<data id="ixnid"/>
    	<data id="rscid"/>

    </datamodel>
    <onentry>
    	<ixn:singlesteptransfer requestid="_data.reqid" interactionid="_data.ixnid" from="_data.rscid" to="'1111'"/>
    </onentry>
    <transition event="interaction.singlesteptransfer.done" target="statex"/>
    <transition event="error.interaction.singlesteptransfer" target="statey"/>
    </state>

##### Children

None

##### Events

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

- interaction.singlesteptransfer.done — This event is sent when the request has been accepted by the system and the interaction has started the single step transfer process.
- error.interaction.singlesteptransfer — This event is sent when the request itself has failed for some reason.
- interaction.onsinglesteptransfer — This event is sent when the interaction has been transferred to the defined destination.

#### <singlestepconference>

This is the action to conference another resource into the interaction in a single step. It is equivalent to the TSingleStepConference request in T-Server. Note: This action is only for voice interactions at this time, but will apply to other media in the future.

##### 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. 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.
interactionid | true | value expression | none | Any value expression that returns a valid string | A value expression which returns the _genesys.FMname.interactions[x].g_uid associated with this request. See SCXML Legal Data Values and Value Expressions for details.
from | true | value expression | none | Any valid string or resource object . | A value expression which returns the address that this interaction is to be conferenced from. For details, on the format, see Addressing Resources section. See SCXML Legal Data Values and Value Expressions
to | true | value expression | none | Any valid string or resource object . | A value expression which returns the destination address for the resource that is to be conferenced into the interaction. For details, on the format, see Addressing Resources section. See SCXML Legal Data Values and Value Expressions
hints | false | value expression | none | Any valid ECMAScript object | A value expression which returns the ECMAScript object containing information which may be used by the implementing functional module when redirecting this interaction. This information may consist of protocol-specific parameters, protocol selection guidelines, and so on. Note: The meaning of these hints is specific to the implementing functional module. See SCXML Legal Data Values and Value Expressions for details.

The following is an example:

    <state id="dosingle_step_conference_voice_interaction_to_an_agent_dn">
    <datamodel>
    	<data id="reqid"/>
    	<data id="ixnid"/>
    	<data id="rscid"/>

    </datamodel>
    <onentry>
    	<ixn:singlestepconference requestid="_data.reqid" interactionid="_data.ixnid" from="_data.rscid" to="'1111'"/>
    </onentry>
    <transition event="interaction.singlestepconference.done" target="statex"/>
    <transition event="error.interaction.singlestepconference" target="statey"/>
    </state>

##### Children

None

##### Events

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

- interaction.singlestepconference.done — This event is sent when the request has been accepted by the system and the interaction has started the single step conference process.
- error.interaction.singlestepconference — This event is sent when the request itself has failed for some reason.
- interaction.onsinglestepconference — This event is sent when the specified resource has been conferenced into the interaction.

#### <associate>

This is the action to associate an interaction with the target SCXML session and un-associate it with the current session. This is implicitly done when a session is triggered by an interaction event, but there are cases where an interaction that is currently not associated with another SCXML session needs to be associated with it by the session that currently owns the interaction. The association process will add the interaction to the target session's _genesys.ixn.interactions[] array. In addition, the functional module will do the necessary media-specific processing to ensure that this session will be able to receive events associated with this interaction as well as be able to take action against it. This may also include the taking of ownership of this interaction from another SCXML session or 3rd party application. This level of processing will depend on the capabilities of the underlying functional module and its associated system.

##### 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. 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.
category | true | value expression | none | Any value expression that returns one of the following values: voice, msgbased, chat, web | A value expression which returns the category for this interaction. See SCXML Legal Data Values and Value Expressions for details.
Interactionid | true | value expression | none | Any value expression that returns a valid string | A value expression which returns the interaction id that is to be associated with this session. See SCXML Legal Data Values and Value Expressions for details.
sessionid | true | value expression | none | Any value expression that returns a valid string | A value expression which returns the session id to associate interaction with. See SCXML Legal Data Values and Value Expressions for details.

The following is an example:

    <state id="do_associate">
    <datamodel>
    	<data id="reqid"/>
    </datamodel>

    <onentry>
    	<ixn:associate requestid="_data.reqid" category="'voice'" interactionid="_event.data.id" sessionid="'12345678'"/>
    </onentry>
    <transition event="interaction.associate.done" target="statex"/>
    <transition event="error.interaction.associate" target="statey"/>
    </state>

##### Children

None

##### Events

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

- interaction.associate.done — This event is sent when the request has been initiated to associate the interaction with the SCXML session.
- error.interaction.associate — This event is sent when the request itself has failed for some reason.
- interaction.deleted and interaction.notcontrolled — These events indicate that the interaction has been associated with the originating session.
- interaction.added and interaction.present — These events indicate that the interaction is now associated with the new session.

#### <accept>

This is the action that accepts and answers an interaction at a specific resource [?]. This is used to answer a voice interaction or accept a multi-media–based interaction. It is equivalent to the TAnswerCall request in T-Server. Note: This action is only for voice interactions at this time, but will apply to other media in the future.

##### 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. 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.
interactionid | true | value expression |  | Any value expression that returns a valid string | A value expression which returns the _genesys.FMname.interactions[x].g_uid associated with this request. See SCXML Legal Data Values and Value Expressions for details.
resource | true | value expression | none | Any valid string or resource object . | A value expression which returns the address that this interaction is to be accepted for. For details, on the format, see Addressing Resources section. See SCXML Legal Data Values and Value Expressions
hints | false | value expression | none | Any valid ECMAScript object | A value expression which returns the ECMAScript object containing information which may be used by the implementing functional module when picking this interaction. This information may consist of protocol-specific parameters, protocol selection guidelines, and so on. Note: The meaning of these hints is specific to the implementing functional module. See SCXML Legal Data Values and Value Expressions for details.

The following is an example:

    <state id="do_accept">
    <datamodel>
    	<data id="reqid"/>
    </datamodel>
    <onentry>
    	<ixn:accept requestid="_data.reqid"/>
    </onentry>
    <transition event="interaction.accept.done" target="statex"/>
    <transition event="error.interaction.accept" target="statey"/>
    </state>

##### Children

None

##### Events

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

- interaction.accept.done — This event is sent when the request has been initiated to accept theinteraction by the resource.
- error.interaction.accept — This event is sent when the request itself has failed for some reason.
- Interaction.partystatechanged — This event is sent when the resource accepts or answers the interaction for processing.

Section II – Functional Modules > Interaction Interface > Action Elements Top of Page
| Genesys 8.0 SCXML Technical Reference
< Parameter Elements Events >