Skip to main content
Create a compensation, one commission rule, on a plan: empty, or a copy of source_compensation_id. It is always created as a draft, which changes no statement until it is published (update_compensation). Created empty, it has no scope, no variable, no formula and no payment rule: configure it with ask_architect. A copy takes the source as get_plan lists it (its published version, with its scopes, variables and rule) under the name you give, with the source’s cadence and window unless you pass them. A copy feeds no reporting metric. The source may be on the plan itself or on another plan of the same environment. Read the compensation back with get_plan. The call is refused for an archived plan, a source from another environment than the plan, a blank name, start_date or end_date passed alone, or an end before the start. 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. 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

Body

string
required
Id of the plan, as list_plans returns it; an archived plan is refused. The plan decides the environment, so there is no sandbox_id.
string
required
Display name of the compensation; a blank name is refused.
string
How often the compensation is calculated, on the company’s fiscal calendar. EACH_MONTH every month; EACH_MONTH_EXCEPT_END_OF_QUARTER every month but the one each quarter closes on; EACH_QUARTER, EACH_SEMESTER and EACH_YEAR at each period’s close; Q1-Q4 once a year, at that quarter’s close only. A compensation bounded to a window is calculated at most once: on the statement closing the period of its cadence that holds the window’s last day, and never when its cadence does not calculate on that period. Omit for EACH_MONTH, or the source’s cadence when copying one. One of: EACH_MONTH, EACH_MONTH_EXCEPT_END_OF_QUARTER, EACH_QUARTER, Q1, Q2, Q3, Q4, EACH_YEAR, EACH_SEMESTER.
string
YYYY-MM-DD; the first day of the compensation’s window, as the web app takes it. Pass it with end_date to bound the compensation to that window, or omit both to leave it recurring, calculated on each period of its cadence; when copying one, omit both to keep the source’s window. A compensation bounded to a window is calculated once, over the records of the whole window, on the statement closing the period of its cadence that holds end_date (with EACH_MONTH, the period of end_date itself): the statements of the periods before carry no line for it. A cadence that does not calculate on that period never calculates it: EACH_MONTH_EXCEPT_END_OF_QUARTER with an end_date in a quarter’s last month, or Q1-Q4 with an end_date outside that quarter, on the company’s fiscal calendar. To pay every period over a limited time, leave the compensation recurring on a plan of its own whose members are bounded to that time (the start_period and end_period of their attribution, create_plan, update_plan). An attribution is month-granular, and a period of the cadence it touches is calculated over all of its records: the limit is exact with EACH_MONTH, or when the attribution covers whole periods of the cadence, and a quarterly compensation limited from February to April still pays the records of January and of May and June. An attribution covers every compensation of its plan, so bounding the members of a shared plan ends all of them.
string
YYYY-MM-DD; the last day of the window, included. Never without start_date, and not before it.

Response

Body

object
The new compensation, as get_plan lists it, so the id can be reused straight away. See get_plan for the full field breakdown.