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

## Action Elements

The following are the classification-specific actions.

#### <classify>

This action takes the content of an interaction and classifies it into categories. This action is equivalent to the IRD function block "Classify".

##### 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.
server | false | value expression | none | Any value expression that returns a valid string | A value expression which returns the name of the classification server to be used for classifying the content of this interaction. If not supplied, the functional module will use the first available server. See SCXML Legal Data Values and Value Expressions for details.
interactionid | false | value expression | "0" | Any value expression that returns a valid string | A value expression which returns the _genesys.FMname.interactions[x].g_uid of the interaction that is to be classified. There is a special value that can be returned: "0" means the functional module will use _genesys.FMname.interactions[0].g_uid as the related interaction. SCXML Legal Data Values and Value Expressions for details.
root | true | value expression | none | Any value expression that returns a valid string | A value expression which returns the overall classification category that should be used for this action. SCXML Legal Data Values and Value Expressions for details.
confidence | false | value expression | 75 | Any value expression that returns a valid integer between 1 and 100 | A value expression which returns the minimum relevancy each classification category must have in order for Classification Server to consider an interaction as belonging to that category. See SCXML Legal Data Values and Value Expressions for details.
fromudata | false | value expression | none | Any value expression that returns a valid string | A value expression which returns the udata key name to use as the classified data source. If this attribute and the fromvar attribute are not supplied, then the data source will be Universal Contact Server's database. See SCXML Legal Data Values and Value Expressions
fromvar | false | value expression | none | Any value expression that returns a valid string | A value expression which returns the ECMAScript variable name to be used as the classified data source. If this attribute and the fromudata attribute are not supplied then the data source will be Universal Contact Server's database. See SCXML Legal Data Values and Value Expressions for details.
allcategories | false | boolean expression | true | Any expression which returns a boolean (true, false) | A boolean expression which indicates whether or not all categories are to be used for this action. This attribute is mutually exclusive with the categories and subcategories attributes. See SCXML Conditional Expressions for details.
categories | false | value expression | none | Any expression that results in a valid string | A value expression which returns a set of comma-separated category names (ids) that is to be used to classify this interaction. For example, categories="'productx, update'" This attribute is mutually exclusive with the `allcategories` attribute. See SCXML Legal Data Values and Value Expressions for details.
subcategories | false | NMTOKEN | no | no, direct, all | This identifies how the Classification Server should handle parent and child categories when classifying the interaction: no — The Classification Server considers only the categories you selected in the tree and does not include any child categories. direct — The Classification Server considers only the direct children of the selected (parent) categories. all — The Classification Server considers all children of the selected (parent) categories. This attribute is mutually exclusive with the allcategories attribute.
attach | false | boolean | true | true and false | This indicates whether the classification results should be attached to the interaction as udata properties.

The following is an example:

    <state id="do_classification">
    <datamodel>
    	<data id="reqid"/>
    </datamodel>
    <onentry>
    	<classification:classify requestid="_data.reqid" root="businessxcats"/>
    </onentry>
    <transition event="classification.classify.done" target="statex"/>
    <transition event="error.classification.classify" target="statey"/>
    </state>

##### Children

None

##### Events

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

- classification.classify.done — This event is sent when the request has been accepted by the system and the interaction has been classified.
- error.classification.classify — This event is sent when the request has failed for some reason.

#### <screen>

This action takes the content of an interaction and screens it using a set of rules. This action is equivalent to the IRD function blocks "Screen" and "Multiscreen".

##### 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.
server | false | value expression | none | Any value expression that returns a valid string | A value expression which returns the name of the classification server to be used for screening this interaction. If not supplied, the functional module will use the first available server. See SCXML Legal Data Values and Value Expressions for details.
interactionid | false | value expression | "0" | Any value expression that returns a valid string | A value expression which returns the _genesys.FMname.interactions[x].g_uid of the interaction that is to be screened. There is a special value that can be returned: "0" means the functional module will use _genesys.FMname.interactions[0].g_uid as the related interaction. SCXML Legal Data Values and Value Expressions for details.
language | false | value expression | English (US) | Any expression that returns a string with one of the following values: English (US), Spanish, Mandarin, Cantonese, Vietnamese, French, French (Canada), German, Italian, Japanese, Korean, Russian | A value expression which returns a string specifying a language in which screening should be done. See SCXML Legal Data Values and Value Expressions for details.
fromudata | false | value expression | none | Any value expression that returns a valid string | A value expression which returns the udata key name to use as the screened data source. If this attribute and the fromvar attribute are not supplied, then the data source will be Universal Contact Server's database. See SCXML Legal Data Values and Value Expressions
fromvar | false | value expression | none | Any value expression that returns a valid string | A value expression which returns the ECMAScript variable name to be used as the screened data source. If this attribute and the fromudata attribute are not supplied, then the data source will be Universal Contact Server's database. See SCXML Legal Data Values and Value Expressions for details.
allrules | false | boolean expression | true | Any expression which returns a boolean (true, false) | A boolean expression which returns whether or not all rules are to be used for this action. This attribute is mutually exclusive with the rules attribute. See SCXML Conditional Expressions for details.
rules | false | value expression | none | Any expression that results in a valid string | A value expression which returns a set of comma-separated rule names (ids) that is to be used to screen this interaction. For example, categories="'rule1, rulen'" This attribute is mutually exclusive with the allrules attributes. See SCXML Legal Data Values and Value Expressions for details.
results | false | NMTOKEN | rules | rules, matchpairs, categories, all | This identifies what results the Classification Server should return after the interaction has been screened: rules — Returns screening rule IDs when a match is found. matchpairs — Returns the matched pairs of screening rule IDs and specific strings of words in the interaction content that matched the screening rules. categoriesonly — Returns the classification categories associated with the screening rules. all — Returns screening rule IDs, key-value pairs, and categories
root | false | value expression | none | Any value expression that returns a valid string | A value expression which returns the overall screening category which should be used for this action. This is attribute is mandatory when the results attribute is either "categories" or "all". SCXML Legal Data Values and Value Expressions for details.

The following is an example:

    <state id="do_screening">
    <datamodel>
    	<data id="reqid"/>
    	<data id="rulesetA" expr="Rule1, Rule2, Rule3"/>
    </datamodel>
    <onentry>
    	<classification:screen requestid="_data.reqid" rules="_data.rulesetA"
    	results="all" />
    </onentry>
    <transition event="classification.screen.done" target="statex"/>
    <transition event="error.classification.screen" target="statey"/>
    </state>

##### Children

None

##### Events

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

- classification.screen.done — This event is sent when the request has been accepted by the system and the interaction has been screened.
- error.classification.screen — This event is sent when the request has failed for some reason.

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