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 in the Qobra web app. 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.
How a window is calculated
A compensation bounded to a window is not paid period by period. Qobra calculates it once, over the records of the whole window, on the statement closing the period of its cadence that holdsend_date. With EACH_MONTH,
that is the period of end_date itself. The statements of the periods before
carry no line for it.
If the cadence does not calculate on that period, the compensation is never
calculated. For example:
EACH_MONTH_EXCEPT_END_OF_QUARTERwith anend_datein a quarter’s last month,Q1–Q4with anend_dateoutside that quarter, on the company’s fiscal calendar.
start_period and end_period of their attribution
(create_plan,
update_plan). An attribution is
month-granular, and Qobra calculates any period of the cadence it touches over
all of that period’s records. The limit is exact with EACH_MONTH, or when the
attribution covers whole periods of the cadence. A quarterly compensation
limited from February to April still pays the records of January, May and
June. An attribution covers every compensation of its plan, so bounding the
members of a shared plan ends all of them.
Copy an existing compensation
Passsource_compensation_id to copy a compensation instead of starting from
an empty one. The new compensation copies the source as get_plan lists it
(its published version), scopes, variables and rule included, under the name
you give. It keeps the source’s cadence and window unless you pass
calculation_trigger, start_date or end_date. The copy is a draft too,
and feeds no reporting metric yet.
The source may sit on the target plan itself or on another plan of the same
environment. Qobra refuses a source from a plan of another environment.
update_compensation once it
is ready.
Parameters
Body
Body
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.
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.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.
YYYY-MM-DD; the last day of the window, included. Never without start_date,
and not before it.
Response
Body
Body
The new compensation, as get_plan lists it, so the id can be reused
straight away. See
get_plan for the
full field breakdown.