Share via


EvalTargetGroups

Use this component to target particular groups for advertising, content selection, and discounts. The component evaluates a list of expressions for each item in a list and adjusts item selection scores.

Intended use: Content Selection pipeline, Score stage.

Configuration Values

You can determine how the EvalTargetGroups component evaluates targeting expressions by setting component properties. Use the following boxes on the Eval Expressions tab of the Component Properties dialog box evaluate this information.

Row Column Description
Target Match The multiplier applied when a target expression evaluates to True. The default is 1 (one).
  Mismatch The multiplier applied when a target expression evaluates to False. The default is 1 (one).
Require Match The multiplier applied when a require expression evaluates to True. The default is 1 (one).
  Mismatch The multiplier applied when a require expression evaluates to False. The default is 0 (zero).
Exclude Match The multiplier applied when an exclude expression evaluates to True. The default is 0 (zero).
  Mismatch The multiplier applied when an exclude expression evaluates to False. The default is 1 (one).

Values Read

The EvalTargetGroups component reads the following values from the indicated dictionaries.

Key Dictionary Description
_content Order A reference to a ContentList object. Specifically, the target_groups field of the content items are read. The target_groups field contains an array of IDs of the target groups associated with each content item.
TargetGroups Context A dictionary of SimpleList objects. The keys are target group identifiers. Each SimpleList object contains expression name and action pairs, stored in alternating entries: the first expression name at index 0, first action at index 1; second expression name at index 2, second action at index 3; and so on.

Actions are numbers with the following meanings:

1 — Target
2 — Require
3 — Exclude
4 — Exclusive (Sponsorship)
Evaluator Context A reference to the ExpressionEval component to use.
ContextProfile Context Optional. The ContentSelector object (a dictionary) for use in expression evaluation. The dictionary contains values to test against context profile expressions entered through Commerce Server Business Desk.
UserProfile Context Optional. A reference to a ProfileObject object containing the profile for the current user. Used as the "UserObject" profile in evaluating the expressions.
Trace Context Optional. A Boolean indicating whether score adjustment tracing is enabled. This component will not produce trace strings unless this key is set to True.

Values Written

The EvalTargetGroups component writes the following values to the Order dictionary.

Key Description
_content A reference to a ContentList object with any required adjustments made to the score fields of content items.

Remarks

The EvalTargetGroups component evaluates all of the listed target expressions for each of the content items in the list. If the expression is True, then it will apply the Match value multiplier for the indicated action, one of Target, Require, or Exclude. Similarly, if the expression is False, then it applies the Mismatch multiplier for the specified action.

A content item may have more than one target expression that applies to it. Because of this, all target expressions are evaluated for a content item but only the expression that produces the largest multiplier is applied.

Each action corresponds to a pair of multipliers. One of the multipliers is applied to the score of content items in the ContentList object. A multiplier in the pair is chosen based on the outcome of the expression: True or False.

Sponsorship is handled differently. The Sponsorship action is not a score multiplier. Rather, if any target group contains a Sponsorship expression that evaluates to True, then all target groups that do not contain a Sponsorship expression that evaluates to True are disqualified.

If an expression produces an undefined value, then the multiplier applied depends on the action associated with the expression:

Action Multiplier Applied
Target Mismatch multiplier
Require Mismatch multiplier
Exclude Match multiplier
Sponsorship 0 (zero)

An example of an undefined expression value would be an expression that depends on the age of the user when the age of the user is unknown.

The EvalTargetGroups and ExpressionEval components both use result caching for high performance. If multiple target groups reference the same expression, the expression is evaluated only once and subsequently the cached result is used. Similarly, if multiple content items reference the same target group, the target group is evaluated only once and subsequently the cached results are used.

This component uses the ExpressionEval object to evaluate expressions.

The behavior of the PenalizeUnmatchedTargets property of the Site Server 3.0 Commerce Edition AdServer component can be replicated by changing the multiplier for Target/Mismatch to 0.95.

See Also

ExpressionEval Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.