Partilhar via


CSFEvalTargetGroups

Use the CSFEvalTargetGroups pipeline 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 the CSFEvalTargetGroups pipeline component evaluates targeting expressions by setting component properties. Use the following boxes on the Eval Expressions tab of the Component Properties dialog box to 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 the CSFEvalTargetGroups pipeline component reads the following values from the indicated dictionaries.

Key

Dictionary

Description

TargetingProfiles

Context

Optional.

ContextProfile

Context

Optional. The ContentSelector object (a dictionary) for use in expression evaluation. The dictionary contains values to test against context profile expressions.

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.

Evaluator

Context

A reference to the ExpressionEval object to use.

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 the CSFEvalTargetGroups pipeline component writes the following values to the Order dictionary.

Key

Description

_content.score

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

Remarks

The the CSFEvalTargetGroups pipeline 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 CSFEvalTargetGroups pipeline component and ExpressionEval object 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.

See Also

Other Resources

ExpressionEval Object

Pipeline Component Reference