# Goals & OKRs {#goals--okrs}


Objective and Key Result (OKR) tracking system for organizational alignment and performance measurement.


## Overview {#overview}


The Goals module implements a full OKR framework with hierarchical goal setting, key result tracking, and progress visualization.


## Goal Hierarchy {#goal-hierarchy}


```
Organization Goal
  │
  ├── Team Goal
  │     ├── Key Result 1
  │     ├── Key Result 2
  │     └── Key Result 3
  │
  └── Employee Goal
        ├── Key Result 1
        └── Key Result 2
```


## Core Entities {#core-entities}



### Goal {#goal}


| Field             | Type   | Description                  |
| ----------------- | ------ | ---------------------------- |
| `name`            | string | Goal title                   |
| `description`     | string | Detailed description         |
| `deadline`        | string | Target quarter/date          |
| `level`           | enum   | Organization, Team, Employee |
| `progress`        | number | 0-100% completion            |
| `ownerEmployeeId` | UUID   | Responsible employee         |
| `ownerTeamId`     | UUID   | Responsible team (optional)  |


### Key Result {#key-result}


| Field          | Type   | Description                     |
| -------------- | ------ | ------------------------------- |
| `name`         | string | Key result title                |
| `type`         | enum   | Numerical, True/False, Currency |
| `targetValue`  | number | Target metric                   |
| `initialValue` | number | Starting metric                 |
| `currentValue` | number | Current metric                  |
| `goalId`       | UUID   | Parent goal                     |
| `weight`       | number | Importance weight               |


### KPI (Key Performance Indicator) {#kpi-key-performance-indicator}


| Field          | Type   | Description                           |
| -------------- | ------ | ------------------------------------- |
| `name`         | string | KPI name                              |
| `type`         | enum   | Numerical, True/False, Currency, Task |
| `currentValue` | number | Current value                         |
| `targetValue`  | number | Target value                          |
| `operator`     | enum   | `>=` , `<=`, `=`                      |


## Goal Templates {#goal-templates}


Pre-built goal templates for common objectives:

| Template              | Level        | Description                |
| --------------------- | ------------ | -------------------------- |
| Revenue Growth        | Organization | Increase quarterly revenue |
| Customer Satisfaction | Organization | Improve NPS score          |
| Sprint Velocity       | Team         | Maintain sprint velocity   |
| Code Quality          | Team         | Reduce bug count           |
| Skill Development     | Employee     | Complete training goals    |


## Time Frames {#time-frames}


Goals operate within defined time frames:

| Period    | Example          |
| --------- | ---------------- |
| Annual    | FY 2024          |
| Quarterly | Q1 2024, Q2 2024 |
| Monthly   | January 2024     |
| Custom    | Any date range   |


## API Endpoints {#api-endpoints}


```bash
# Goals
GET    /api/goals
POST   /api/goals
PUT    /api/goals/:id
DELETE /api/goals/:id

# Key Results
GET    /api/key-results
POST   /api/key-results
PUT    /api/key-results/:id

# KPIs
GET    /api/goal-kpi
POST   /api/goal-kpi

# Templates
GET    /api/goal-templates
POST   /api/goal-templates
```


## Related Pages {#related-pages}


- [HRM Features](https://sourcey-gauzy.pages.dev/features/hrm-overview/index.md)
- [Reports & Analytics](https://sourcey-gauzy.pages.dev/features/reports-and-analytics/index.md)
