Module HRMS
  1. OKR Key Result
Module HRMS
  • HR
    • Readme First!
    • Auth
      • Login
      • Register
      • Request Reset Password
      • Reset Password
      • Change Password
    • Attachment
      • Upload temp
    • Profile
      • Docs Notification
      • Profile
      • User Permissions
      • Update Profile
      • Upload FCM Token
      • Test Push Notification
      • Notification
    • Employees
      • Families
        • Create Family
        • Create Bulk Families
        • Get Families
        • Update Family
        • Delete
        • Update Bulk
        • Create without employee_profile_id
      • Educations
        • Get Educations
        • Create Education
        • Update Education
        • Delete
        • Bulk Create
        • Bulk Update
        • Create without employee_profile_id
      • Work Experiences
        • Get All
        • Create
        • Update
        • Delete
        • Bulk Create
        • Bulk Update
        • Create without employee_profile_id
      • Contact Refferences
        • Get All
        • Create
        • Update
        • Delete
        • Bulk Create
        • Bulk Update
        • Create without employee_profile_id
      • Organization Structure
        • Assign Manager
        • Get Employee By Relationship
        • Get Organization Chart
      • Documents
        • Document Access Control
        • Get Document Access Control
      • Employee Document
        • Add / Create
        • Get All
        • Delete
        • Update
        • Get Detail
      • Group
        • Job Level
      • Attendance
        • User Attendance
          • History Attandence
          • User Stats
        • Create Attendence
        • Attendence
        • Update Attendence
        • Delete Attendence
        • Set Status
        • Attendance Stats
        • Show Attendance
      • Offboarding
        • Initiate Offboarding
          • Get Offboarding
          • Create Initiate Offboarding
          • Get Detail
          • Delete
          • Offboarding Progress
        • Interview Schedule
          • Show
          • Create & Update
        • Capture Exit Interview
          • Store / Update Submission Exit Interview
          • Get Answer/Submissions of Offboarding
          • Notify Employee
        • Work Handover & Asset Return
          • Get All
          • Create
          • Delete
          • Update
          • Bulk Create
          • Bulk Update
        • Final Salary
          • Show
          • Update or Create
          • Assign Payruns Date
          • Delete Assign Payruns Date
        • Complate Offboarding
        • Canceled Offboarding
      • Overtime
        • Create Overtime
        • Update Overtime
        • Get List Overtime
        • Get Detail Overtime
        • Delete Overtime
        • Update Status Overtime
        • Get Holiday
      • Leave
        • Create Leave
        • Update Leave
        • Get List Leave
        • Get Detail Leave
        • Delete Leave
        • Approve / Reject Leave
        • Get User Leave balance
      • Self Assessment
        • Create Self Assessment
        • Get List Self Assessment
        • Get Detail Self Assessment
        • Get Employee Assessment
      • Penalty
        • Fetch
        • Create
        • Update
        • Show
        • Delete
      • Payroll
        • Get Employe Payslip
        • Show
      • Create Employee Profile
      • Update Employee Profile
      • Get Employee Profiles
      • Get Employee Profile Detail by User ID
      • Delete / Archive
      • Get Employee Group
    • Mail verification
      • Resend Email
      • Verify Email
    • Setting
      • Form
        • Contoh Payload Build Fields
        • Cara render pertanyaan & jawaban
        • Field
          • Get Fields
          • Add Field by From [Deprecated]
          • Get Fields By Group
        • Get All
        • Create Form
        • Show by Id
        • Update
        • Delete
        • Build Field of Form
      • Role and Permissions
        • Get Roles
        • Permissions
        • Detail Role
        • Create Role
        • Update Role
        • Delete Role
        • Assign role to user
        • Revoke role from user
        • User with roles
      • Company Profile
        • Company Profile
        • Company Profile
      • Working Schedule
        • Working Schedule
        • Set Working Schedule
      • Shift
        • Get
        • Create
        • Update
        • Delete Shift
        • Get Today Shift
      • Late Deduction Rules
        • Get Let Deductions
        • Create Late Deductions
        • Update Late Deductions
        • Get Single
        • Delete
      • Overtime Configuration
        • Overtime Configuration
        • Get Overtime Configuration
      • Branch
        • Fetch
        • Create
        • Show
        • Update
        • Delete
        • Toogle Primary
      • Leave Type
        • Create Leave Type
        • Update Leave Type
        • Get List Leave Type
        • Get Detail Leave Type
        • Delete Leave Type
      • Leave Balance
        • Create Leave Balance
        • Update Leave Balance
        • Get List Leave Balance
        • Get Detail Leave Balance
        • Delete Leave Balance
      • Allowance Types
        • Get Allowance Types
        • Create
        • Show
        • Delete
        • Update
        • Get Allowance items
      • Base Salaries
        • Fetch
        • Store
        • Show
        • Edit
        • Delete
      • Salary Deduction
        • Get Salary Deduction
        • Get Detail Salary Deduction
        • Create Salary Deduction
        • Update Salary Deduction
        • Get Deduction Type
        • Delete Salary Deduction
      • Performance Competency
        • Create Performance Competency
        • Get Performance Competency
        • Get Performance Competency Detail
        • Update Performance Competency
        • Delete Performance Competency
      • Performance Competency Level
        • Create Performance Competency Level
        • Get Performance Competency Level
        • Get Performance Competency Detail
        • Update Performance Competency Level
        • Delete Performance Competency Level
      • Score Thresholds
        • Requirements
        • Get
        • Show
        • Create
        • Update
        • Delete
      • Holiday Calendar
        • Get All Holiday Calendar
        • Get Detail Holiday Calendar
        • Create Holiday Calendar
        • Update Holiday Calendar
        • Delete Holiday Calendar
        • Sync Holiday Calendar
        • Get API Holiday
      • Activity Logs
    • Master Data
      • Bank List
        • Get List Bank
      • Job Level
        • Get All Job Levels
        • Create Job Level
        • Update Job Level
        • Delete Job Level
      • Department
        • Get Departments
        • Detail Department
        • Create
        • Update
        • Delete
      • Job Positions
        • Get All Job Positions
        • Create Job Positions
        • Update Job Positions
        • Delete Job Positions
      • Teams
        • Get Teams
        • Detail Team
        • Create
        • Update
        • Delete
    • Playground
    • Payruns
      • Payslips
        • Employee Pay List
        • Adjust Working Hours
        • Adjust Allowance
        • Adjust Overtime
        • Adjust Penalty
        • Adjust Additonal Earning
        • Preview Email
        • Approve Request View Access
        • Approve Print Request
        • Show Detail Payslip
        • Recalculate Payslip
      • Request Payslip Print
        • Fetch
        • Show
        • Set Status
      • Request Payslip View
        • Fetch
        • Show
        • Set Status
      • Fetch
      • Store
      • Show
      • Set as Final
      • Retry Generate
      • Logs
      • Total Company Spend
    • Performances
      • Supervisor Assesment
        • Schedule
          • Detail
          • Set Schedule
        • Get All
        • Create Initial Supervisor Assessment
        • Update
        • Detail
        • Delete
        • Change Status Promoted Or Not
      • Key Performance Indicator
        • Get All
        • Create
        • Update
        • Detail
        • Delete
    • Dashboard
      • Get Attendance Trend
      • Get Attendance Stats
      • Get Employee Summary
      • Get Total Employee
      • Get Experience Employee
      • Get Detail Experience Employee
      • Get Experience Employee Trend
      • Get Gender Spread
      • Get Additional
      • Get Additional Detail
      • Get Age Spread
      • Get Age Spread Detail
      • Get Offboarding Trend
      • Get Offboarding Recent
      • Get Pending Stat
      • Get Payroll Stat
      • Get Payroll Trend
      • Create Custom Dashboard
      • Get Custom Dashboard
    • OKR
      • OKR Cycles
        • Create
        • Fetch
        • Show
        • Delete
        • Update
        • Set Status
      • OKR Objectives
        • Store
        • Update
      • OKR Key Result
        • Sample JSON untuk Create OKR Key Result
        • Store
          POST
        • Delete
          DELETE
        • Tracking Table
          GET
        • Set Tracking Value
          POST
      • Get Graph Lists
        GET
      • Filter key Result Graph Single
        GET
    • Home
      GET
  • ESS
    • Overtime
      • Overtime History / Log
      • Overtime Summary Log
      • Overtime Request
      • Update Overtime Request
    • Leave
      • Create Leave
      • Get Leaves
      • Get Detail
      • Get Leave Balance
    • Attendance
      • Attendance History / Log
      • Attandance Summary Log
      • Update or Adjustment Attendance
      • Clock In
      • Clock Out
    • Offboarding
      • Handover Item
        • Get Handover Item (Work & Document)
        • Store Data
        • Validate Handover Offboarding
      • Get offboarding of user
    • Payslip
      • Get Payslip List
      • Request View Access
      • Request Print
      • Get Detail
    • Self Assessment
      • Requirements
      • Get Self Assessment
      • Get Answer/Submissions
      • Submit Submission
      • Validate Submission
    • Supervisor Assessment
      • Get Form Pertanyaan
      • Get All
      • Detail
      • Get My Submission / Answer
      • Submit Answer
    • OKR
      • Get OKR Objective & Key Result
      • Get Tracking Table by Key Results
      • Set Tracking Value Bulk
    • Activity log
      GET
    • Show Detail Attendance
      GET
    • Check Location Coverage
      POST
    • Check Face Recognition
      GET
  • Face Recognition
    • Faces
      • Docs
      • ESS
      • Faces
      • Delete
      • Profile
      • Verify Faces
      • Upload
  • Employee Dasboard
    • My OKR
      • My OKR
      • Show
      • Get Tracking Periods
      • Set Tracking Periods
    • My Overtime
      • Get My Overtime
      • Create Overtime Request
      • Update Overtime Request
    • My Self Assessment
      • Get List My Assessment
      • Get Submission Answer
      • Submit Submission Answer
    • My Leave
      • Get List My Leave
      • Get Detail My Leave
      • Create My Leave
    • My Organization Structure
      • Get My Org Structure
    • Dashboard
      • Attendance Trend
      • Waiting For Approval
    • My Offboarding
      • Work Handover
        • Get Work Handover
        • Create
        • Update
        • Delete
      • Docs Handover
        • Get Docs Handover
        • Create
        • Update
        • Delete
      • My Offboarding
      • Submit My Offboarding Exit Interview Form
    • Home
  1. OKR Key Result

Sample JSON untuk Create OKR Key Result

Sample JSON untuk Create OKR Key Result#

Dokumen ini berisi contoh-contoh JSON yang valid untuk request POST /api/v1/okr/key-results.

Field Reference#

Required Fields#

objective_id (integer) - ID dari OKR objective
job_position_id (integer) - ID dari job position
job_level_id (integer) - ID dari job level
title (string, max 255) - Judul key result
frequency (integer) - Frekuensi tracking: 0 (Weekly), 1 (Monthly), 2 (Quarterly), 3 (Yearly)
format (integer) - Format nilai: 0 (Number), 1 (Number Decimal), 2 (Percent), 3 (Percent Decimal), 4 (Currency IDR), 5-10 (Time formats)
target_value (numeric) - Nilai target yang ingin dicapai
direction (integer) - Arah: 0 (Higher is Better), 1 (Lower is Better)
aggregation (integer) - Metode agregasi: 0 (Latest), 1 (Sum), 2 (Average)

Optional Fields#

description (string) - Deskripsi detail key result
start_value (numeric) - Nilai awal (default: 0)
current_value (numeric) - Nilai saat ini (default: 0)
status (integer) - Status: 0 (Draft), 1 (Active), 2 (Done), 3 (Archived)

Example 1: Basic Key Result (Percent Format, Higher is Better)#

{
  "objective_id": 1,
  "job_position_id": 5,
  "job_level_id": 3,
  "title": "Achieve NPS score of 70",
  "description": "Net Promoter Score target for Q1 2025",
  "frequency": 1,
  "format": 2,
  "start_value": 50,
  "current_value": 55,
  "target_value": 70,
  "status": 1,
  "direction": 0,
  "aggregation": 0
}
Penjelasan:
Frequency: 1 = Monthly tracking
Format: 2 = Percent (12%)
Direction: 0 = Higher is Better (semakin tinggi semakin baik)
Aggregation: 0 = Latest (gunakan nilai terbaru)
Status: 1 = Active

Example 2: Revenue Target (Currency Format, Higher is Better)#

{
  "objective_id": 2,
  "job_position_id": 8,
  "job_level_id": 5,
  "title": "Achieve monthly revenue of 500 million IDR",
  "description": "Monthly recurring revenue target",
  "frequency": 1,
  "format": 4,
  "start_value": 300000000,
  "current_value": 350000000,
  "target_value": 500000000,
  "status": 1,
  "direction": 0,
  "aggregation": 1
}
Penjelasan:
Format: 4 = Currency IDR (Rp 1,234)
Aggregation: 1 = Sum (jumlahkan semua nilai)
Nilai dalam Rupiah (tanpa koma)

Example 3: Response Time Target (Time Format, Lower is Better)#

{
  "objective_id": 3,
  "job_position_id": 10,
  "job_level_id": 4,
  "title": "Reduce average response time to 2 hours",
  "description": "Customer support response time improvement",
  "frequency": 0,
  "format": 7,
  "start_value": 4,
  "current_value": 3,
  "target_value": 2,
  "status": 1,
  "direction": 1,
  "aggregation": 2
}
Penjelasan:
Frequency: 0 = Weekly tracking
Format: 7 = Time Hours (12 hrs)
Direction: 1 = Lower is Better (semakin rendah semakin baik)
Aggregation: 2 = Average (rata-rata semua nilai)
Nilai dalam jam

Example 4: Number Format (Decimal, Higher is Better)#

{
  "objective_id": 4,
  "job_position_id": 6,
  "job_level_id": 2,
  "title": "Increase customer base to 10,000",
  "description": "Total number of active customers",
  "frequency": 2,
  "format": 1,
  "start_value": 5000,
  "current_value": 6500,
  "target_value": 10000,
  "status": 1,
  "direction": 0,
  "aggregation": 0
}
Penjelasan:
Frequency: 2 = Quarterly tracking
Format: 1 = Number Decimal (1,234.56)
Aggregation: 0 = Latest

Example 5: Percent Decimal Format (Higher is Better)#

{
  "objective_id": 5,
  "job_position_id": 7,
  "job_level_id": 3,
  "title": "Achieve customer satisfaction rate of 95.5%",
  "description": "Customer satisfaction survey results",
  "frequency": 1,
  "format": 3,
  "start_value": 85.5,
  "current_value": 90.2,
  "target_value": 95.5,
  "status": 1,
  "direction": 0,
  "aggregation": 2
}
Penjelasan:
Format: 3 = Percent Decimal (12.34%)
Aggregation: 2 = Average

Example 6: Minimal Required Fields Only#

{
  "objective_id": 1,
  "job_position_id": 5,
  "job_level_id": 3,
  "title": "Complete 100 tasks",
  "frequency": 0,
  "format": 0,
  "target_value": 100,
  "direction": 0,
  "aggregation": 0
}
Penjelasan:
Hanya field required saja
start_value dan current_value akan default ke 0
status akan default ke 0 (Draft)
description akan null

Example 7: Yearly Tracking (Number Format)#

{
  "objective_id": 6,
  "job_position_id": 9,
  "job_level_id": 6,
  "title": "Achieve annual sales target of 1 billion",
  "description": "Yearly sales revenue target",
  "frequency": 3,
  "format": 0,
  "start_value": 800000000,
  "current_value": 850000000,
  "target_value": 1000000000,
  "status": 1,
  "direction": 0,
  "aggregation": 1
}
Penjelasan:
Frequency: 3 = Yearly tracking
Format: 0 = Number (1,234)
Aggregation: 1 = Sum

Example 8: Time Format - Minutes (Lower is Better)#

{
  "objective_id": 7,
  "job_position_id": 11,
  "job_level_id": 4,
  "title": "Reduce processing time to 30 minutes",
  "description": "Order processing time improvement",
  "frequency": 1,
  "format": 6,
  "start_value": 60,
  "current_value": 45,
  "target_value": 30,
  "status": 1,
  "direction": 1,
  "aggregation": 2
}
Penjelasan:
Format: 6 = Time Minutes (12 mins)
Direction: 1 = Lower is Better
Aggregation: 2 = Average

Example 9: Draft Status (Not Yet Active)#

{
  "objective_id": 8,
  "job_position_id": 12,
  "job_level_id": 5,
  "title": "Increase website traffic by 50%",
  "description": "Website monthly visitors target",
  "frequency": 1,
  "format": 2,
  "start_value": 10000,
  "current_value": 10000,
  "target_value": 15000,
  "status": 0,
  "direction": 0,
  "aggregation": 0
}
Penjelasan:
Status: 0 = Draft (belum aktif)
Bisa digunakan untuk menyimpan draft sebelum diaktifkan

Example 10: Completed Key Result#

{
  "objective_id": 9,
  "job_position_id": 13,
  "job_level_id": 3,
  "title": "Achieve 100% completion rate",
  "description": "Task completion rate target",
  "frequency": 0,
  "format": 2,
  "start_value": 80,
  "current_value": 100,
  "target_value": 100,
  "status": 2,
  "direction": 0,
  "aggregation": 0
}
Penjelasan:
Status: 2 = Done (sudah selesai)
current_value sudah mencapai target_value

Format Constants Reference#

Frequency#

0 = Weekly
1 = Monthly
2 = Quarterly
3 = Yearly

Format#

0 = Number (1,234)
1 = Number Decimal (1,234.56)
2 = Percent (12%)
3 = Percent Decimal (12.34%)
4 = Currency IDR (Rp 1,234)
5 = Time Seconds (12 secs)
6 = Time Minutes (12 mins)
7 = Time Hours (12 hrs)
8 = Time Days
9 = Time Months
10 = Time Years

Status#

0 = Draft
1 = Active
2 = Done
3 = Archived

Direction#

0 = Higher is Better
1 = Lower is Better

Aggregation#

0 = Latest (gunakan nilai terbaru)
1 = Sum (jumlahkan semua nilai)
2 = Average (rata-rata semua nilai)

cURL Examples#

Example 1: Create Key Result#

Example 2: Minimal Request#


Validation Notes#

1.
objective_id: Harus exist di database dan berada di tenant yang sama dengan user yang login
2.
job_position_id: Harus exist di tabel job_positions
3.
job_level_id: Harus exist di tabel job_levels
4.
title: Maksimal 255 karakter
5.
target_value: Harus numeric (bisa integer atau decimal)
6.
start_value dan current_value: Jika tidak disertakan, akan default ke 0
7.
status: Jika tidak disertakan, akan default ke 0 (Draft)

Common Mistakes to Avoid#

❌ Salah: Menggunakan string untuk numeric values
{
  "target_value": "100"  // ❌ String
}
✅ Benar: Menggunakan number
{
  "target_value": 100  // ✅ Number
}

❌ Salah: Menggunakan nilai yang tidak valid untuk constants
{
  "frequency": 5,  // ❌ Tidak valid (hanya 0-3)
  "direction": 2   // ❌ Tidak valid (hanya 0-1)
}
✅ Benar: Menggunakan nilai yang valid
{
  "frequency": 1,  // ✅ Valid (Monthly)
  "direction": 0   // ✅ Valid (Higher is Better)
}

❌ Salah: Tidak menyertakan required fields
{
  "title": "My Key Result",
  "target_value": 100
  // ❌ Missing: objective_id, job_position_id, job_level_id, frequency, format, direction, aggregation
}
✅ Benar: Menyertakan semua required fields
{
  "objective_id": 1,
  "job_position_id": 5,
  "job_level_id": 3,
  "title": "My Key Result",
  "frequency": 1,
  "format": 0,
  "target_value": 100,
  "direction": 0,
  "aggregation": 0
}
Modified at 2025-12-12 16:51:20
Previous
Update
Next
Store
Built with