# NICE CXone

> Run your NICE CXone contact centre from workflows: see agents, queues and contacts in real time, pull contact and performance reports, schedule callbacks and manage do-not-call lists, and start workflows when a contact ends or is abandoned or an agent's state changes.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/nice-cxone

## Actions

### Add number to DNC group

Add a phone number to a do-not-call group, so the outbound skills checked against it never dial it.

**Inputs**

- DNC group (`dnc_group_id`, text, required): The do-not-call group. Pick one, or give its id.
- Phone number (`phone_number`, text, required): The phone number, with or without spaces and brackets.
- Expires (`expires_on`, date and time): When the number may be called again. Leave empty for never.

**Outputs**

- `dnc_group_id` (number): The group
- `formatted_phone` (text): The number as CXone stored it
- `phone_number` (text): The number, as digits

**Example output**

```json
{
  "dnc_group_id": 31,
  "formatted_phone": "8015550123",
  "phone_number": "8015550123"
}
```

### Delete scheduled callback

Cancel a scheduled callback that hasn't been made yet.

**Inputs**

- Callback ID (`callback_id`, text, required): The callback's id, from 'Schedule callback' or 'List scheduled callbacks'.

**Outputs**

- `callback_id` (number): The callback cancelled
- `deleted` (true/false): True once it is gone

**Example output**

```json
{
  "callback_id": 556677,
  "deleted": true
}
```

### Get agent

Get one agent's profile: name, email, team, supervisor and status.

**Inputs**

- Agent (`agent_id`, text, required): The agent. Pick one, or give their agent id.

**Outputs**

- `agent` (object): The agent

**Example output**

```json
{
  "agent": {
    "agentId": 30387543,
    "createDate": "2025-02-01T16:00:00.000Z",
    "emailAddress": "jo.bloggs@example.com",
    "firstName": "Jo",
    "isActive": true,
    "isSupervisor": false,
    "lastLogin": "2026-11-12T14:03:00.000Z",
    "lastName": "Bloggs",
    "location": "Salt Lake City",
    "reportToName": "Sam Lee",
    "teamId": 1234,
    "teamName": "Support",
    "timeZone": "Mountain Standard Time",
    "userName": "jo.bloggs@example.com"
  }
}
```

### Get agent performance

Get each agent's contacts handled, refused and handle time for a period, or one agent's. The period is widened to whole quarter hours.

**Inputs**

- From (`start_date`, date and time, required): The start of the period.
- Until (`end_date`, date and time, required): The end of the period, at most 30 days after the start.
- Agent (`agent_id`, text): The agent. Pick one, or give their agent id.

**Outputs**

- `agents` (list): Each agent's performance
- `count` (number): How many came back
- `end_date` (text): The end used
- `start_date` (text): The start used

**Example output**

```json
{
  "agents": [
    {
      "agentId": 30387543,
      "agentOffered": 41,
      "inboundHandled": 38,
      "loginTime": "PT7H45M",
      "occupancy": 81.5,
      "outboundHandled": 2,
      "refused": 1,
      "teamId": 1234,
      "totalAvgHandleTime": "PT5M2S",
      "totalHandled": 40
    }
  ],
  "count": 1,
  "end_date": "2026-11-14T00:00:00Z",
  "start_date": "2026-11-13T00:00:00Z"
}
```

### Get agent states

See what agents are doing right now: Available, Unavailable (and why), on a contact or logged out. For everyone, or one agent.

**Inputs**

- Agent (`agent_id`, text): The agent. Pick one, or give their agent id.
- Changed since (`updated_since`, date and time): Only those that changed after this time.
- Page size (`top`, number): How many to return, 1 to 1,000. From 1 to 1000.
- Skip (`skip`, number): How many to skip before this page. Use the 'next_skip' an earlier run gave to read on. At least 0.

**Outputs**

- `agent_states` (list): Each agent's current state
- `count` (number): How many came back on this page
- `next_skip` (number): The Skip to ask for next, or 0 when there are no more
- `skip` (number): How many were skipped before this page
- `total_records` (number): How many CXone says there are in all

**Example output**

```json
{
  "agent_states": [
    {
      "agentId": 30387543,
      "agentStateId": 2,
      "agentStateName": "Unavailable",
      "contactId": 0,
      "firstName": "Jo",
      "lastName": "Bloggs",
      "lastUpdateTime": "2026-11-13T12:00:05.000Z",
      "outStateDescription": "Lunch",
      "outStateId": 12,
      "skillName": "",
      "startDate": "2026-11-13T12:00:05.000Z",
      "teamId": 1234,
      "teamName": "Support"
    }
  ],
  "count": 1,
  "next_skip": 0,
  "skip": 0,
  "total_records": 1
}
```

### Get contact

Get one contact (a call, chat, email or other interaction), active or finished.

**Inputs**

- Contact ID (`contact_id`, text, required): The contact's id, from a list step or a trigger.

**Outputs**

- `contact` (object): The contact

**Example output**

```json
{
  "contact": {
    "abandoned": false,
    "acwSeconds": 18.6,
    "agentId": 30387543,
    "agentSeconds": 330.1,
    "campaignName": "Support",
    "contactId": 492837465,
    "contactStartDate": "2026-11-13T15:04:11.000Z",
    "dispositionNotes": "Reset the customer's password",
    "endReason": "Contact Hung Up",
    "firstName": "Alex",
    "fromAddress": "8015550123",
    "holdSeconds": 0,
    "inQueueSeconds": 42.5,
    "isOutbound": false,
    "lastName": "Rivera",
    "lastUpdateTime": "2026-11-13T15:10:42.000Z",
    "masterContactId": 492837465,
    "mediaTypeId": 4,
    "mediaTypeName": "Phone Call",
    "pointOfContactName": "Support line",
    "primaryDispositionId": 77,
    "skillId": 4354,
    "skillName": "Support Phone",
    "teamId": 1234,
    "teamName": "Support",
    "toAddress": "8005550100",
    "totalDurationSeconds": 391.2
  }
}
```

### Get report job

Get a report job's state, and its result file's address once it has finished.

**Inputs**

- Job ID (`job_id`, text, required): The job's id, from 'Start report job' or a trigger.

**Outputs**

- `job` (object): The report job

**Example output**

```json
{
  "job": {
    "deleteTime": "2026-11-14T15:21:10.000Z",
    "fileName": "Daily contact detail_20261113.csv",
    "jobEnd": "2026-11-13T15:21:10.000Z",
    "jobId": 99120,
    "jobStart": "2026-11-13T15:20:00.000Z",
    "reportId": 1501,
    "reportName": "Daily contact detail",
    "resultFileURL": "https://api-na1.niceincontact.com/inContactAPI/services/v30.0/files?fileName=Daily%20contact%20detail_20261113.csv",
    "state": "Finished"
  }
}
```

### Get skill

Get one skill's settings: channel, campaign, outbound or not, and more.

**Inputs**

- Skill (`skill_id`, text, required): The skill (queue). Pick one, or give its id.

**Outputs**

- `skill` (object): The skill

**Example output**

```json
{
  "skill": {
    "campaignId": 120,
    "campaignName": "Support",
    "isActive": true,
    "isOutbound": false,
    "mediaTypeId": 4,
    "mediaTypeName": "Phone Call",
    "notes": "Main support line",
    "skillId": 4354,
    "skillName": "Support Phone"
  }
}
```

### Get skill activity

See each skill's queue right now: contacts waiting, agents available and working, and the service level. For every skill, or one.

**Inputs**

- Skill (`skill_id`, text): Only this skill (queue).
- Channel (`media_type`, text): Only this channel, such as phone calls or chat. One of: `4` (Phone call), `1` (Email), `3` (Chat), `5` (Voicemail), `6` (Work item), `7` (SMS), `8` (Social), `9` (Digital), `2` (Fax).
- Changed since (`updated_since`, date and time): Only those that changed after this time.

**Outputs**

- `count` (number): How many came back
- `skills` (list): Each skill's activity now

**Example output**

```json
{
  "count": 1,
  "skills": [
    {
      "agentsAvailable": 2,
      "agentsLoggedIn": 11,
      "agentsUnavailable": 3,
      "agentsWorking": 6,
      "contactsActive": 9,
      "earliestQueueTime": "2026-11-13T15:08:00.000Z",
      "mediaTypeName": "Phone Call",
      "queueCount": 3,
      "serviceLevel": 87,
      "skillId": 4354,
      "skillName": "Support Phone"
    }
  ]
}
```

### Get skill summaries

Get each skill's totals for a period: contacts offered, handled and abandoned, handle time and service level. For every skill, or one.

**Inputs**

- From (`start_date`, date and time, required): The start of the period.
- Until (`end_date`, date and time, required): The end of the period, at most 30 days after the start.
- Skill (`skill_id`, text): Only this skill (queue).
- Channel (`media_type`, text): Only this channel, such as phone calls or chat. One of: `4` (Phone call), `1` (Email), `3` (Chat), `5` (Voicemail), `6` (Work item), `7` (SMS), `8` (Social), `9` (Digital), `2` (Fax).

**Outputs**

- `count` (number): How many came back
- `skills` (list): Each skill's totals

**Example output**

```json
{
  "count": 1,
  "skills": [
    {
      "abandonCount": 14,
      "abandonRate": 3,
      "averageHandleTime": "PT5M12S",
      "averageSpeedToAnswer": "PT31S",
      "contactsHandled": 398,
      "contactsOffered": 412,
      "mediaTypeName": "Phone Call",
      "serviceLevel": 88,
      "skillId": 4354,
      "skillName": "Support Phone"
    }
  ]
}
```

### List active contacts

List the contacts in progress right now (in the IVR, waiting in queue or with an agent), filtered by skill, agent, team or channel. Gets one page; to see more, run it again with the 'next_skip' it gives.

**Inputs**

- Skill (`skill_id`, text): Only this skill (queue).
- Agent (`agent_id`, text): Only this agent's.
- Team (`team`, text): Only this team's.
- Channel (`media_type`, text): Only this channel, such as phone calls or chat. One of: `4` (Phone call), `1` (Email), `3` (Chat), `5` (Voicemail), `6` (Work item), `7` (SMS), `8` (Social), `9` (Digital), `2` (Fax).
- From (`from_address`, text): Only contacts from this phone number, email address or chat address.
- To (`to_address`, text): Only contacts to this number or address, such as your toll free number.
- Changed since (`updated_since`, date and time): Only those that changed after this time.
- Page size (`top`, number): How many to return, 1 to 1,000. From 1 to 1000.
- Skip (`skip`, number): How many to skip before this page. Use the 'next_skip' an earlier run gave to read on. At least 0.

**Outputs**

- `contacts` (list): The contacts in progress
- `count` (number): How many came back on this page
- `next_skip` (number): The Skip to ask for next, or 0 when there are no more
- `skip` (number): How many were skipped before this page
- `total_records` (number): How many CXone says there are in all

**Example output**

```json
{
  "contacts": [
    {
      "agentId": 30387543,
      "campaignName": "Support",
      "contactId": 492837465,
      "contactStartDate": "2026-11-13T15:04:11.000Z",
      "contactStateCategory": "Agent",
      "firstName": "Alex",
      "fromAddress": "8015550123",
      "isOutbound": false,
      "lastName": "Rivera",
      "lastUpdateTime": "2026-11-13T15:10:42.000Z",
      "masterContactId": 492837465,
      "mediaTypeId": 4,
      "mediaTypeName": "Phone Call",
      "pointOfContactName": "Support line",
      "skillId": 4354,
      "skillName": "Support Phone",
      "stateName": "Active",
      "teamId": 1234,
      "teamName": "Support",
      "toAddress": "8005550100"
    }
  ],
  "count": 1,
  "next_skip": 0,
  "skip": 0,
  "total_records": 1
}
```

### List agents

List your CXone agents with their team, supervisor and last login. Gets one page; to see more, run it again with the 'next_skip' it gives.

**Inputs**

- Status (`status`, text): Only active or only inactive ones. Leave empty for both. One of: `active` (Active only), `inactive` (Inactive only).
- Search (`search`, text): Only those whose name or id contains this.
- Changed since (`updated_since`, date and time): Only those that changed after this time.
- Page size (`top`, number): How many to return, 1 to 100. From 1 to 100.
- Skip (`skip`, number): How many to skip before this page. Use the 'next_skip' an earlier run gave to read on. At least 0.

**Outputs**

- `agents` (list): The agents
- `count` (number): How many came back on this page
- `next_skip` (number): The Skip to ask for next, or 0 when there are no more
- `skip` (number): How many were skipped before this page
- `total_records` (number): How many CXone says there are in all

**Example output**

```json
{
  "agents": [
    {
      "agentId": 30387543,
      "createDate": "2025-02-01T16:00:00.000Z",
      "emailAddress": "jo.bloggs@example.com",
      "firstName": "Jo",
      "isActive": true,
      "isSupervisor": false,
      "lastLogin": "2026-11-12T14:03:00.000Z",
      "lastName": "Bloggs",
      "location": "Salt Lake City",
      "reportToName": "Sam Lee",
      "teamId": 1234,
      "teamName": "Support",
      "timeZone": "Mountain Standard Time",
      "userName": "jo.bloggs@example.com"
    }
  ],
  "count": 1,
  "next_skip": 0,
  "skip": 0,
  "total_records": 1
}
```

### List agents on a skill

List the agents assigned to a skill, with their proficiency. Gets one page; to see more, run it again with the 'next_skip' it gives.

**Inputs**

- Skill (`skill_id`, text, required): The skill (queue). Pick one, or give its id.
- Search (`search`, text): Only those whose name or id contains this.
- Page size (`top`, number): How many to return, 1 to 100. From 1 to 100.
- Skip (`skip`, number): How many to skip before this page. Use the 'next_skip' an earlier run gave to read on. At least 0.

**Outputs**

- `agents` (list): The agents on the skill
- `count` (number): How many came back on this page
- `next_skip` (number): The Skip to ask for next, or 0 when there are no more
- `skip` (number): How many were skipped before this page
- `total_records` (number): How many CXone says there are in all

**Example output**

```json
{
  "agents": [
    {
      "agentId": 30387543,
      "agentProficiencyName": "High",
      "agentProficiencyValue": 1,
      "firstName": "Jo",
      "isActive": true,
      "isSkillActive": true,
      "lastName": "Bloggs",
      "lastUpdateTime": "2026-10-01T09:00:00.000Z"
    }
  ],
  "count": 1,
  "next_skip": 0,
  "skip": 0,
  "total_records": 1
}
```

### List completed contacts

List finished calls, chats, emails and other contacts that started in a period (the last 24 hours unless you say), with times, disposition and whether they were abandoned. Gets one page; to see more, run it again with the 'next_skip' it gives.

**Inputs**

- From (`start_date`, date and time): Contacts that started at or after this time.
- Until (`end_date`, date and time): Contacts that started before this time, at most 31 days after From.
- Skill (`skill_id`, text): Only this skill (queue).
- Agent (`agent_id`, text): Only this agent's.
- Team (`team`, text): Only this team's.
- Channel (`media_type`, text): Only this channel, such as phone calls or chat. One of: `4` (Phone call), `1` (Email), `3` (Chat), `5` (Voicemail), `6` (Work item), `7` (SMS), `8` (Social), `9` (Digital), `2` (Fax).
- From (`from_address`, text): Only contacts from this phone number, email address or chat address.
- To (`to_address`, text): Only contacts to this number or address, such as your toll free number.
- Page size (`top`, number): How many to return, 1 to 1,000. From 1 to 1000.
- Skip (`skip`, number): How many to skip before this page. Use the 'next_skip' an earlier run gave to read on. At least 0.
- Changed since (`updated_since`, date and time): Instead of From and Until: contacts that changed after this time.

**Outputs**

- `contacts` (list): The completed contacts
- `count` (number): How many came back on this page
- `next_skip` (number): The Skip to ask for next, or 0 when there are no more
- `skip` (number): How many were skipped before this page
- `total_records` (number): How many CXone says there are in all

**Example output**

```json
{
  "contacts": [
    {
      "abandoned": false,
      "acwSeconds": 18.6,
      "agentId": 30387543,
      "agentSeconds": 330.1,
      "campaignName": "Support",
      "contactId": 492837465,
      "contactStartDate": "2026-11-13T15:04:11.000Z",
      "dispositionNotes": "Reset the customer's password",
      "endReason": "Contact Hung Up",
      "firstName": "Alex",
      "fromAddress": "8015550123",
      "holdSeconds": 0,
      "inQueueSeconds": 42.5,
      "isOutbound": false,
      "lastName": "Rivera",
      "lastUpdateTime": "2026-11-13T15:10:42.000Z",
      "masterContactId": 492837465,
      "mediaTypeId": 4,
      "mediaTypeName": "Phone Call",
      "pointOfContactName": "Support line",
      "primaryDispositionId": 77,
      "skillId": 4354,
      "skillName": "Support Phone",
      "teamId": 1234,
      "teamName": "Support",
      "toAddress": "8005550100",
      "totalDurationSeconds": 391.2
    }
  ],
  "count": 1,
  "next_skip": 0,
  "skip": 0,
  "total_records": 1
}
```

### List dispositions

List dispositions, the outcomes agents give a contact such as Resolved or Call back. Gets one page; to see more, run it again with the 'next_skip' it gives.

**Inputs**

- Status (`status`, text): Only active or only inactive ones. Leave empty for both. One of: `active` (Active only), `inactive` (Inactive only).
- Search (`search`, text): Only those whose name or id contains this.
- Page size (`top`, number): How many to return, 1 to 100. From 1 to 100.
- Skip (`skip`, number): How many to skip before this page. Use the 'next_skip' an earlier run gave to read on. At least 0.

**Outputs**

- `count` (number): How many came back on this page
- `dispositions` (list): The dispositions
- `next_skip` (number): The Skip to ask for next, or 0 when there are no more
- `skip` (number): How many were skipped before this page
- `total_records` (number): How many CXone says there are in all

**Example output**

```json
{
  "count": 1,
  "dispositions": [
    {
      "classificationId": 1,
      "dispositionId": 77,
      "dispositionName": "Resolved",
      "isActive": true,
      "lastUpdated": "2026-09-14T10:00:00.000Z",
      "notes": "Issue fixed on the call"
    }
  ],
  "next_skip": 0,
  "skip": 0,
  "total_records": 1
}
```

### List DNC groups

List your do-not-call groups and how many numbers each holds.

**Inputs**: None.

**Outputs**

- `count` (number): How many came back
- `dnc_groups` (list): The DNC groups

**Example output**

```json
{
  "count": 1,
  "dnc_groups": [
    {
      "dncGroupDescription": "People who asked not to be called",
      "dncGroupId": 31,
      "dncGroupName": "Customer requests",
      "isActive": true,
      "lastUpdateTime": "2026-11-12T08:00:00.000Z",
      "validRecords": 2210
    }
  ]
}
```

### List reports

List the Custom Reporting reports you can run with 'Start report job'.

**Inputs**: None.

**Outputs**

- `count` (number): How many came back
- `reports` (list): The reports

**Example output**

```json
{
  "count": 1,
  "reports": [
    {
      "reportDescription": "Every contact of the day with its disposition",
      "reportId": 1501,
      "reportName": "Daily contact detail",
      "reportType": "Public"
    }
  ]
}
```

### List scheduled callbacks

List the callbacks waiting on a skill, or on an agent. Give one of the two.

**Inputs**

- Skill (`skill_id`, text): The skill's callbacks. Leave empty to give an agent instead.
- Agent (`agent_id`, text): The agent's callbacks. Leave empty to give a skill instead.

**Outputs**

- `callbacks` (list): The scheduled callbacks
- `count` (number): How many came back

**Example output**

```json
{
  "callbacks": [
    {
      "agentId": 30387543,
      "callbackId": 556677,
      "callbackTime": "2026-11-14T16:00:00.000Z",
      "dialNumber": "8015550123",
      "firstName": "Alex",
      "lastName": "Rivera",
      "notes": "Wants an update on order 1042",
      "skillId": 4400,
      "target": "S"
    }
  ],
  "count": 1
}
```

### List skills

List your skills, the queues contacts are routed through, with their channel and campaign. Gets one page; to see more, run it again with the 'next_skip' it gives.

**Inputs**

- Channel (`media_type`, text): Only this channel, such as phone calls or chat. One of: `4` (Phone call), `1` (Email), `3` (Chat), `5` (Voicemail), `6` (Work item), `7` (SMS), `8` (Social), `9` (Digital), `2` (Fax).
- Status (`status`, text): Only active or only inactive ones. Leave empty for both. One of: `active` (Active only), `inactive` (Inactive only).
- Search (`search`, text): Only those whose name or id contains this.
- Page size (`top`, number): How many to return, 1 to 100. From 1 to 100.
- Skip (`skip`, number): How many to skip before this page. Use the 'next_skip' an earlier run gave to read on. At least 0.

**Outputs**

- `count` (number): How many came back on this page
- `next_skip` (number): The Skip to ask for next, or 0 when there are no more
- `skills` (list): The skills
- `skip` (number): How many were skipped before this page
- `total_records` (number): How many CXone says there are in all

**Example output**

```json
{
  "count": 1,
  "next_skip": 0,
  "skills": [
    {
      "campaignId": 120,
      "campaignName": "Support",
      "isActive": true,
      "isOutbound": false,
      "mediaTypeId": 4,
      "mediaTypeName": "Phone Call",
      "notes": "Main support line",
      "skillId": 4354,
      "skillName": "Support Phone"
    }
  ],
  "skip": 0,
  "total_records": 1
}
```

### List teams

List your CXone teams with how many agents each has. Gets one page; to see more, run it again with the 'next_skip' it gives.

**Inputs**

- Status (`status`, text): Only active or only inactive ones. Leave empty for both. One of: `active` (Active only), `inactive` (Inactive only).
- Search (`search`, text): Only those whose name or id contains this.
- Page size (`top`, number): How many to return, 1 to 100. From 1 to 100.
- Skip (`skip`, number): How many to skip before this page. Use the 'next_skip' an earlier run gave to read on. At least 0.

**Outputs**

- `count` (number): How many came back on this page
- `next_skip` (number): The Skip to ask for next, or 0 when there are no more
- `skip` (number): How many were skipped before this page
- `teams` (list): The teams
- `total_records` (number): How many CXone says there are in all

**Example output**

```json
{
  "count": 1,
  "next_skip": 0,
  "skip": 0,
  "teams": [
    {
      "agentCount": 12,
      "description": "Tier 1 support",
      "isActive": true,
      "lastUpdateTime": "2026-10-01T09:00:00.000Z",
      "teamId": 1234,
      "teamName": "Support"
    }
  ],
  "total_records": 1
}
```

### Remove number from DNC group

Expire a phone number in a do-not-call group, so it can be dialled again. CXone deletes it from the group 7 days later.

**Inputs**

- DNC group (`dnc_group_id`, text, required): The do-not-call group. Pick one, or give its id.
- Phone number (`phone_number`, text, required): The phone number, with or without spaces and brackets.

**Outputs**

- `dnc_group_id` (number): The group
- `formatted_phone` (text): The number as CXone stored it
- `phone_number` (text): The number, as digits

**Example output**

```json
{
  "dnc_group_id": 31,
  "formatted_phone": "8015550123",
  "phone_number": "8015550123"
}
```

### Schedule callback

Schedule a callback to a customer on an outbound skill, for any agent on the skill or for one agent. CXone offers it when it's due.

**Inputs**

- Outbound skill (`skill_id`, text, required): The outbound skill to call from. Pick one, or give its id.
- Phone number (`phone_number`, text, required): The phone number, with or without spaces and brackets.
- When (`schedule_date`, date and time, required): When to call back.
- First name (`first_name`, text): The customer's first name.
- Last name (`last_name`, text): The customer's last name.
- Agent (`agent_id`, text): Only this agent gets the callback. Leave empty for the whole skill.
- Notes (`notes`, text): Notes the agent sees, such as why to call.

**Outputs**

- `callback_id` (number): The callback's id
- `phone_number` (text): The number, as digits
- `schedule_date` (text): When it is due
- `skill_id` (number): The skill it is on

**Example output**

```json
{
  "callback_id": 556677,
  "phone_number": "8015550123",
  "schedule_date": "2026-11-14T16:00:00Z",
  "skill_id": 4400
}
```

### Search DNC groups for a number

Find which do-not-call groups hold a phone number.

**Inputs**

- Phone number (`phone_number`, text, required): The phone number, with or without spaces and brackets.

**Outputs**

- `count` (number): How many groups hold it
- `groups` (list): The groups holding it
- `on_dnc` (true/false): True if any group holds it
- `phone_number` (text): The number, as digits

**Example output**

```json
{
  "count": 1,
  "groups": [
    {
      "dateCollected": "2026-11-12T08:00:00.000Z",
      "dncGroupId": 31,
      "dncGroupName": "Customer requests",
      "expiredDate": "",
      "formattedPhone": "8015550123"
    }
  ],
  "on_dnc": true,
  "phone_number": "8015550123"
}
```

### Set agent state

Make a logged-in agent Available, or Unavailable with a reason such as Lunch or Training. The agent must be logged in.

**Inputs**

- Agent (`agent_id`, text, required): The agent. Pick one, or give their agent id.
- State (`state`, text, required): Available, or Unavailable. One of: `Available`, `Unavailable`.
- Unavailable reason (`unavailable_code`, text): For Unavailable only: the reason, such as Lunch. Leave empty for none.

**Outputs**

- `agent_id` (number): The agent's id
- `set` (true/false): True once CXone took it
- `state` (text): The state set
- `unavailable_code` (number): The unavailable reason's id, or 0 for none

**Example output**

```json
{
  "agent_id": 30387543,
  "set": true,
  "state": "Unavailable",
  "unavailable_code": 12
}
```

### Start report job

Run a Custom Reporting report. It runs in the background: follow it with 'Get report job', which gives the file's address once it's done.

**Inputs**

- Report (`report_id`, text, required): The report. Pick one, or give its id.
- File type (`file_type`, text): The result file's format. Defaults to the report's own. One of: `CSV`, `Excel`, `PDF`, `XML`.
- Include headers (`include_headers`, true/false): Add a header row to the file.
- Add date to file name (`append_date`, true/false): Put the date in the file's name.
- Overwrite (`overwrite`, true/false): Replace a file of the same name. CXone does this unless turned off.
- Keep for days (`delete_after`, number): How many days CXone keeps the result file. From 1 to 365.

**Outputs**

- `job_id` (number): The job's id, for 'Get report job'
- `report_id` (number): The report run

**Example output**

```json
{
  "job_id": 99120,
  "report_id": 1501
}
```
