Skip to content

KPIs (مؤشرات الأداء)

Define Key Performance Indicators used in employee performance reviews. KPIs are grouped by category and assigned weights.

Attributes

FieldTypeDescription
idintegerPrimary key
name_enstringEnglish name
name_arstringArabic name (nullable)
categoryenumquality, productivity, attendance, teamwork, leadership, communication
descriptiontextKPI description (nullable)
weightdecimalWeight in review (0-100)
is_activebooleanActive status

API Endpoints

MethodURLDescription
GET/api/hr/kpisList KPIs
POST/api/hr/kpisCreate KPI
GET/api/hr/kpis/{id}Show KPI
PUT/api/hr/kpis/{id}Update KPI
DELETE/api/hr/kpis/{id}Delete KPI

Examples

bash
curl -X POST "https://moon-erp.elbaset.com/api/hr/kpis" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "name_ar": "جودة العمل",
    "name_en": "Work Quality",
    "category": "quality",
    "weight": 30,
    "description": "Quality and accuracy of delivered work"
  }'
dart
final response = await dio.post('/api/hr/kpis', data: {
  'name_ar': 'جودة العمل',
  'name_en': 'Work Quality',
  'category': 'quality',
  'weight': 30,
});

Business Rules

  • KPIs are referenced by Review Templates via kpi_ids JSON array
  • Weights are used to calculate weighted average scores in performance reviews
  • Cannot delete a KPI that is referenced by active review templates

Moon ERP API Documentation