> ## 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.

# split_record

> Split a data table record between several users — a deal shared by two reps.

Split a record between several users — a deal shared by two reps.

Each part becomes a new record named after the original ("\<name> - Split
\#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. They pick the parts up at the next automatic recalculation, or
when someone refreshes them.

Requires write permission on data tables. Not available on demonstration
companies. Available only where the Qobra write tools beta is enabled. Every
write is recorded in the audit trail as the `Qobra MCP` agent.

## Parameters

<Accordion title="Body" defaultOpen>
  <ParamField body="record_id" type="string" required>
    Id of the record to split — the id list\_data\_table\_records returns.
  </ParamField>

  <ParamField body="user_field_id" type="string" required>
    Id of the user field that says whose each part is — the deal owner,
    typically. A field of type user from get\_data\_table.
  </ParamField>

  <ParamField body="splits" type="object[]" required>
    The parts, at least two: one new record per part.

    <Expandable title="object properties">
      <ParamField body="user_id" type="string" required>
        Id of the user this part goes to — the id a user reference carries.
      </ParamField>

      <ParamField body="values" type="object[]" required>
        The numeric fields this part overrides. A field left out keeps the
        original record's value.

        <Expandable title="object properties">
          <ParamField body="field_id" type="string" required>
            Id of a numeric field (amount, float or percentage) of the
            record — a field id get\_data\_table returns.
          </ParamField>

          <ParamField body="value" type="number" required>
            This part's value for the field: a number for an amount or a
            float, and the ratio for a percentage (0.8 for 80%).
          </ParamField>
        </Expandable>
      </ParamField>
    </Expandable>
  </ParamField>

  <ParamField body="reason" type="string">
    Why the record is split — one of the table's `adjustment_reasons` from
    get\_data\_table. Required only when that list is not null; omit it
    otherwise.
  </ParamField>

  <ParamField body="comment" type="string">
    Optional note kept in the records' history.
  </ParamField>
</Accordion>

The call is refused, with a message naming the problem, when no record has the
`record_id`, when the record is already archived, when fewer than two parts are
passed, when `user_field_id` is not a user field of the table, when a part
lists a field that is not numeric or lists a field twice, or when the table
requires a `reason` and none from its `adjustment_reasons` was passed.

## Example

```json theme={null}
{
  "record_id": "665f1c2e8a4b3d0012a7ea10",
  "user_field_id": "665f1c2e8a4b3d0012a7e9f6",
  "splits": [
    {
      "user_id": "665f1c2e8a4b3d0012a7eb01",
      "values": [{ "field_id": "665f1c2e8a4b3d0012a7e9f3", "value": 9000 }]
    },
    {
      "user_id": "665f1c2e8a4b3d0012a7eb02",
      "values": [{ "field_id": "665f1c2e8a4b3d0012a7e9f3", "value": 6000 }]
    }
  ],
  "reason": "Shared deal",
  "comment": "Co-sold by two account executives."
}
```

## Response

<Accordion title="Body" defaultOpen>
  <ResponseField name="data_table" type="object">
    The table of the records, whose `fields` header names their values in
    order — the same row list\_data\_tables returns. See
    [`list_data_tables`](/mcp_documentation/tools/list_data_tables) for the
    full field breakdown.
  </ResponseField>

  <ResponseField name="parts" type="object[]">
    The records created, one per part, in the order sent — the same rows
    list\_data\_table\_records returns. See
    [`list_data_table_records`](/mcp_documentation/tools/list_data_table_records)
    for the full field breakdown.
  </ResponseField>

  <ResponseField name="original" type="object">
    The record that was split, now archived.
  </ResponseField>
</Accordion>
