---
title: "Create a new guideline"
method: POST
path: "/v1/org/{orgId}/guideline"
tags: ["guideline"]
---

# Create a new guideline

`POST /v1/org/{orgId}/guideline`

## Path parameters

- `orgId` string, required

## Request body

- CreateGuideline
  - `compReviewId` string, required — comp review id
  - `label` string, required — guideline name
  - `budgetPoolId` string — the budget pool the guideline is allocated from
  - `participantsExpr` string — CQL filter to determine which employees the guideline applies to
  - `appliedField` string, required — the field the guideline applies to
  - `sourceField` string, required — the field the guideline is calculated from
  - `calculationType` 'RANGE' | 'TARGET', required — how does the guideline calculate the target value? e.g. is there a range (min/max) or only a target
  - `flagMode` 'DEVIATION_THRESHOLD' | 'NONE', required — how does the guideline indicate deviations from the target amount
  - `flagDeviationThreshold` number — the threshold (percent) against which deviations from the guideline are flagged
  - `enablePopulateValue` boolean, required — whether or not the target values from the guidelines are pre-populated in the given columns
  - `basisType` 'CUSTOM' | 'FIXED' | 'CUSTOM_FIXED' | 'PERCENTAGE' | 'CUSTOM_PERCENTAGE', required — how an individual guideline value itself is calculated, e.g. percentage of the appliedField, fixed amount, or custom CQL
  - `basisExpr` string — if basisType.CUSTOM, the custom CQL expression used to generate the guideline value
  - `basisFieldMatrix` BasisFieldMatrix
    - `includedFields` string[], required
    - `conditions` BasisCondition[], required
      - `conditionExpr` string, required
      - `amountRange` MoneyRange
        - `max` Money
          - `amount` number, required
          - `currency` string, required
          - `places` integer
        - `min` Money
          - `amount` number, required
          - `currency` string, required
          - `places` integer
        - `target` Money
          - `amount` number, required
          - `currency` string, required
          - `places` integer
      - `valueRange` ValueRange
        - `max` number — the maximum value in the range (type = BigDecimal)
        - `min` number — the minimum value in the range (type = BigDecimal)
        - `target` number — the target value for the range (type = BigDecimal)
  - `fixedAmountRange` MoneyRange
    - `max` Money
      - `amount` number, required
      - `currency` string, required
      - `places` integer
    - `min` Money
      - `amount` number, required
      - `currency` string, required
      - `places` integer
    - `target` Money
      - `amount` number, required
      - `currency` string, required
      - `places` integer
  - `fixedValueRange` ValueRange
    - `max` number — the maximum value in the range (type = BigDecimal)
    - `min` number — the minimum value in the range (type = BigDecimal)
    - `target` number — the target value for the range (type = BigDecimal)

## Response `201`

Created

---

[API](https://skmtc.net/charthop/apis/charthop-api.md) · [All operations](https://skmtc.net/charthop/apis/charthop-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/charthop/charthop-api/revisions/26da34ae934f/schema)
