Assignment Threshold Configs
Data Entity
Description
Organization-scoped configuration records that define the assignment count thresholds at which peer mentors qualify for honorarium tiers. Each record specifies a threshold boundary (e.g., 3 assignments triggers base honorarium, 15 triggers higher rate), the monetary amount, the reporting period, and activation status. Blindeforbundet's office honorarium model is the primary driver: coordinators need real-time visibility into which tier each mentor has reached within the current period.
Data Structure
| Name | Type | Description | Constraints |
|---|---|---|---|
id |
uuid |
Unique identifier for the threshold configuration record | PKrequiredunique |
organization_id |
uuid |
Foreign key to the organization that owns this threshold configuration | required |
name |
string |
Human-readable label for this threshold tier (e.g., 'Base Honorarium', 'Senior Rate') | required |
threshold_count |
integer |
Number of completed assignments required to reach this tier within the reporting period | required |
honorarium_amount |
decimal |
Monetary amount (NOK) awarded when this threshold is reached | required |
currency |
string |
ISO 4217 currency code for the honorarium amount | required |
period_type |
enum |
Reporting period over which assignments are counted toward this threshold | required |
tier_order |
integer |
Sort order defining the progression sequence of tiers within the organization (lower = earlier tier) | required |
is_cumulative |
boolean |
Whether higher tiers include lower-tier amounts (true) or replace them (false) | required |
is_active |
boolean |
Whether this threshold configuration is currently active and used for evaluation | required |
effective_from |
datetime |
Date from which this threshold configuration takes effect | required |
effective_until |
datetime |
Date until which this threshold configuration is valid; null means no expiry | - |
description |
text |
Optional explanation of the threshold purpose, payout conditions, or policy reference | - |
notification_enabled |
boolean |
Whether to trigger a notification when a peer mentor reaches this threshold | required |
created_at |
datetime |
Timestamp when this configuration record was created | required |
updated_at |
datetime |
Timestamp when this configuration record was last modified | required |
created_by |
uuid |
User ID of the administrator who created this configuration | required |
updated_by |
uuid |
User ID of the administrator who last modified this configuration | - |
Database Indexes
idx_threshold_configs_org_id
Columns: organization_id
idx_threshold_configs_org_active
Columns: organization_id, is_active
idx_threshold_configs_org_tier
Columns: organization_id, tier_order
idx_threshold_configs_effective_range
Columns: effective_from, effective_until
Validation Rules
threshold_count_positive
error
Validation failed
honorarium_amount_non_negative
error
Validation failed
valid_organization_reference
error
Validation failed
effective_from_required
error
Validation failed
effective_until_after_from
error
Validation failed
name_not_blank
error
Validation failed
valid_period_type_enum
error
Validation failed
tier_order_non_negative
error
Validation failed
currency_iso_format
error
Validation failed
Business Rules
unique_threshold_count_per_org_period
Within the same organization and period_type, no two active configurations may share the same threshold_count value, preventing ambiguous tier evaluation
ascending_honorarium_with_tier
Higher tier_order records must have a threshold_count greater than or equal to lower-tier records within the same organization, ensuring logical tier progression
org_admin_only_modification
Only Organization Administrators and Global Administrators may create, update, or deactivate threshold configurations; coordinators have read-only access
no_retroactive_effective_date
The effective_from date of a new configuration must not precede any existing completed reporting period to prevent retroactive honorarium recalculation without explicit admin override
deactivation_over_deletion
Threshold configurations that have been used for past period evaluations must be deactivated (is_active = false) rather than deleted, preserving audit history
at_least_one_active_config
An organization using assignment threshold tracking must have at least one active threshold configuration at all times; deactivating the last config is blocked
threshold_notification_on_reach
When a peer mentor's completed assignment count crosses a threshold_count boundary and notification_enabled is true, trigger a push notification to the mentor and their coordinator