# Nextiva

> Read contact center conversations and workitems, send messages, and control active calls.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/nextiva

## Actions

### Change workitem priority

Change the priority of a workitem.

**Inputs**

- Workitem ID (`workitemId`, text, required): Unique identifier of the workitem.
- Priority (`priority`, number, required): Priority level of a workitem (1-5, 5 being highest). One of: `1`, `2`, `3`, `4`, `5`.

**Outputs**

- `data` (object): Nextiva response data.

**Example output**

```json
{
  "data": {}
}
```

### Fetch conversation by ID

Fetch a conversation by ID, including its associated workitems.

**Inputs**

- Conversation ID (`conversationId`, text, required): Unique identifier of the conversation.
- Cursor (`cursor`, number): Cursor for pagination (for v2).
- Include call recordings (`includeCallRecordings`, true/false): Whether to include call recordings.
- Include conversation (`includeConversation`, true/false): Whether to include conversation details.
- Include parent engagement (`includeParentEngagement`, true/false): Whether to include parent engagement details.
- Include summary (`includeSummary`, true/false): Whether to include a summary.
- Include voicemail (`includeVoicemail`, true/false): Whether to include voicemail.
- Limit (`limit`, number): Number of items per page (for v2).
- Mentioned (`mentioned`, true/false): Filter messages that mention the logged user.
- Rows (`rows`, number): Number of items per page (for v1).
- Start (`start`, number): Pagination starting index (for v1).
- Version (`version`, text): API version to use. One of: `v1`, `v2`.
- Workitem ID (`workitemId`, text): Filter by workitem ID.

**Outputs**

- `data` (object): Nextiva response data.

**Example output**

```json
{
  "data": {
    "count": 1,
    "engagementData": [],
    "objects": [],
    "total": 1
  }
}
```

### Fetch conversation history by participant ID

Fetch conversation history by participant ID.

**Inputs**

- Page number (`pageNumber`, number): Page number for pagination.
- Page size (`pageSize`, number): Number of items per page.
- Participant IDs (`participantIds`, list): IDs of the participants to filter by.

**Outputs**

- `data` (object): Nextiva response data.

**Example output**

```json
{
  "data": {
    "count": 1,
    "objects": [],
    "total": 1
  }
}
```

### Fetch conversation work items by status

Fetch workitems within a conversation by their status.

**Inputs**

- Conversation ID (`conversationId`, text, required): Unique identifier of the conversation.
- Work item status (`workItemStatus`, text, required): Status of the workitems to filter by (e.g., 'draft').
- Rows (`rows`, number): Number of items per page.
- Start (`start`, number): Pagination starting index.

**Outputs**

- `data` (object): Nextiva response data.

**Example output**

```json
{
  "data": {
    "count": 1,
    "objects": [],
    "total": 1
  }
}
```

### Fetch conversations

Fetch all conversations.

**Inputs**

- Rows (`rows`, number): Number of items per page.
- Start (`start`, number): Pagination starting index.

**Outputs**

- `data` (object): Nextiva response data.

**Example output**

```json
{
  "data": {
    "count": 1,
    "objects": [],
    "total": 1
  }
}
```

### Fetch recent conversation workitem engagements

Fetch recent conversation workitem engagements.

**Inputs**

- Cursor (`cursor`, number): Cursor for pagination.
- Filter (`filter`, text): Filter type for conversations. One of: `ALL`, `ARCHIVED`, `CALLS`, `CALLS_AND_TEXTS` (Calls and texts), `CHANNELS`, `DRAFTS`, `EXTERNAL`, `INCOMING_CALLS` (Incoming calls), `INTERNAL`, `MENTIONS`, and 5 more.
- Ignore voicemail transcripts (`ignoreVoicemailTranscripts`, true/false): Whether to ignore voicemail transcripts.
- Limit (`limit`, number): Number of items per page.
- Tab (`tab`, text): Tab filter for conversations. One of: `ALL`, `ARCHIVED`, `CALLS`, `CALLS_AND_TEXTS` (Calls and texts), `CHANNELS`, `DRAFTS`, `EXTERNAL`, `INCOMING_CALLS` (Incoming calls), `INTERNAL`, `MENTIONS`, and 5 more.

**Outputs**

- `data` (object): Nextiva response data.

**Example output**

```json
{
  "data": {
    "count": 1,
    "objects": [],
    "total": 1
  }
}
```

### Fetch ticket conversations

Fetch conversations associated with a ticket.

**Inputs**

- Ticket ID (`ticketId`, text, required): Unique identifier of the ticket.

**Outputs**

- `data` (object): Nextiva response data.

**Example output**

```json
{
  "data": {
    "count": 1,
    "objects": [],
    "total": 1
  }
}
```

### Fetch transcriptions and recordings

Fetch transcriptions and recordings for a specific workitem within a conversation.

**Inputs**

- Conversation ID (`conversationId`, text, required): Unique identifier of the conversation.
- Workitem ID (`workitemId`, text, required): Unique identifier of the workitem.
- Created at (`createdAt`, date and time): When the interaction was created.

**Outputs**

- `data` (object): Nextiva response data.

**Example output**

```json
{
  "data": {
    "count": 1,
    "objects": [],
    "total": 1
  }
}
```

### Fetch unread counts

Fetch unread conversation counts.

**Inputs**: None.

**Outputs**

- `data` (object): Nextiva response data.

**Example output**

```json
{
  "data": {
    "internal": 1,
    "mentions": 1,
    "total": 1,
    "voicecalls": 1,
    "voicemails": 1
  }
}
```

### Fetch workitem by ID

Fetch a specific workitem by ID.

**Inputs**

- Id (`id`, text, required): Unique identifier of the workitem.

**Outputs**

- `data` (object): Nextiva response data.

**Example output**

```json
{
  "data": {
    "_id": "example",
    "agentUsername": "example",
    "channelType": "example",
    "createdAt": 1,
    "modifiedAt": 1,
    "priority": 1,
    "state": "example",
    "type": "example",
    "workitemId": "example"
  }
}
```

### Fetch workitems

Fetch all workitems.

**Inputs**

- Q (`q`, text): Query string for filtering workitems.
- Rows (`rows`, number): Number of items per page.
- Start (`start`, number): Pagination starting index.

**Outputs**

- `data` (object): Nextiva response data.

**Example output**

```json
{
  "data": {
    "count": 1,
    "objects": [],
    "total": 1
  }
}
```

### Hang up workitem call

Ends a call.

**Inputs**

- Workitem ID (`workitemId`, text, required): Unique identifier of the workitem (call) to hang up.

**Outputs**

- `data` (object): Nextiva response data.

**Example output**

```json
{
  "data": {
    "_id": "example",
    "agentUsername": "example",
    "channelType": "example",
    "createdAt": 1,
    "modifiedAt": 1,
    "priority": 1,
    "state": "example",
    "type": "example",
    "workitemId": "example"
  }
}
```

### Hold workitem call

Puts a call on hold.

**Inputs**

- Workitem ID (`workitemId`, text, required): Unique identifier of the workitem (call) to put on hold.

**Outputs**

- `data` (object): Nextiva response data.

**Example output**

```json
{
  "data": {
    "_id": "example",
    "agentUsername": "example",
    "channelType": "example",
    "createdAt": 1,
    "modifiedAt": 1,
    "priority": 1,
    "state": "example",
    "type": "example",
    "workitemId": "example"
  }
}
```

### Mute workitem call

Mutes a call.

**Inputs**

- Workitem ID (`workitemId`, text, required): Unique identifier of the workitem (call) to mute.

**Outputs**

- `data` (object): Nextiva response data.

**Example output**

```json
{
  "data": {
    "_id": "example",
    "agentUsername": "example",
    "channelType": "example",
    "createdAt": 1,
    "modifiedAt": 1,
    "priority": 1,
    "state": "example",
    "type": "example",
    "workitemId": "example"
  }
}
```

### Send dtmf tones

Sends DTMF tones during a call.

**Inputs**

- Workitem ID (`workitemId`, text, required): Unique identifier of the workitem (call) to send DTMF tones to.
- Digit (`digit`, text, required): The DTMF digit(s) to send.

**Outputs**

- `data` (object): Nextiva response data.

**Example output**

```json
{
  "data": {
    "_id": "example",
    "agentUsername": "example",
    "channelType": "example",
    "createdAt": 1,
    "modifiedAt": 1,
    "priority": 1,
    "state": "example",
    "type": "example",
    "workitemId": "example"
  }
}
```

### Send email response

Sends an email response for a workitem.

**Inputs**

- Workitem ID (`workitemId`, text, required): Unique identifier of the workitem associated with the email.
- Bcc addresses (`bccAddresses`, list): Email addresses to BCC.
- Body parts (`bodyParts`, object): Body parts of the email.
- Cc addresses (`ccAddresses`, list): Email addresses to CC.
- Created at (`createdAt`, date and time): When the interaction was created.
- From (`sender`, text, required): Sender's email address.
- Subject (`subject`, text, required): Email subject.
- To (`to`, text, required): Recipient's email address.
- To addresses (`toAddresses`, list): List of recipient email addresses.

**Outputs**

- `data` (object): Nextiva response data.

**Example output**

```json
{
  "data": {
    "_id": "example",
    "agentUsername": "example",
    "channelType": "example",
    "createdAt": 1,
    "modifiedAt": 1,
    "priority": 1,
    "state": "example",
    "type": "example",
    "workitemId": "example"
  }
}
```

### Send sms message

Send an outbound SMS message.

**Inputs**

- Campaign ID (`campaignId`, text): The ID of the campaign for which the SMS message is being sent. If not provided, the user's default SMS campaign ID will be used.
- Contact ID (`contactId`, text): The unique identifier of the contact to whom the SMS message will be sent.
- From (`sender`, text): The sender's number or identifier.
- Message (`message`, text, required): The content of the SMS message to be sent.
- To (`to`, text, required): The phone number or contact to which the SMS message will be sent.
- Workitem ID (`workitemId`, text): The ID associated with a specific work item for tracking purposes.

**Outputs**

- `data` (object): Nextiva response data.

**Example output**

```json
{
  "data": {
    "canDial": false,
    "consentType": 1
  }
}
```

### Transfer workitem to agent

Transfers a workitem to another agent.

**Inputs**

- Workitem ID (`workitemId`, text, required): Unique identifier of the workitem to transfer.
- User ID (`userId`, text, required): Unique identifier of the target agent.
- Event name (`eventName`, text): Name given to the transfer event.
- Recording (`recording`, text): Recording options for transfers. One of: `keepCurrent`, `startRecording`, `stopRecording`.
- Survey (`survey`, object): Survey data.

**Outputs**

- `data` (object): Nextiva response data.

**Example output**

```json
{
  "data": {}
}
```

### Transfer workitem to inbox

Transfers a workitem to an inbox/queue.

**Inputs**

- Workitem ID (`workitemId`, text, required): Unique identifier of the workitem to transfer.
- Inbox ID (`inboxId`, text, required): Unique identifier of the target inbox/queue.
- Event name (`eventName`, text): Name given to the transfer event.
- Recording (`recording`, text): Recording options for transfers. One of: `keepCurrent`, `startRecording`, `stopRecording`.
- Ring all (`ringAll`, true/false): Whether to ring all agents in the inbox.
- Survey (`survey`, object): Survey data.

**Outputs**

- `data` (object): Nextiva response data.

**Example output**

```json
{
  "data": {}
}
```

### Unmute call

Unmute an active contact center call.

**Inputs**

- Workitem ID (`workitemId`, text, required): The workitem ID of the active call.

**Outputs**

- `data` (object): Nextiva response data.

**Example output**

```json
{
  "data": {
    "_id": "example",
    "agentUsername": "example",
    "channelType": "example",
    "createdAt": 1,
    "modifiedAt": 1,
    "priority": 1,
    "state": "example",
    "type": "example",
    "workitemId": "example"
  }
}
```
