Targets

Targets define performance goals in Dolfin's compensation system. They are tied to metrics and used to calculate achievement rates that drive bonuses, multipliers, and other compensation logic.

🎯 What Are Targets?

Targets define expected performance levels for a given metric within a time period. They are used to determine how much of a goal has been achieved and directly influence payout logic in compensation rules.

Targets are always evaluated as a ratio between 0 and 1. This value—called achievement—is used to:

  • Calculate bonuses proportionally
  • Determine commission tiers
  • Apply multipliers
  • Drive conditional logic

📌 Where Targets Are Used

Use CaseDescription
Bonus NodesUsed in proportional and tiered payout calculations.
Multiplier NodesUsed to apply scaling factors to previously calculated compensation.
Commission NodesUsed to gate commission tiers.
Conditional LogicCan be used to define filter logic for rule branches.
Compensation StatementsAchievement is surfaced to users to show progress.

🔍 Target Structure

FieldDescription
metric_idThe metric this target is tied to.
target_amountThe numeric goal to be hit.
period_start / period_endThe time range the target applies to.
team_targetIf true, this is a team-based target.
global_targetIf true, the same target applies to all users.
is_upper_boundIf true, lower values are considered better.
allow_partial_outcomeOnly relevant for manually-entered targets. If false, achievement is binary (1 if achieved, 0 if not).
team_idsTeams the target applies to (if applicable).

🧠 Achievement Calculation

Achievement is always returned as a ratio between 0 and 1, unless is_upper_bound = true, in which case it may exceed 1.

  • Standard Targets: achievement = metric_value / target_amount
  • Upper Bound Targets: achievement = target_amount / metric_value

Manual Targets

If the target is manually entered (not derived from a metric), allow_partial_outcome modifies how achievement is calculated:

  • If allow_partial_outcome = false, achievement is either:

    • 1 (goal met)
    • 0 (goal missed)
  • If allow_partial_outcome = true, partial achievement is allowed (e.g. 0.7).


⚙️ Target Evaluation Logic

Target evaluation is performed by comparing actual performance (metric value) with the defined target amount. Here's how it works:

  1. Determine the applicable target
  • Identify the user’s teams.
  • Check if the target is global, team-based, or individual.
  • Select the most relevant entry (profile → team → global), using the correct aggregation function.
  1. Calculate the metric value
  • Evaluate the metric over the given period and user/team scope.
  1. Compare against the target amount
  • If is_upper_bound = false: divide metric_value / target_amount.
  • If is_upper_bound = true: divide target_amount / metric_value.
  1. Adjust for manual overrides
  • If the target is manually entered:
  • With allow_partial_outcome = false: result is 1 if the target is met, 0 otherwise.
  • With allow_partial_outcome = true: result is proportional.
  1. Return the result
  • The final value is a ratio representing achievement: 0.0 = nothing achieved, 1.0 = target met, >1.0 = overachieved (in some cases).

🧩 Example Usage in a Bonus Node

{
"type": "proportional",
"reference_type": "target",
"target": {
  "id": 123
},
"minimum_achievement": 0.5,
"maximum_achievement": 1
}

This rule grants a proportional bonus if the user achieves between 50% and 100% of the target.

On this page