{% extends "base.html" %} {% block title %}KPI Master{% endblock %} {% block header %}KPI Master{% endblock %} {% block content %}
{% set total_kpis = kpis|length if kpis else 0 %} {% set active_kpis = kpis|selectattr("is_active")|list|length if kpis else 0 %} {% set manual_kpis = kpis|selectattr("source_type", "equalto", "MANUAL")|list|length if kpis else 0 %}
KPI Management

KPI Master

Create and maintain KPI definitions, source type, aggregation behavior, units, and active status.
Total KPI Definitions
{{ total_kpis }}
Total KPIs
{{ total_kpis }}
Created KPI definitions
Active KPIs
{{ active_kpis }}
Available for assignment
Manual KPIs
{{ manual_kpis }}
Manually maintained KPIs
Create KPI
New KPI Definition
Add a reusable KPI that can later be assigned to users or designations.
Recommended KPI Codes
total_sales total_collections total_calls total_meetings total_leads_converted
Use lowercase, underscore-based unique codes for reliable system mapping.
KPI List
Existing KPI Definitions
Edit KPI metadata, control visibility, or remove unused KPI definitions.
{{ total_kpis }} KPI(s)
{% if kpis %}
{% for k in kpis %}
{{ k.name }}
{% if k.is_active %} Active {% else %} Inactive {% endif %} {% if k.source_type == "SYSTEM" %} SYSTEM {% else %} MANUAL {% endif %} {{ k.aggregation_type or 'COUNT' }}
Code: {{ k.code }} {% if k.unit %} • Unit: {{ k.unit }} {% endif %} • Sort: {{ k.sort_order }}
Description
{{ k.description or 'No description provided.' }}
{% endfor %}
{% else %}
No KPIs created yet
Create your first KPI definition using the form on the left.
{% endif %}
{% endblock %}