# UJET

> Read UJET agents, their statuses and activity, calls, chats, queues and wait times, teams and campaigns, manage skills and agents' skills, and keep the Do Not Call list.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/ujet

## Actions

### Add to Do Not Call list

Add phone numbers to the Do Not Call list, optionally until a time.

**Inputs**

- Phone numbers (`phone_numbers`, list, required): Phone numbers with the country code, such as +14155550123.
- Until (`expires_at`, date and time): When they come off the list. Leave empty to keep them on.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "results": [
      {
        "error": "example",
        "expires_at": "example",
        "phone_number": "example",
        "status": "example"
      }
    ]
  }
}
```

### Check Do Not Call list

Check whether a phone number is on the Do Not Call list.

**Inputs**

- Phone number (`phone_number`, text, required): The phone number with the country code.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "do_not_call": true,
    "expired_at": "example",
    "phone_number": "example"
  }
}
```

### Create skill

Add a skill to the roster.

**Inputs**

- Name (`name`, text, required): The skill's name.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "agent_count": 1,
    "avg_proficiency_level": 1,
    "is_used_in_queue": true,
    "skill_id": 1,
    "skill_name": "example"
  }
}
```

### Delete skill

Delete a skill no queue requires.

**Inputs**

- Skill (`skill_id`, number, required): The skill.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "success": true
  }
}
```

### Get call

Get a call with its status, times, queue, agent and recording.

**Inputs**

- Call ID (`call_id`, number, required): The call's ID.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "agent_info": {
      "agent_number": "example",
      "id": 1,
      "name": "example"
    },
    "assigned_at": "example",
    "call_duration": 1,
    "call_type": "example",
    "call_uuid": "example",
    "connected_at": "example",
    "created_at": "example",
    "disconnected_by": "example",
    "end_user": {
      "id": 1,
      "identifier": "example",
      "out_contact_id": "example"
    },
    "ends_at": "example",
    "fail_reason": "example",
    "has_feedback": true,
    "hold_duration": 1,
    "id": 1,
    "lang": "example",
    "menu_path": {
      "materialized_path": "example",
      "name": "example"
    },
    "out_ticket_id": "example",
    "out_ticket_url": "example",
    "queue_duration": 1,
    "queued_at": "example",
    "rating": 1,
    "recording_url": "example",
    "scheduled_at": "example",
    "selected_menu": {
      "deleted": true,
      "id": 1,
      "menu_type": "example",
      "name": "example",
      "parent_id": 1
    },
    "status": "example",
    "support_number": "example",
    "updated_at": "example",
    "verified": true,
    "wait_duration": 1
  }
}
```

### Get chat

Get a chat with its status, agents, queues and end user.

**Inputs**

- Chat ID (`chat_id`, number, required): The chat's ID.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "agent": {
      "id": 1,
      "name": "example",
      "status": "example"
    },
    "created_at": "example",
    "end_user": {
      "id": 1,
      "identifier": "example"
    },
    "ends_at": "example",
    "id": 1,
    "lang": "example",
    "menus": [
      {
        "id": 1,
        "name": "example"
      }
    ],
    "status": "example",
    "status_text": "example"
  }
}
```

### Get queue

Get a queue (menu) with its settings and assignments.

**Inputs**

- Queue (`menu_id`, number, required): The queue.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "hidden": true,
    "id": 1,
    "menu_type": "example",
    "name": "example",
    "output_msg": "example",
    "parent_id": 1,
    "position": 1
  }
}
```

### Get team

Get a team and its agents.

**Inputs**

- Team (`ujet_team_id`, number, required): The team.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "agents_count": 1,
    "assignees": [
      {
        "agent_number": "example",
        "id": 1,
        "name": "example"
      }
    ],
    "deleted": true,
    "id": 1,
    "name": "example",
    "parent_id": 1,
    "position": 1
  }
}
```

### Give agent a skill

Give an agent a skill at a level, or change the level they have.

**Inputs**

- Agent (`agent_id`, number, required): The agent (user) ID.
- Skill (`skill_id`, number, required): The skill.
- Level (`level`, number, required): The agent's level in the skill. At least 0.
- Learning (`is_learning`, true/false): The agent is still learning the skill.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "is_learning": true,
    "level": 1,
    "skill_id": 1,
    "skill_name": "example"
  }
}
```

### List agent activity

List agents' activity: each change of status and each call or chat notification.

**Inputs**

- Agents (`agent_ids`, list): Only those of these agents.
- Started from (`started_at_from`, date and time): Only those started on or after this time.
- Started to (`started_at_to`, date and time): Only those started on or before this time.
- Ended from (`ended_at_from`, date and time): Only those ended on or after this time.
- Ended to (`ended_at_to`, date and time): Only those ended on or before this time.
- Sort by (`sort_column`, text): A field of the records to sort by, such as created_at.
- Order (`sort_direction`, text): Ascending or descending. One of: `ASC` (Ascending), `DESC` (Descending).
- Page (`page`, number): Which page, from 1. At least 1.
- Per page (`per`, number): How many per page. At least 1.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "activities": [
      {
        "activity": "example",
        "agent_id": 1,
        "duration": 1,
        "ended_at": "example",
        "id": 1,
        "started_at": "example",
        "whodunnit": {}
      }
    ]
  }
}
```

### List agent statuses

List the statuses an agent can be in, such as Available.

**Inputs**: None.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "statuses": [
      {
        "color": "example",
        "id": 1,
        "name": "example",
        "wfm_id": 1
      }
    ]
  }
}
```

### List agents

List agents with their status, teams and how many calls and chats they have.

**Inputs**

- Online (`online`, true/false): Only agents who are online (on) or offline (off).
- Last signed in from (`last_login_time_from`, date and time): Only those who last signed in on or after this time.
- Last signed in to (`last_login_time_to`, date and time): Only those who last signed in on or before this time.
- Page (`page`, number): Which page, from 1. At least 1.
- Per page (`per`, number): How many per page. At least 1.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "agents": [
      {
        "agent_number": "example",
        "avatar_url": "example",
        "call_count": 1,
        "chat_count": 1,
        "created_at": "example",
        "email": "example",
        "first_name": "example",
        "id": 1,
        "last_login_time": "example",
        "last_name": "example",
        "location": "example",
        "middle_name": "example",
        "online": true,
        "roles": [
          "example"
        ],
        "status": {
          "color": "example",
          "id": 1,
          "name": "example",
          "wfm_id": 1
        },
        "status_updated_at": "example",
        "teams": [
          {
            "id": 1,
            "name": "example",
            "parent_id": 1
          }
        ],
        "wrap_up": true
      }
    ]
  }
}
```

### List agents' current statuses

List the signed-in agents, each one's status, since when, and whether they have a call on hold.

**Inputs**: None.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "agents": [
      {
        "id": 1,
        "on_hold": true,
        "on_hold_duration": 1,
        "status": "example",
        "status_id": 1,
        "status_updated_at": "example"
      }
    ]
  }
}
```

### List calls

List calls, filtered by when they were updated, connected or queued, their status and type, and the agent.

**Inputs**

- Updated from (`updated_at_from`, date and time): Only those updated on or after this time.
- Updated to (`updated_at_to`, date and time): Only those updated on or before this time.
- Connected from (`connected_at_from`, date and time): Only those connected on or after this time.
- Connected to (`connected_at_to`, date and time): Only those connected on or before this time.
- Queued from (`queued_at_from`, date and time): Only those queued on or after this time.
- Queued to (`queued_at_to`, date and time): Only those queued on or before this time.
- Statuses (`call_statuses`, list): Only calls in these states. One or more of: `scheduled`, `queued`, `assigned`, `connecting`, `switching`, `connected`, `finished`, `failed`, `recovered`, `deflected`, and 6 more.
- Types (`call_types`, list): Only calls of these types. One or more of: `IncomingCallApp` (Incoming (app)), `ScheduledCallApp` (Scheduled (app)), `OutboundCall` (Outbound), `AgentScheduledCall` (Scheduled by an agent), `IvrCall` (Phone (IVR)), `IncomingCallWeb` (Incoming (web)), `ScheduledCallWeb` (Scheduled (web)), `ActionOnlyCall` (Action only).
- Agents (`agent_ids`, list): Only those of these agents.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "calls": [
      {
        "agent_info": {
          "agent_number": "example",
          "id": 1,
          "name": "example"
        },
        "assigned_at": "example",
        "call_duration": 1,
        "call_type": "example",
        "call_uuid": "example",
        "connected_at": "example",
        "created_at": "example",
        "disconnected_by": "example",
        "end_user": {
          "id": 1,
          "identifier": "example",
          "out_contact_id": "example"
        },
        "ends_at": "example",
        "fail_reason": "example",
        "has_feedback": true,
        "hold_duration": 1,
        "id": 1,
        "lang": "example",
        "menu_path": {
          "materialized_path": "example",
          "name": "example"
        },
        "out_ticket_id": "example",
        "out_ticket_url": "example",
        "queue_duration": 1,
        "queued_at": "example",
        "rating": 1,
        "recording_url": "example",
        "scheduled_at": "example",
        "selected_menu": {
          "deleted": true,
          "id": 1,
          "menu_type": "example",
          "name": "example",
          "parent_id": 1
        },
        "status": "example",
        "support_number": "example",
        "updated_at": "example",
        "verified": true,
        "wait_duration": 1
      }
    ]
  }
}
```

### List campaigns

List the outbound dialer campaigns.

**Inputs**: None.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "campaigns": [
      {
        "campaign_type": "example",
        "external_campaign_id": "example",
        "id": 1,
        "max_redial_count": 1,
        "mode": "example",
        "name": "example",
        "status": "example"
      }
    ]
  }
}
```

### List chats

List chats, filtered by when they were created, assigned, updated or ended.

**Inputs**

- Created from (`created_at_from`, date and time): Only those created on or after this time.
- Created to (`created_at_to`, date and time): Only those created on or before this time.
- Updated from (`updated_at_from`, date and time): Only those updated on or after this time.
- Updated to (`updated_at_to`, date and time): Only those updated on or before this time.
- Ended from (`ends_at_from`, date and time): Only those ended on or after this time.
- Ended to (`ends_at_to`, date and time): Only those ended on or before this time.
- Sort by (`sort_column`, text): A field of the records to sort by, such as created_at.
- Order (`sort_direction`, text): Ascending or descending. One of: `ASC` (Ascending), `DESC` (Descending).
- Page (`page`, number): Which page, from 1. At least 1.
- Per page (`per`, number): How many per page. At least 1.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "chats": [
      {
        "agent_info": {
          "agent_number": "example",
          "id": 1,
          "name": "example"
        },
        "assigned_at": "example",
        "chat_duration": 1,
        "chat_type": "example",
        "created_at": "example",
        "end_user": {
          "id": 1,
          "identifier": "example"
        },
        "ends_at": "example",
        "fail_reason": "example",
        "has_feedback": true,
        "id": 1,
        "lang": "example",
        "message_count": 1,
        "out_ticket_id": "example",
        "out_ticket_url": "example",
        "queue_duration": 1,
        "rating": 1,
        "selected_menu": {
          "deleted": true,
          "id": 1,
          "menu_type": "example",
          "name": "example",
          "parent_id": 1
        },
        "status": "example",
        "updated_at": "example",
        "verified": true,
        "wait_duration": 1
      }
    ]
  }
}
```

### List disposition codes

List the disposition codes agents pick after a call or chat.

**Inputs**

- Channel (`channel`, text): For calls or chats. Defaults to calls. One of: `voice_call` (Calls), `chat` (Chats).
- Direction (`call_direction`, text): For inbound or outbound calls. Defaults to inbound. One of: `inbound`, `outbound`.
- Language (`lang`, text): The language code, such as en. Defaults to en.
- Page (`page`, number): Which page, from 1. At least 1.
- Per page (`per_page`, number): How many per page, up to 100. From 1 to 100.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "lists": [
      {
        "codes": [
          {}
        ],
        "id": 1,
        "level": 1,
        "name": "example",
        "parent_path": "example"
      }
    ]
  }
}
```

### List queue statuses

List the queues with calls or chats waiting now: how many, for how long, and how many agents are available.

**Inputs**: None.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "queues": [
      {
        "available_agents": 1,
        "average_queue_duration": 1,
        "comm_type": "example",
        "in_queue_count": 1,
        "lang": "example",
        "logged_in_agents": 1,
        "menu_id": 1,
        "menu_path": "example",
        "oldest_duration_in_queue": 1,
        "oldest_in_queue": "example"
      }
    ]
  }
}
```

### List queues

List the queues (menus) callers and chatters reach agents through.

**Inputs**

- Kinds (`menu_types`, list): Only queues of these kinds. One or more of: `ivr_menu` (Phone (IVR)), `mobile_menu` (Mobile), `web_menu` (Web).
- Sort by (`sort_column`, text): A field of the records to sort by, such as created_at.
- Order (`sort_direction`, text): Ascending or descending. One of: `ASC` (Ascending), `DESC` (Descending).
- Page (`page`, number): Which page, from 1. At least 1.
- Per page (`per`, number): How many per page. At least 1.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "menus": [
      {
        "deleted": true,
        "hidden": true,
        "id": 1,
        "menu_type": "example",
        "name": "example",
        "output_msg": "example",
        "parent_id": 1,
        "position": 1
      }
    ]
  }
}
```

### List skills

List the skills agents can have, with how many agents have each.

**Inputs**: None.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "skills": [
      {
        "agent_count": 1,
        "avg_proficiency_level": 1,
        "is_used_in_queue": true,
        "skill_id": 1,
        "skill_name": "example"
      }
    ]
  }
}
```

### List teams

List the teams and their agents.

**Inputs**

- Sort by (`sort_column`, text): A field of the records to sort by, such as created_at.
- Order (`sort_direction`, text): Ascending or descending. One of: `ASC` (Ascending), `DESC` (Descending).
- Page (`page`, number): Which page, from 1. At least 1.
- Per page (`per`, number): How many per page. At least 1.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "teams": [
      {
        "agents_count": 1,
        "assignees": [
          {
            "agent_number": "example",
            "id": 1,
            "name": "example"
          }
        ],
        "deleted": true,
        "id": 1,
        "name": "example",
        "parent_id": 1,
        "position": 1
      }
    ]
  }
}
```

### List wait times

List each queue's expected wait for calls and chats, in seconds.

**Inputs**

- Language (`lang`, text, required): The queues' language code, such as en.
- Kind (`menu_type`, text): Only queues of this kind. One of: `ivr_menu` (Phone (IVR)), `mobile_menu` (Mobile), `web_menu` (Web).
- Channel (`channel_type`, text): Only calls or only chats. One of: `voice_call` (Calls), `chat` (Chats).

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "queues": [
      {
        "available_agents": 1,
        "chat": 1,
        "logged_in_agents": 1,
        "materialized_path": "example",
        "menu_id": 1,
        "menu_type": "example",
        "voice_call": 1
      }
    ]
  }
}
```

### Remove agent's skill

Take a skill away from an agent.

**Inputs**

- Agent (`agent_id`, number, required): The agent (user) ID.
- Skill (`skill_id`, number, required): The skill.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "success": true
  }
}
```

### Remove from Do Not Call list

Take phone numbers off the Do Not Call list.

**Inputs**

- Phone numbers (`phone_numbers`, list, required): Phone numbers with the country code, such as +14155550123.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "removed": [
      "example"
    ],
    "results": [
      {
        "error": "example",
        "expires_at": "example",
        "phone_number": "example",
        "status": "example"
      }
    ]
  }
}
```

### Rename skill

Rename a skill.

**Inputs**

- Skill (`skill_id`, number, required): The skill.
- Name (`name`, text, required): The skill's new name.

**Outputs**

- `data` (object): The response from UJET.

**Example output**

```json
{
  "data": {
    "agent_count": 1,
    "avg_proficiency_level": 1,
    "is_used_in_queue": true,
    "skill_id": 1,
    "skill_name": "example"
  }
}
```
