# runEmployeesOnContacts

Put AI employees on contacts and wake each pairing once (runNow, default true), and/or on a `schedule` (cron, timezone, maxRuns; no denser than daily). `message` (max 2000 chars) is an internal instruction carried into every run; the contact never sees it. Employees must be switched on. Like attachEmployeeToContacts it puts back a contact someone took that employee off (unless they did so after this call), so leave those out first. A contact the employee already has a follow-up booked for (`nextBookedFollowUpAt` on getEmployeeCaseload) gets a second touch before that one: say how many of the batch have one, so the person can choose. A bulk task (`bulkTaskId`, getBulkTask). The person approves it on a card.

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

## Variables

- `employeeIds`: `[ID!]!` (required)
- `contactIds`: `[String!]!` (required)
- `message`: `String`
- `runNow`: `Boolean` (default `true`)
- `schedule`: `BulkAiEmployeeScheduleInput`
  - `cronExpression`: `String!` (required). Standard 5-field cron expression, interpreted in `timezone`.
  - `timezone`: `String!` (required). IANA zone the expression is read in, e.g. America/New_York.
  - `maxRuns`: `Int!` (required). Fires allowed before the schedule retires itself. Required: a selection-wide open-ended cadence is not creatable here.

## Response (data, an example)

```json
{
  "contactMutation": {
    "createBulkTriggerAgentSessionTask": {
      "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": "runEmployeesOnContacts",
    "variables": {
      "employeeIds": [
        "<employeeIds>"
      ],
      "contactIds": [
        "<String>"
      ]
    }
  }'
```
