parts and the archived original.
Each part is a new local record named after the original
(“<name> - Split #N”, N from 1): a copy of it, with its own user in
user_field_id and its own values for the numeric fields listed. The original
is archived. Nothing checks that the parts add up to the original, as in the
web app, so send values that do.
Call get_data_table first for the id of the user field and of the numeric
fields to split, and for its adjustment_reasons.
Statements are not recalculated by this call, just as when a record is split in
the web app. To refresh them, call
recalculate_statements on
the users and the period the parts count for.
Without full write access to data tables, write through a view of the table
shared with you with edit rights, passed as view_id: the record and every
part have to fall inside the view’s filter.
Requires write permission on data tables, or a view shared with edit rights.
Every write is recorded in the audit trail as the Qobra MCP agent.
Parameters
Body
Body
string
required
Id of the data table holding the record, from list_data_tables.
string
required
Id of the record to split, from list_data_table_records.
string
required
Id of the editable user field saying whose each part is (the deal owner,
typically), from get_data_table.
object[]
required
The parts, at least two: one new record each.
string
One of the table’s
adjustment_reasons (get_data_table): required when that
list is not null, refused when it is null (use comment for a free-text
note).string
Free-text note kept in the records’ history.
string
Id of one of the table’s
views, to write through. Required when your write
access comes from shared views (only records its filter holds can be
written); omit it with full write access.data_table_id, when no record of that table has the record_id (or none
the view_id’s filter holds), when the record is already archived, when fewer
than two parts are passed, when user_field_id is not an editable user field
of the table, when a part lists a field that is not an editable amount, float
or percentage field of the table, or lists a field twice, when a part would
fall outside the view_id’s filter, when the table requires a reason and
none from its adjustment_reasons was passed, or when a reason is passed but
the table takes none.
Example
Response
Body
Body
object
The table of the records; its
fields name their values in order. It is
the same row list_data_tables returns. See
list_data_tables for the
full field breakdown.object[]
The records created, one per part, in the order sent: the same rows
list_data_table_records returns. See
list_data_table_records
for the full field breakdown.object
The record that was split, now archived.