# createPipelineItem

Create a pipeline item in a pipeline stage. Requires title and stageId (listPipelineStages); optional priceCents, closeDate, contact/property/user ids. Entering the stage can text or email a real person, as an updatePipelineItem move can: confirm as updatePipelineItem says. The stage must be in a pipeline owned by or shared with your organization, and any linked contactIds/userIds must belong to your organization. userIds is the pipeline item’s TEAM, and My pipeline items shows only pipeline items the viewer is on. The app’s Create Pipeline item form puts its creator on the team, so when acting for a person include the key owner (getMyProfile) unless they name a different team. MONEY AND CUSTOM FIELDS (the whole input is one variable, so discovery cannot expand it). Commission takes ONE source per side, never both: `commissionAmountCents` (a fixed dollar figure in cents) XOR `commissionPercentBps` (basis points (300 = 3%) applied to priceCents); and `teamSplitAmountCents` XOR `teamSplitPercentBps` (basis points applied to the resulting COMMISSION, not the price). Sending both halves of a pair with values is rejected; sending one explicitly as null CLEARS that side. The server derives `commissionCents` (GCI) and returns it: read it there. A percent re-derives when priceCents changes; an amount does not. `participantSplits` is [{ userId, splitAmountCents | splitPercentBps }] allocating what remains after the team fee, and it must not exceed the pool. `customFieldValues` is [{ customFieldId (from listPipelineItemCustomFields (pipeline item fields are PER-PIPELINE), and exactly ONE of textValue (TEXT/LINK) | numberValue (NUMBER/DOLLAR, a plain number, NOT cents) | dateValue (DATE, ISO 8601) | dropdownSelectedValues (DROPDOWN) the option LABEL strings, not option ids) matching the field’s type }]. The response echoes the money and custom fields: confirm the write from it.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "createPipelineItem", "variables": {...} }`
- Scope: `WRITE`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

- `input`: `CreatePipelineItemInput!` (required)
  - `title`: `String!` (required)
  - `stageId`: `ID!` (required)
  - `description`: `String`
  - `priceCents`: `BigInt`
  - `commissionAmountCents`: `BigInt`
  - `commissionPercentBps`: `Int`
  - `teamSplitAmountCents`: `BigInt`
  - `teamSplitPercentBps`: `Int`
  - `participantSplits`: `[PipelineItemParticipantSplitInput!]`
    - `userId`: `ID!` (required)
    - `splitAmountCents`: `BigInt`
    - `splitPercentBps`: `Int`
  - `closeDate`: `DateTime`
  - `propertyIds`: `[ID!]`
  - `propertyStrings`: `[String!]`
  - `contactIds`: `[ID!]`
  - `userIds`: `[ID!]`
  - `fileIds`: `[ID!]`
  - `customFieldValues`: `[PipelineItemCustomFieldValueInput!]`
    - `customFieldId`: `ID!` (required)
    - `textValue`: `String`
    - `dateValue`: `DateTime`
    - `numberValue`: `Float`
    - `dropdownSelectedValues`: `[String!]`
    - `booleanValue`: `Boolean`. CHECKBOX: true checks; false or null unchecks.

## Response (data, an example)

```json
{
  "pipelineItemMutation": {
    "createPipelineItem": {
      "id": "<ID>",
      "title": "…",
      "priceCents": "…",
      "closeDate": "2026-01-01T00:00:00.000Z",
      "isArchived": true,
      "updatedAt": "2026-01-01T00:00:00.000Z",
      "createdAt": "2026-01-01T00:00:00.000Z",
      "commissionCents": "…",
      "commissionAmountCents": "…",
      "commissionPercentBps": 0,
      "teamSplitAmountCents": "…",
      "teamSplitPercentBps": 0,
      "participantSplits": [
        {
          "user": {
            "id": "<ID>",
            "firstName": "…",
            "lastName": "…"
          },
          "splitAmountCents": "…",
          "splitPercentBps": 0
        }
      ],
      "customFieldValues": [
        {
          "id": "<ID>",
          "textValue": "…",
          "dateValue": "2026-01-01T00:00:00.000Z",
          "numberValue": 0,
          "dropdownSelectedValues": [
            "…"
          ],
          "pipelineItemCustomField": {
            "id": "<ID>",
            "name": "…",
            "type": "DROPDOWN"
          }
        }
      ],
      "stage": {
        "id": "<ID>",
        "name": "…"
      },
      "pipeline": {
        "id": "<ID>",
        "name": "…"
      },
      "contacts": [
        {
          "id": "<ID>",
          "name": "…"
        }
      ],
      "properties": [
        {
          "id": "<ID>",
          "address": {
            "addressFull": "…"
          }
        }
      ],
      "contactRoles": [
        {
          "contactId": "<ID>",
          "role": {
            "id": "<ID>",
            "name": "…"
          }
        }
      ],
      "agent": {
        "id": "<ID>",
        "firstName": "…",
        "lastName": "…"
      }
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "createPipelineItem",
    "variables": {
      "input": {
        "title": "<String>",
        "stageId": "<stageId>"
      }
    }
  }'
```
