# bulkCreateDealsOnContacts

A new deal per contact from a createDeal `deal` template (the bulk bar's Add to pipeline). propertyAttachmentMode ALL attaches each contact's properties as the bulk bar does (default NONE); skipContactsWithDeal skips contacts that have a deal; autoNameDeals titles each from its contact and property. A background task (`bulkTaskId`, getBulkTask). Every new deal has a contact, so it wakes stage and contact workflows: it needs their yes; a card's counts.

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

## Variables

- `contactIds`: `[String!]!` (required)
- `deal`: `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!]`
- `propertyAttachmentMode`: `BulkPipelineItemPropertyAttachmentMode` (one of `FIRST_VERIFIED`, `ALL_VERIFIED`, `ALL`, `NONE`)
- `skipContactsWithDeal`: `Boolean`
- `autoNameDeals`: `Boolean`

## Response (data, an example)

```json
{
  "dealMutation": {
    "bulkCreateDealsOnContacts": {
      "mode": "SYNC",
      "bulkTaskId": "…"
    }
  }
}
```

## 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": "bulkCreateDealsOnContacts",
    "variables": {
      "contactIds": [
        "<String>"
      ],
      "deal": {
        "title": "<String>",
        "stageId": "<stageId>"
      }
    }
  }'
```
