---
title: "Recalculate a Quote/Contract/Rebate Agreement/Compensation Plan"
method: POST
path: "/clicmanager.calculate/{typedId}"
tags: ["Sales Compensations", "Clicmanager"]
---

# Recalculate a Quote/Contract/Rebate Agreement/Compensation Plan

`POST /clicmanager.calculate/{typedId}`

## Request

- Base URL: `https://companynode.pricefx.com/pricefx/companypartition`
- URL: `https://companynode.pricefx.com/pricefx/companypartition/clicmanager.calculate/{typedId}`
- Auth: one of:
  - HTTP basic
  - API key in header `X-PriceFx-jwt`
- TypeScript: <https://skmtc.dev/pricefx/apis/the-pricefx-backend-api/docs/clicmanager.calculate/:typedId/post.ts> (a function with typed inputs; its response is checked against the schema)

Calculates a Quote, Contract, Rebate Agreement, or Compensation Plan.<p>

Triggers a synchronous recalculation of the given CLIC document.

If a header formula calls `switchToAsync()` during the pre-phase, the synchronous
calculation is aborted, all changes are rolled back, and an asynchronous job is created
instead. In that case the response contains a `JobStatusTracker` object instead of the
calculated CLIC header.

**Use the `typedId` field in `response.data[0]` to distinguish the response type:**
- CLIC header — `typedId` ends with `.Q`, `.C`, `.RA`, or `.CO` (e.g. `42.Q`)
- JobStatusTracker (async) — `typedId` ends with `.JST` (e.g. `107.JST`)

>This endpoint is used in the **REACT** version only. It is not advisable to mix REACT endpoints together with Ember endpoints.

## Query parameters

- `validationType` string

## Response `200`

OK

- object
  - `response` object
    - `node` string
    - `data` object[]: Contains the calculated CLIC header + computation stats on synchronous completion, or a single JobStatusTracker object when the calculation was switched to async. Inspect `typedId` to distinguish: `.JST` suffix means async, `.Q`/`.C`/`.RA`/`.CO` means synchronous result.
      - `outputs` object[]
      - `lastUpdateByName` string
      - `createdByName` string
      - `typedId` string: Unique identifier of the returned object. The suffix indicates the type: `.Q` (Quote), `.C` (Contract), `.RA` (Rebate Agreement), `.CO` (Compensation Plan) for synchronous results, or `.JST` for a JobStatusTracker when the calculation was switched to async.
      - `workflowStatus` string
      - `inputs` object[]
        - `name` string
        - `label` string
        - `url` string
        - `type` string
        - `inputs` object[]
        - `parameterConfig` object
        - `formattingOptions` object
        - `value` object
          - `Helptext` string
          - `Title` string
          - `helplink` string
          - `Placeholder` string
          - `CustAttrName` string
          - `CustAttrValue` string
          - `Exportable` boolean
          - `Importable` boolean
          - `Configurator` object
          - `InlineConfigurator` object
            - `Checkbox1` boolean
          - `InputMatrix` object[]
            - `name` string
            - `comment` string
            - `oneof` string
          - `Option` string
          - `Options` string
      - `lastUpdateDate` string
      - `serverMessagesExtended` object[]
        - `key` string
        - `message` string
      - `quoteType` string
      - `quoteStatus` string
      - `expiryDate` string
      - `createDate` string
      - `dirty` boolean
      - `refreshInputs` boolean
      - `rootUniqueName` string
      - `numberOfAttachments` integer
      - `targetDate` string
      - `ioMeta` object
        - `inputs` object
        - `outputs` object
      - `originDeleted` boolean
      - `label` string
      - `version` integer
      - `uniqueName` string
      - `serverMessages` string[]
      - `createdBy` integer
      - `viewState` object
      - `calculationStatus` integer
      - `hasWorkflowHistory` boolean
      - `nodeId` integer
      - `lastUpdateBy` integer
      - `status` string
      - `folderChanged` boolean: Returns `true` when a folder is added, renamed, deleted, or moved.
      - `inputChanged` string[]: Returns `lineId` when an input is added, or updated by a header logic.
      - `outputChanged` string[]: Returns `lineId` when an output is added, or updated by a header logic.
      - `durations` object: Stats result of the currently performed calculation.
        - `header` object[]
          - `name` string
          - `duration` integer
        - `items` object[]
    - `status` integer

---

[API](https://skmtc.dev/pricefx/apis/the-pricefx-backend-api.md) - [All operations](https://skmtc.dev/pricefx/apis/the-pricefx-backend-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pricefx/apis/the-pricefx-backend-api/revisions/23d941b00ac0?raw)
