> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qobra.co/llms.txt
> Use this file to discover all available pages before exploring further.

# create_compensation

> Create a compensation — one commission rule — on a plan. The compensation starts empty and in draft; no statement changes until it is published.

Create a compensation — one commission rule — on a compensation plan.

The compensation is created empty and in draft: no scope, no variable, no
formula, no payment rule. It shows up on the plan's design view and changes
nobody's statement until it is configured and published. Read it back with
[`get_plan`](/mcp_documentation/tools/get_plan).

Which environment it lands in comes from the plan, so a plan you can't access
reads exactly like one that doesn't exist — a plan living in a sandbox you may
not read included. There is no `sandbox_id` argument on this tool for the same
reason.

Available only where the Qobra write tools beta is enabled. Every write to the
live environment is recorded in the audit trail as the `Qobra MCP` agent;
writes to a sandbox are not audited.

## Parameters

<Accordion title="Body" defaultOpen>
  <ParamField body="plan_id" type="string" required>
    Id of the plan the compensation hangs off — the id list\_plans returns.
    The plan also decides which environment the compensation lands in, so
    there is no sandbox argument here.
  </ParamField>

  <ParamField body="name" type="string" required>
    Display name of the compensation, as people will read it on the plan —
    'New business commission', 'Q1 accelerator'.
  </ParamField>

  <ParamField body="calculation_trigger" type="string">
    How often the compensation is calculated. Defaults to `EACH_MONTH`.
  </ParamField>

  <ParamField body="start_date" type="string">
    YYYY-MM; the first month the compensation applies to. Pass it with
    `end_date` to bound the compensation to a window, or omit both to leave
    it recurring (applying every period).
  </ParamField>

  <ParamField body="end_date" type="string">
    YYYY-MM; the last month the compensation applies to, included. Goes
    together with `start_date`.
  </ParamField>
</Accordion>

## Response

<Accordion title="Body" defaultOpen>
  <ResponseField name="compensation" type="object">
    The compensation as it now exists — the same row get\_plan lists on the
    plan, so the id can be reused straight away.
  </ResponseField>
</Accordion>
