---
title: "Update a guideline"
method: PATCH
path: "/v1/org/{orgId}/guideline/{id}"
tags: ["guideline"]
---

# Update a guideline

`PATCH /v1/org/{orgId}/guideline/{id}`

## Path parameters

- `orgId` string, required
- `id` string, required

## Request body

- UpdateGuideline
  - `label` string — 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 — the field the guideline applies to
  - `sourceField` string — the field the guideline is calculated from
  - `calculationType` 'RANGE' | 'TARGET' — how does the guideline calculate the target value? e.g. is there a range (min/max) or only a target
  - `flagMode` 'DEVIATION_THRESHOLD' | 'NONE' — 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 — whether or not the target values from the guidelines are pre-populated in the given columns
  - `basisType` 'CUSTOM' | 'FIXED' | 'CUSTOM_FIXED' | 'PERCENTAGE' | 'CUSTOM_PERCENTAGE' — 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 `204`

No Content

---

[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/2de21f45f447/schema)
