Home > @uniformdev/context > topDownCriteriaPersonalizationSelectionAlgorithm

topDownCriteriaPersonalizationSelectionAlgorithm() function

Implementation of the top-down criteria personalization selection algorithm.

In this mode, we evaluate variations in the order they are declared and the first <take> variations whose criteria evaluate to true are selected.

Signature:

declare function topDownCriteriaPersonalizationSelectionAlgorithm<TCriteria extends VariantMatchCriteria, TVariation extends PersonalizedVariant<TCriteria>>({ name, context, variations, take, onLogMessage, }: PersonalizationSelectionAlgorithmOptions<TCriteria, TVariation>): PersonalizedResult<TVariation>;

Parameters

ParameterTypeDescription
{ name, context, variations, take, onLogMessage, }PersonalizationSelectionAlgorithmOptions<TCriteria, TVariation>

Returns:

PersonalizedResult<TVariation>