# Helpwise

> Work with your Helpwise shared inboxes: read, tag, close and file conversations, send SMS and WhatsApp messages, and manage contacts.

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

## Actions

### Close conversations

Close conversations.

**Inputs**

- Conversations (`ids`, list, required): The IDs of the conversations, up to 100.

**Outputs**

- `data` (object): Helpwise's answer; the docs show none.

**Example output**

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

### Create contact

Add a contact.

**Inputs**

- First name (`firstname`, text): Their first name.
- Last name (`lastname`, text): Their last name.
- Company (`company`, text): Their company.
- Job title (`job_title`, text): Their job title.
- Emails (`emails`, list): Their email addresses.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "company": "Helpwise",
    "displayName": "John Doe",
    "emails": [
      "john.doe@example.com"
    ],
    "firstname": "John",
    "id": 24621650,
    "isBlocked": false,
    "jobTitle": "Manager",
    "lastname": "Doe",
    "phones": [
      {
        "phoneNo": "19999999999",
        "phoneTxt": "19999999999",
        "type": "0"
      }
    ]
  }
}
```

### Create custom field

Add a contact custom field.

**Inputs**

- Name (`name`, text, required): The field's name.
- Description (`description`, text): What it holds.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "createdAt": "2022-11-01 23:27:29",
      "description": "Pin code of customer location",
      "id": 204522,
      "inboxIds": [
        {
          "id": 221217,
          "isHidden": false,
          "name": "Support"
        }
      ],
      "name": "Pincode",
      "updatedAt": "2022-11-01 23:27:29"
    },
    "message": "Custom field created successfully",
    "status": "success"
  }
}
```

### Delete custom field

Delete a custom field.

**Inputs**

- Custom field (`custom_field_id`, number, required): The custom field. Pick one, or use an ID from List custom fields.

**Outputs**

- `data` (object): Helpwise's answer; the docs show none.

**Example output**

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

### Get contact

Get a contact with their recent conversations.

**Inputs**

- Contact (`contact_id`, number, required): The contact's ID, from List contacts or Search contacts.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "displayName": "Ashroof",
    "emails": [
      "ashroof@example.com"
    ],
    "firstname": "Ashroof",
    "groups": [
      {
        "id": 204654,
        "name": "Testing"
      }
    ],
    "id": 17864809,
    "isBlocked": false,
    "threads": [
      {
        "date": "2024-02-07T09:45:04Z",
        "id": 118041387,
        "mailboxId": 221302,
        "subject": "Summit invitation"
      }
    ]
  }
}
```

### Get conversation

Get a conversation with its messages, contacts and tags.

**Inputs**

- Inbox (`inbox_id`, number, required): The inbox's ID.
- Conversation (`conversation_id`, number, required): The conversation's ID.
- Folder (`label`, text): The folder it is in. All when empty. One of: `14` (All), `0` (Assigned), `10` (Unassigned), `11` (Starred), `9` (Snoozed), `2` (Draft), `1` (Sent), `7` (Closed), `8` (Spam), `5` (Trash), `6` (Scheduled).
- Messages (`limit`, number): How many messages to read. At least 1.
- Next page (`page_token`, text): The nextPageToken from the read before, to read older messages.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "contacts": [
      {
        "displayName": "David Warner",
        "emails": [
          "david@example.com"
        ],
        "firstname": "David",
        "id": 10103029,
        "lastname": "Warner"
      }
    ],
    "id": 116851645,
    "inboxId": 227136,
    "inboxType": "mail",
    "isArchived": false,
    "isDeleted": false,
    "isSnoozed": false,
    "isSpam": false,
    "isStarred": false,
    "items": [
      {
        "data": {
          "createdAt": "2024-01-30T09:51:27Z",
          "direction": 0,
          "from": {
            "david@example.com": "David Warner"
          },
          "id": 168573512,
          "snippet": "Hello, a quick question",
          "subject": "Chrome new update",
          "to": {
            "help@example.com": "Helpwise"
          }
        },
        "timestamp": 1706608287,
        "type": "email"
      }
    ],
    "messagesCount": 1,
    "nextPageToken": "1970-01-01 00:00:00",
    "snippet": "Get iPhone 30% Off",
    "subject": "Apple Sale Live Now!",
    "tags": [
      {
        "color": "#FF0000",
        "id": 363939,
        "inboxId": 204376,
        "name": "Black Friday Leads"
      }
    ],
    "ticketNumber": 116851645,
    "unreadCount": 0
  }
}
```

### Get custom field

Get a custom field.

**Inputs**

- Custom field (`custom_field_id`, number, required): The custom field. Pick one, or use an ID from List custom fields.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "createdAt": "2022-11-01 23:27:29",
      "description": "Pin code of customer location",
      "id": 204522,
      "inboxIds": [
        {
          "id": 221217,
          "isHidden": false,
          "name": "Support"
        }
      ],
      "name": "Pincode",
      "updatedAt": "2022-11-01 23:27:29"
    },
    "message": "Custom field fetched successfully",
    "status": "success"
  }
}
```

### Get overall report

Get conversation, message, response time and CSAT figures for a period, with each teammate's figures.

**Inputs**

- From (`start`, date and time, required): The start of the period.
- To (`end`, date and time, required): The end of the period.
- Business hours only (`business_hours`, true/false): Turn on to count only working hours.
- Inbox ID (`inbox`, number): Only this inbox. Every inbox when empty.
- Tag IDs (`tag_ids`, list): Only conversations with these tags.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "archived": {
      "count": 78,
      "percentageDifference": "-34",
      "shouldIncrease": true
    },
    "assigned": {
      "count": 33,
      "percentageDifference": "-34",
      "shouldIncrease": true
    },
    "avgFirstResponse": {
      "count": 7006.74,
      "percentageDifference": "-34",
      "shouldIncrease": true
    },
    "avgResolution": {
      "count": 154004.83,
      "percentageDifference": "-34",
      "shouldIncrease": true
    },
    "avgResponse": {
      "count": 9636.68,
      "percentageDifference": "-34",
      "shouldIncrease": true
    },
    "incomingGraph": {
      "2024-07-30": 56
    },
    "messages": {
      "2024-07-30": 87
    },
    "new": {
      "count": 261,
      "percentageDifference": "-34",
      "shouldIncrease": true
    },
    "outgoingGraph": {
      "2024-07-30": 31
    },
    "users": [
      {
        "archived": {
          "count": 0,
          "percentageDifference": "-34",
          "shouldIncrease": true
        },
        "avgResponseTime": {
          "count": 0,
          "percentageDifference": "-34",
          "shouldIncrease": true
        },
        "displayName": "David Miller",
        "email": "david@example.com",
        "id": 225970,
        "outgoing": {
          "count": 0,
          "percentageDifference": "-34",
          "shouldIncrease": true
        },
        "role": "Account Owner"
      }
    ]
  }
}
```

### Get tag

Get a tag.

**Inputs**

- Tag (`tag_id`, number, required): The tag. Pick one, or use an ID from List tags.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "color": "#FF0000",
    "createdAt": "2023-07-04 11:48:04",
    "id": 1,
    "inbox": "Helpwise Support",
    "name": "Tag 1",
    "parentId": 2
  }
}
```

### Get tag report

Get each tag's conversation count and response and resolution times in an inbox for a period.

**Inputs**

- Inbox (`inbox_id`, number, required): The inbox's ID.
- From (`start`, date and time, required): The start of the period.
- To (`end`, date and time, required): The end of the period.
- Business hours only (`business_hours`, true/false): Turn on to count only working hours.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "mailboxId": 204568,
    "tagReportsOutput": [
      {
        "firstResponseTime": 8237,
        "openConversations": 0,
        "resolutionTime": 11592,
        "responseTime": 15055,
        "tag": {
          "color": "#FF0000",
          "id": 363939,
          "inboxId": 204376,
          "name": "Black Friday Leads"
        },
        "totalConversations": 1064,
        "totalConversationsPercentage": 94.92
      }
    ],
    "totalTagReportsOutput": 10
  }
}
```

### List contacts

List one page of your Helpwise contacts.

**Inputs**

- Page size (`limit`, number): How many contacts a page holds. At least 1.
- Skip (`offset`, number): How many contacts to skip. At least 0.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "nextPage": false,
    "results": [
      {
        "company": "Acme",
        "emails": [
          "john.doe@example.com"
        ],
        "firstname": "John",
        "id": 1,
        "jobTitle": "Manager",
        "lastname": "Doe",
        "middlename": ""
      }
    ]
  }
}
```

### List conversations

List one page of the conversations in one or more inboxes.

**Inputs**

- Inbox IDs (`inbox_ids`, list, required): The IDs of the inboxes to read.
- Folder (`label`, text): Which conversations to list. All when empty. One of: `14` (All), `0` (Assigned), `10` (Unassigned), `11` (Starred), `9` (Snoozed), `2` (Draft), `1` (Sent), `7` (Closed), `8` (Spam), `5` (Trash), `6` (Scheduled).
- Page size (`limit`, number): How many conversations a page holds. At least 1.
- Next page (`page_token`, text): The nextPageToken from the page before, to read the page after it.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "nextPageToken": "2024-02-07 11:50:36",
    "threads": [
      {
        "assignedTo": {
          "displayName": "Rishabh Rawat",
          "email": "rishabh@example.com",
          "firstname": "Rishabh",
          "id": 222609,
          "lastname": "Rawat"
        },
        "date": "2024-02-07T11:50:36Z",
        "displayContact": "14156349606",
        "hasDraft": false,
        "id": 51041533,
        "inboxId": 221217,
        "inboxType": "sms",
        "isArchived": false,
        "isDeleted": false,
        "isRead": true,
        "isSnoozed": false,
        "isSpam": false,
        "isStarred": false,
        "messageCount": 2,
        "snippet": "Hello, how may I help you?",
        "subject": "Order question",
        "tags": [
          {
            "color": "#FF0000",
            "id": 363939,
            "inboxId": 204376,
            "name": "Black Friday Leads"
          }
        ],
        "ticketNumber": 51041533
      }
    ]
  }
}
```

### List custom fields

List your contact custom fields.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "createdAt": "2022-11-01 23:27:29",
        "description": "Pin code of customer location",
        "id": 204522,
        "inboxIds": [
          {
            "id": 221217,
            "isHidden": false,
            "name": "Support"
          }
        ],
        "name": "Pincode",
        "updatedAt": "2022-11-01 23:27:29"
      }
    ],
    "message": "Custom fields fetched successfully",
    "status": "success"
  }
}
```

### List inbox custom fields

List the custom fields and whether each is hidden in an inbox.

**Inputs**

- Inbox (`inbox_id`, number, required): The inbox's ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "createdAt": "2022-11-01 23:27:29",
        "description": "Pin code of customer location",
        "id": 204522,
        "inboxIds": [
          {
            "id": 221217,
            "isHidden": false,
            "name": "Support"
          }
        ],
        "name": "Pincode",
        "updatedAt": "2022-11-01 23:27:29"
      }
    ],
    "message": "Custom fields fetched successfully",
    "status": "success"
  }
}
```

### List tags

List your Helpwise tags.

**Inputs**: None.

**Outputs**

- `data` (list): The tags.

**Example output**

```json
{
  "data": [
    {
      "color": "#ff3d7f",
      "createdAt": "2022-08-31 16:50:38",
      "id": 1,
      "inbox": "Helpwise Support",
      "name": "Tag 1",
      "parentId": 2
    }
  ]
}
```

### Mark conversations as spam

Move conversations to spam.

**Inputs**

- Conversations (`ids`, list, required): The IDs of the conversations, up to 100.

**Outputs**

- `data` (object): Helpwise's answer; the docs show none.

**Example output**

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

### Move conversations to inbox

Reopen conversations by moving them back to the inbox.

**Inputs**

- Conversations (`ids`, list, required): The IDs of the conversations, up to 100.

**Outputs**

- `data` (object): Helpwise's answer; the docs show none.

**Example output**

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

### Move conversations to trash

Move conversations to the trash.

**Inputs**

- Conversations (`ids`, list, required): The IDs of the conversations, up to 100.

**Outputs**

- `data` (object): Helpwise's answer; the docs show none.

**Example output**

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

### Search contacts

Find contacts by name, email or other details.

**Inputs**

- Search (`term`, text, required): What to look for, such as a name or email.
- Page size (`limit`, number): How many contacts a page holds. At least 1.
- Skip (`offset`, number): How many contacts to skip. At least 0.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "nextPage": false,
    "result": [
      {
        "company": "Acme",
        "emails": [
          "john.doe@example.com"
        ],
        "firstname": "John",
        "id": 1,
        "jobTitle": "Manager",
        "lastname": "Doe",
        "middlename": ""
      }
    ]
  }
}
```

### Send SMS

Send or schedule a text message from an SMS inbox.

**Inputs**

- Inbox (`inbox_id`, number, required): The ID of the SMS or WhatsApp inbox to send from.
- To (`client_number`, text, required): The customer's phone number, with the country code, such as +14155550123.
- Message (`message`, text, required): The message.
- Send at (`send_at`, date and time): To schedule it, when to send it. Sends now when empty.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "body": "Hello, how may I help you?",
      "client_number": "14156349606",
      "delivery_status": "delivered",
      "direction": "outbound",
      "hw_number": "17377872107",
      "id": 2241589,
      "message_time": "2024-02-07 11:50:36",
      "segments": 1
    },
    "message": "Message sent successfully!",
    "status": "success"
  }
}
```

### Send WhatsApp message

Send or schedule a WhatsApp message, as text or from an approved template.

**Inputs**

- Inbox (`inbox_id`, number, required): The ID of the SMS or WhatsApp inbox to send from.
- To (`client_number`, text, required): The customer's phone number, with the country code, such as +14155550123.
- Message (`message`, text, required): The message.
- Send at (`send_at`, date and time): To schedule it, when to send it. Sends now when empty.
- Template ID (`template_id`, number): To send a template, its ID.
- Template values (`template_variables`, list): The template's values, in order.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "body": "Hello, how may I help you?",
      "client_number": "14156349606",
      "delivery_status": "delivered",
      "direction": "outbound",
      "hw_number": "17377872107",
      "id": 2241589,
      "message_time": "2024-02-07 11:50:36",
      "segments": 1
    },
    "message": "Message sent successfully!",
    "status": "success"
  }
}
```

### Tag conversations

Add tags to conversations.

**Inputs**

- Conversations (`thread_ids`, list, required): The IDs of the conversations.
- Tags (`tag_ids`, list, required): The IDs of the tags, from List tags.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "message": "Tags applied",
    "status": "success"
  }
}
```

### Untag conversations

Take tags off conversations.

**Inputs**

- Conversations (`thread_ids`, list, required): The IDs of the conversations.
- Tags (`tag_ids`, list, required): The IDs of the tags, from List tags.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "message": "Tags removed",
    "status": "success"
  }
}
```

### Update contact

Change a contact's details.

**Inputs**

- Contact (`contact_id`, number, required): The contact's ID, from List contacts or Search contacts.
- First name (`firstname`, text): Their first name.
- Last name (`lastname`, text): Their last name.
- Company (`company`, text): Their company.
- Job title (`job_title`, text): Their job title.
- Emails (`emails`, list): Their email addresses.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "company": "Helpwise",
    "displayName": "John Doe",
    "emails": [
      "john.doe@example.com"
    ],
    "firstname": "John",
    "id": 24621650,
    "isBlocked": false,
    "jobTitle": "Manager",
    "lastname": "Doe",
    "phones": [
      {
        "phoneNo": "19999999999",
        "phoneTxt": "19999999999",
        "type": "0"
      }
    ]
  }
}
```

### Update custom field

Rename a custom field or change its description.

**Inputs**

- Custom field (`custom_field_id`, number, required): The custom field. Pick one, or use an ID from List custom fields.
- Name (`name`, text): A new name.
- Description (`description`, text): A new description.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "createdAt": "2022-11-01 23:27:29",
      "description": "Pin code of customer location",
      "id": 204522,
      "inboxIds": [
        {
          "id": 221217,
          "isHidden": false,
          "name": "Support"
        }
      ],
      "name": "Pincode",
      "updatedAt": "2022-11-01 23:27:29"
    },
    "message": "Custom field updated successfully",
    "status": "success"
  }
}
```
