Home > Managing Programs > Defining a New Program > Managing the Program Structure > Configuring Trigger Properties

Configuring Trigger Properties

The conditions that define the circumstances under which SMART should search for a child item in a call are called triggers. The triggers of linguistic recognition tasks are defined in the Program's structure diagram (see Managing the Program Structure), and are represented there by the arrows that connect recognition tasks. You can fine-tune the triggers in the following ways:

- Metadata: Specify that a particular child item should only be sought in a call if the call meets one or more metadata requirements. For example, you can specify that a particular Topic should only be sought if the customer is in the state of Nevada, or if a particular agent handled the call.
- Parent conditions: Configure the settings of the parent-child relationships that are defined in the structure diagram. For example, you can specify that the parent must be recognized with a particular level of strictness before the child should be sought, or that the parent must be found twice before the child is sought.

## Logical Expressions

Configuring triggers is performed by defining a logical expression for SpeechMiner to evaluate. If the logical expression is evaluated as True, the trigger is activated and the child recognition task is run on the call; if it is false, the trigger is not activated, and the child recognition task is not run.

Logical expressions can consist of one or more elements. Each element is a statement, such as Date Of Call>1/19/2010 or Found topic "Reduction" at least once with Low Strictness. If a logical expression contains one element, it is True whenever the condition defined in the element is true. For example, if a logical expression contains the element Date Of Call>1/19/2010, it is True for any call whose metadata indicates that it took place on or after 1/20/2010.

Logical expressions can also contain multiple elements. When they do, the elements must be related to one another by logical operators, such as AND or OR. For example, Date Of Call>1/19/2010 AND Found topic "Reduction" at least once with Low Strictness is a logical expression that indicates both conditions must be met - the Topic must be found and the call must have taken place in the specified time period - in order for the expression to be evaluated as True and the recognition task to be implemented.

The following operators can be used in logical expressions:

Operator | Description
AND | Both conditions must be met in order for the expression to be evaluated as True
OR | At least one of the conditions must be met in order for the expression to be evaluated as True
NOT | The expression should be evaluated as True only when the condition is not met.
( | Opens a group of conditions that are evaluated as a unit
) | Closes a group of conditions that are evaluated as a unit

Logical expressions can be quite complex, containing a number of elements, various logical operators, and parentheses, if necessary. For example:

> (Date Of Call>1/1/2011 AND Date Of Call<1/30/2011 AND Found topic "Reduction" at least once with Low Strictness) OR (Date Of Call>1/31/2011 AND (Found topic "Time Frame" at least once with Low Strictness OR Found topic "Payment Locations" at least once with Medium Strictness))

means the recognition task should be performed if the call took place between Jan. 1st and Jan. 30th and the Topic "Reduction" was found, or if the call took place Jan. 31st or later and either the Topic "Time Frame" or the Topic "Payment Locations" was found.

## Configuring Trigger Conditions

Trigger conditions are configured by defining logical expressions. Both metadata and parent conditions can be included in the logical expression. Metadata conditions are added to the logical expression manually, but parent conditions must be created in the structure diagram; once they are created, you can modify their properties manually.

If conditions are defined for a particular trigger, they are displayed in the List pane in the Triggers tab, under Exp.

Trigger conditions defined for the Fees and Services Charges -> Payment Address trigger

To configure the trigger conditions of a recognition task:

1. In the List pane, select the Triggers tab. A list of all the triggers that are defined in the Program structure is displayed.
2. Double-click the trigger for which you want to define the condition. The Trigger Properties dialog box opens. If any conditions are already defined for the trigger, they appear in the text area in the middle of the dialog box. Otherwise, the text area is blank.

   Note: You can also open the dialog box by double-clicking the trigger in the structure diagram.

   Trigger Properties dialog box

3. Add metadata elements, modify existing elements, and add or change operators as explained below.

   Trigger Properties with logical expression defined

4. Click OK. The condition appears in the Triggers tab under Exp. If the expression contains metadata elements, the trigger is displayed in the structure diagram in orange.

   Metadata trigger-condition displayed in orange

### Adding Metadata Conditions

Metadata is information about calls that is gathered by the external recording system and relayed to SpeechMiner along with the call audio. Each system receives different sets of information about the calls that are passed to it for processing. For example, metadata could include the name of the agent for each call, the location of the customer, and the duration of the call.

You can define metadata conditions based on any of the metadata values available in your system. In addition, you can define different metadata conditions for each linguistic task in a Program. The conditions you define can be as simple as one metadata value or complex expressions that specify the relationships among a number of types of metadata. Take, for example, a sales campaign that is undertaken in Wyoming and in Texas. Certain agents in each location target senior citizens, while others target families with teenage children. To process calls to senior citizens differently from other calls that belong to the Program, you could define a condition that specifies either Agent1 or Agent2 if the customer is in Wyoming, and Agent3 if the customer is in Texas, and apply the condition to the items that are specific to the senior-citizen campaign.

To add a metadata element to an expression:

1. In the lower part of the Trigger Properties dialog box, click to clear all existing selections.
2. Under Type, select Metadata. The fields required to select the metadata values are added to the dialog box below the Type field.

3. In the first field, specify the type of metadata. You can specify the type in one of two ways
   - If the type appears in the dropdown list, select it. For example, select Workgroup\Agent if you want to define a condition based on the workgroup or agent that handled the call.
   - Type the name of the type in the field. For example, if your system gathers data on call direction under the name calldirection, type calldirection if that is the name of that type of metadata.
4. In the remaining fields, specify the condition. In some cases, you can select an operator (<, >, or =) in the second field and specify a value in the third; in other cases, you only specify a value (and the = operator is assumed). You can specify a value by selecting it from the list or by typing it manually into the third text field.

   Note: Some of the options may be arranged hierarchically. For example, if you select Workgroup\Agent, a list of workgroups is displayed. You can select a workgroup, or click the + beside the name of a workgroup to expand the list and display the names of the agents in the workgroup. If you select a workgroup, all members of the workgroup are included in the condition; if you expand a workgroup and select an agent, only that agent is included.

5. If you want the trigger to include all calls except those that match the condition, select Not (or click the Not operator, as explained below).
6. Click Add. The element is inserted into the expression.
7. If the element is not the first element in the expression, at the top of the dialog box, click the operator that should precede the element (And, Or, or Not). The operator is inserted into the expression before the element.

### Inserting Parentheses into an Expression

Parentheses can be inserted into an expression to group elements together for evaluation as a single unit. Complex expressions often require parentheses to break them into smaller expressions so that the relationships between the expressions are clear. For example, if a Topic must be found in calls handled by one of two agents, and you wrote

> Workgroup\Agent=workgroup 1/agent a OR Workgroup\Agent=workgroup 1/agent b AND Found topic "Reduction" at least once with Low Strictness

it would not be clear whether the Topic must be found in calls handled by both agents or only in calls handled by agent b. If you add parentheses like this

> (Workgroup\Agent=workgroup 1/agent a OR Workgroup\Agent=workgroup 1/agent b) AND Found topic "Reduction" at least once with Low Strictness

the Topic would have to be found in calls handled by one of the agents. But if you write

> Workgroup\Agent=workgroup 1/agent a OR (Workgroup\Agent=workgroup 1/agent b AND Found topic "Reduction" at least once with Low Strictness)

the Topic would only be required in calls handled by agent b.

To insert parentheses into an expression:

1. Click the first element that you want to include in the parentheses. The element is selected.
2. At the top of the dialog box, click (. A ( is inserted into the expression before the selected element.
3. Click the element or operator after the last element you want to include in the parentheses. If the element you want to include is the last element in the expression, do not select any items in the expression.
4. At the top of the dialog box, click ). A ) is inserted into the expression after the last element of the expression.

### Defining a Negative Condition

A negative condition is a condition that must not be met if an expression is to be evaluated as True. For example, a condition that states that a call must not have taken place in the month of January is a negative condition. Negative conditions can be specified for a single element of an expression or a group of elements that are contained in parentheses.

Two methods are available for creating a negative condition for a single element:

- Insert a NOT operator before the element.
- Select the Not option in the element's conditions.

In the following two illustrations, a negative condition is created in each of these ways. The meanings of the two conditions are identical: the condition is True as long as the date is not on or before January 31st, 2011.

Negative condition created using the NOT operator

Negative condition created using the Not option

An expression containing multiple elements can only be marked as a negative condition using the NOT operator. For example, in the illustration below, the NOT operator is attached to a multi-element condition. The condition is True for all workgroups except workgroup 1 and workgroup 4.

NOT operator used to create a negative condition with multiple elements

To insert a NOT operator before an element or expression:

1. If the condition is an expression that contains multiple elements, make sure it is contained in parentheses.
2. In the text area of the Trigger Properties dialog box, select the element or expression.
3. At the top of the text area, click Not. A NOT operator is added to the condition before the selected item.

To select the Not option for an element:

1. If the properties of the element are not displayed, in the text area of the Trigger Properties dialog box, select the element.
2. In the condition area below the text area, select Not.
3. Click Add or Update to add or update the negative element in the text area.

### Modifying the Elements of an Expression

You can modify the properties of elements that are already included in the expression. You can do this for metadata elements and for parent elements.

#### Modifying Metadata Elements

You can modify any of the properties of a metadata element.

To modify an existing metadata element:

1. In the text area, click the element. Its properties open below the text area.
2. Modify the settings as required (see above).
3. Click Update. The settings are modified.

#### Modifying Parent Elements

You can change the properties of a parent element, including the required number of occurrences of the element, its strictness level, and its timing constraints, but you cannot change it to a different Topic and you cannot move it to a different position in the Program structure. (To do these latter two things, you have to change the structure diagram; see Managing the Program Structure.

To modify a parent element:

1. In the text area, click the element. The element is selected and its properties open below the text area.

2. Modify the following settings as necessary:

   Setting | Description
   Not found | Select this option if you want the trigger to include all calls except those that match the condition; that is, the child should not be sought unless the parent is not found in the call
   At least __ Occurrences (Topics only) | Specify the minimum number of times the parent Topic must be found in the call in order for the child to be sought; if the parent recognition does not meet this minimum, SpeechMiner proceeds as if the parent was not found
   At least __ Strictness (Topics only) | Select the minimum level of strictness for the recognition of the parent Topic; if the parent recognition does not meet this minimum, SpeechMiner proceeds as if the parent was not found
   From | Define the earliest position in the call audio at which the parent may be found, in seconds, and then select one of the following types of reference points: Secs Abs: The number of seconds is defined relative to the beginning of the call Secs Abs from End: The number of seconds is defined relative to the end of the call (i.e., the parent must be found no earlier in the call than this number of seconds from the end of the call) Secs Rel to Start of Prev: The number of seconds is defined relative to the beginning of the parent item Secs Rel to End of Prev: The number of seconds is defined relative to the end of the parent item
   To | Define the latest position in the call audio at which the parent may be found, in seconds, and then select one of the types of reference points explained above.
   Speaker Type | Select a speaker type if you want the trigger to only include locations in which the selected type of speaker is speaking, or ANY to include all speaker types.

3. Click Update. The settings are modified.

### Copying an Expression from Another Trigger

You can copy an expression from the Trigger Properties of one trigger and paste it into the Trigger Properties of another trigger. The triggers do not have to be part of the same Program. After you paste the expression, you can edit it as necessary, just as you would edit any other expression.

To copy the trigger conditions from one trigger to another:

1. In the Program containing the source trigger, double-click the trigger. The Trigger Properties dialog box of the source trigger opens.
2. At the top-right of the dialog box, click Copy.
3. Click OK. The dialog box.
4. In the Program containing the target trigger, double-click the trigger. The Trigger Properties dialog box of the target trigger opens.
5. At the top-right of the dialog box, click Paste. The condition expression from the source trigger appears in the expression area of the dialog box.

### Removing Elements and Operators from an Expression

You can remove any element or operator from an expression except for a parent element (which must be removed in the structure diagram; see Managing the Program Structure).

To remove an element or operator from an expression:

1. Click the element. The element is selected.
2. At the top of the dialog box, click . The selected item is deleted from the expression.

See also

Configuring Recognition Tasks