# setEmployeeCallTransfers

Set who an AI employee puts a live call through to when a caller asks for someone. `destinations` REPLACES the saved list (send every one to keep; `[]` turns transfers off): each is `{ name, phoneLineId }`, `name` the person as callers ask for them (unique ignoring case), `phoneLineId` one of the organization's own lines, an `organization.twilioPhoneNumbers[].id` from listCommunicationChannels (its `user.id` is the teammate the line belongs to; listTeamMembers names them). At most 10. The call rings that line's routing, so a number the organization does not own, such as a personal cell, cannot be one. This is the live transfer: a line in its instructions alone makes it say it is transferring on a call that never connects. Refused on an employee with no call channel (getEmployee `configDocument.channels.callConfig` absent). Pass `expectedUpdatedAt`. On an employee that is switched on it takes effect on its next run: needs their yes; a card’s counts.

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

## Variables

- `employeeId`: `ID!` (required)
- `destinations`: `[ContactAgentCallTransferDestinationInput!]!` (required)
  - `name`: `String!` (required)
  - `phoneLineId`: `ID!` (required)
- `expectedUpdatedAt`: `DateTime`

## Response (data, an example)

```json
{
  "aiEmployeesMutation": {
    "setAiEmployeeCallTransfers": {
      "id": "<ID>",
      "name": "…",
      "config": {
        "channels": {
          "callConfig": {
            "transferDestinations": [
              {
                "name": "…",
                "phoneLineId": "<ID>"
              }
            ]
          }
        }
      },
      "updatedAt": "2026-01-01T00:00:00.000Z"
    }
  }
}
```

## 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": "setEmployeeCallTransfers",
    "variables": {
      "employeeId": "<employeeId>",
      "destinations": [
        {
          "name": "<String>",
          "phoneLineId": "<phoneLineId>"
        }
      ]
    }
  }'
```
