# InvGate Service Management

> Create, update, reassign, comment on, cancel and reopen InvGate Service Management requests, follow their links, observers and tasks, log time, look up users and search the Knowledge Base.

App · 29 actions. Web page: https://docs.lodol.com/docs/integrations/invgate

## Actions

### Add request comment

Reply to a request, or add an internal note, optionally as its solution.

**Inputs**

- Request ID (`request_id`, number, required): The request's ID, from an earlier step or the request's page.
- Done as (`author_id`, number, required): The agent the change is made as, by user ID.
- Comment (`comment`, text, required): The reply.
- Visible to customer (`customer_visible`, true/false): Show it to the customer. Off makes it an internal note.
- Solution (`is_solution`, true/false): Offer it as the request's solution.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "info": "example",
    "status": "example"
  }
}
```

### Add request observers

Add users who follow a request without working on it.

**Inputs**

- Request ID (`request_id`, number, required): The request's ID, from an earlier step or the request's page.
- Done as (`author_id`, number, required): The agent the change is made as, by user ID.
- Users (`users_id`, list, required): The users to add, by ID.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "info": "example",
    "status": "example"
  }
}
```

### Cancel request

Cancel a request.

**Inputs**

- Request ID (`request_id`, number, required): The request's ID, from an earlier step or the request's page.
- Done as (`author_id`, number, required): The agent the change is made as, by user ID.
- Comment (`comment`, text): Why it was cancelled.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "info": "example",
    "status": "example"
  }
}
```

### Create request

Create a request: an incident, a service request, a question, a problem or a change.

**Inputs**

- Title (`title`, text, required): The request's title.
- Category (`category_id`, number, required): The request's category.
- Type (`type_id`, text, required): What kind of request it is. One of: `1` (Incident), `2` (Service request), `3` (Question), `4` (Problem), `5` (Change), `6` (Major incident).
- Priority (`priority_id`, text, required): How urgent it is. One of: `1` (Low), `2` (Medium), `3` (High), `4` (Urgent), `5` (Critical).
- Description (`description`, text): What it is about.
- Customer ID (`customer_id`, number): The customer it is for, by user ID.
- Source (`source_id`, number): How it came in.
- Location (`location_id`, number): The location.
- Created by (`creator_id`, number, required): Who creates it, by user ID.
- Linked requests (`related_to`, list): Other requests to link it to, by ID.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "info": "example",
    "request_id": 1,
    "status": "example"
  }
}
```

### Find user

Find a user by their username or email address.

**Inputs**

- Username (`username`, text): The username.
- Email (`email`, text): The email address.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "department": "example",
    "email": "example",
    "employee_number": "example",
    "id": 1,
    "is_deleted": true,
    "is_disabled": true,
    "is_external": true,
    "lastname": "example",
    "location": "example",
    "manager_id": 1,
    "mobile": "example",
    "name": "example",
    "office": "example",
    "phone": "example",
    "position": "example",
    "role_name": "example",
    "type": 1,
    "user_type": 1,
    "username": "example"
  }
}
```

### Get request

Get a request (an incident, a service request, a problem or a change) by its ID, with its status, assignment and dates, and its comments if asked.

**Inputs**

- Request ID (`request_id`, number, required): The request's ID, from an earlier step or the request's page.
- Include comments (`comments`, true/false): Include the request's comments.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "assigned_group_id": 1,
    "assigned_id": 1,
    "attachments": [
      1
    ],
    "category_id": 1,
    "closed_at": "example",
    "closed_reason": "example",
    "comments": [
      {}
    ],
    "created_at": "example",
    "creator_id": 1,
    "custom_fields": {},
    "date_ocurred": "example",
    "description": "example",
    "id": 1,
    "last_update": "example",
    "location_id": 1,
    "pretty_id": "example",
    "priority_id": 1,
    "process_id": 1,
    "rating": 1,
    "sla_incident_first_reply": "example",
    "sla_incident_resolution": "example",
    "solved_at": "example",
    "source_id": 1,
    "status_id": 1,
    "title": "example",
    "type_id": 1,
    "user_id": 1
  }
}
```

### Get requests

Get several requests by their IDs.

**Inputs**

- Request IDs (`ids`, list, required): The requests' IDs.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "requests": [
      {
        "assigned_group_id": 1,
        "assigned_id": 1,
        "attachments": [
          1
        ],
        "category_id": 1,
        "closed_at": "example",
        "closed_reason": "example",
        "comments": [
          {}
        ],
        "created_at": "example",
        "creator_id": 1,
        "custom_fields": {},
        "date_ocurred": "example",
        "description": "example",
        "id": 1,
        "last_update": "example",
        "location_id": 1,
        "pretty_id": "example",
        "priority_id": 1,
        "process_id": 1,
        "rating": 1,
        "sla_incident_first_reply": "example",
        "sla_incident_resolution": "example",
        "solved_at": "example",
        "source_id": 1,
        "status_id": 1,
        "title": "example",
        "type_id": 1,
        "user_id": 1
      }
    ]
  }
}
```

### Get user

Get a user by their ID.

**Inputs**

- User ID (`person_id`, number, required): The user's ID.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "department": "example",
    "email": "example",
    "employee_number": "example",
    "id": 1,
    "is_deleted": true,
    "is_disabled": true,
    "is_external": true,
    "lastname": "example",
    "location": "example",
    "manager_id": 1,
    "mobile": "example",
    "name": "example",
    "office": "example",
    "phone": "example",
    "position": "example",
    "role_name": "example",
    "type": 1,
    "user_type": 1,
    "username": "example"
  }
}
```

### Get version

Get the InvGate Service Management instance's version.

**Inputs**: None.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "version": "example"
  }
}
```

### Link requests

Link other requests to a request.

**Inputs**

- Request ID (`request_id`, number, required): The request's ID, from an earlier step or the request's page.
- Requests to link (`request_ids`, list, required): The requests to link, by ID.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "info": "example",
    "status": "example"
  }
}
```

### List categories

List the request categories, or find them by name.

**Inputs**

- Search (`search`, text): Text in the category's name.
- Page size (`page_size`, number): How many per page, up to 500. InvGate's default is 20. From 1 to 500.
- Page (`page`, number): Which page, from 1. At least 1.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "categories": [
      {
        "id": 1,
        "name": "example",
        "parent_category_id": 1
      }
    ]
  }
}
```

### List help desks

List the active help desks.

**Inputs**

- Name (`name`, text): Only the help desk with this name.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "helpdesks": [
      {
        "engine_id": 1,
        "id": 1,
        "name": "example",
        "parent_id": 1,
        "status_id": 1,
        "total_members": 1
      }
    ]
  }
}
```

### List linked requests

List the requests linked to a request.

**Inputs**

- Request ID (`request_id`, number, required): The request's ID, from an earlier step or the request's page.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "requests": [
      {
        "id": 1,
        "title": "example"
      }
    ]
  }
}
```

### List open requests by customer

List a customer's open requests, by their user ID, username or email.

**Inputs**

- Customer ID (`customer_id`, number): The customer's user ID.
- Email (`email`, text): The customer's email address.
- Username (`username`, text): The customer's username.
- Page size (`limit`, number): How many per page. At least 1.
- Next page key (`page_key`, text): The next_page_key from an earlier page.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "next_page_key": "example",
    "requests": [
      {
        "assigned_group_id": 1,
        "assigned_id": 1,
        "attachments": [
          1
        ],
        "category_id": 1,
        "closed_at": "example",
        "closed_reason": "example",
        "comments": [
          {}
        ],
        "created_at": "example",
        "creator_id": 1,
        "custom_fields": {},
        "date_ocurred": "example",
        "description": "example",
        "id": 1,
        "last_update": "example",
        "location_id": 1,
        "pretty_id": "example",
        "priority_id": 1,
        "process_id": 1,
        "rating": 1,
        "sla_incident_first_reply": "example",
        "sla_incident_resolution": "example",
        "solved_at": "example",
        "source_id": 1,
        "status_id": 1,
        "title": "example",
        "type_id": 1,
        "user_id": 1
      }
    ]
  }
}
```

### List open requests by help desk

List the IDs of the open requests of the given help desks.

**Inputs**

- Help desks (`helpdesk_ids`, list, required): The help desks.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "limit": 1,
    "offset": 1,
    "requestIds": [
      1
    ],
    "status": "example",
    "total": 1
  }
}
```

### List open requests by status

List the IDs of the open requests in the given statuses.

**Inputs**

- Statuses (`status_ids`, list, required): The statuses.
- Page size (`limit`, number): How many per page. At least 1.
- Skip (`offset`, number): How many to skip. At least 0.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "limit": 1,
    "offset": 1,
    "requestIds": [
      1
    ],
    "status": "example",
    "total": 1
  }
}
```

### List request comments

List a request's replies and internal notes, or only its solution.

**Inputs**

- Request ID (`request_id`, number, required): The request's ID, from an earlier step or the request's page.
- Solution (`is_solution`, true/false): Only the solution (on), or only what isn't (off). Empty for both.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "comments": [
      {
        "attachments": [
          1
        ],
        "author_id": 1,
        "created_at": "example",
        "customer_visible": true,
        "id": 1,
        "incident_id": 1,
        "is_solution": true,
        "message": "example",
        "msg_num": 1,
        "reference": 1
      }
    ]
  }
}
```

### List request observers

List the IDs of a request's observers.

**Inputs**

- Request ID (`request_id`, number, required): The request's ID, from an earlier step or the request's page.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "user_ids": [
      1
    ]
  }
}
```

### List request statuses

List the request statuses.

**Inputs**: None.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

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

### List request tasks

List the tasks of a request.

**Inputs**

- Request ID (`request_id`, number, required): The request's ID, from an earlier step or the request's page.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "tasks": [
      {
        "agent_id": 1,
        "assignment_type": 1,
        "completed_at": 1,
        "created_at": 1,
        "description": "example",
        "expiration_date": 1,
        "helpdesk_id": 1,
        "is_predefined": true,
        "is_required": true,
        "linked_request_id": 1,
        "name": "example",
        "status": 1,
        "task_id": 1
      }
    ]
  }
}
```

### List requests from the last hour

List the requests created in the last hour.

**Inputs**

- Page size (`limit`, number): How many per page. At least 1.
- Next page key (`page_key`, text): The next_page_key from an earlier page.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "next_page_key": "example",
    "requests": [
      {
        "assigned_group_id": 1,
        "assigned_id": 1,
        "attachments": [
          1
        ],
        "category_id": 1,
        "closed_at": "example",
        "closed_reason": "example",
        "comments": [
          {}
        ],
        "created_at": "example",
        "creator_id": 1,
        "custom_fields": {},
        "date_ocurred": "example",
        "description": "example",
        "id": 1,
        "last_update": "example",
        "location_id": 1,
        "pretty_id": "example",
        "priority_id": 1,
        "process_id": 1,
        "rating": 1,
        "sla_incident_first_reply": "example",
        "sla_incident_resolution": "example",
        "solved_at": "example",
        "source_id": 1,
        "status_id": 1,
        "title": "example",
        "type_id": 1,
        "user_id": 1
      }
    ]
  }
}
```

### List time entries

List the time logged on a request.

**Inputs**

- Request ID (`request_id`, number, required): The request's ID, from an earlier step or the request's page.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "entries": [
      {
        "comment": "example",
        "from": "example",
        "incident": 1,
        "timetracking_category_id": 1,
        "to": "example",
        "total": "example",
        "user_id": 1
      }
    ]
  }
}
```

### List users

List the users, or only the agents, or the users with the given IDs.

**Inputs**

- User IDs (`ids`, list): Only the users with these IDs.
- Agents only (`agents_only`, true/false): Only agents, not end users.
- Include disabled (`include_disabled`, true/false): Include disabled users.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "users": [
      {
        "department": "example",
        "email": "example",
        "employee_number": "example",
        "id": 1,
        "is_deleted": true,
        "is_disabled": true,
        "is_external": true,
        "lastname": "example",
        "location": "example",
        "manager_id": 1,
        "mobile": "example",
        "name": "example",
        "office": "example",
        "phone": "example",
        "position": "example",
        "role_name": "example",
        "type": 1,
        "user_type": 1,
        "username": "example"
      }
    ]
  }
}
```

### Log time on request

Record time an agent spent on a request.

**Inputs**

- Request ID (`request_id`, number, required): The request's ID, from an earlier step or the request's page.
- Agent (`agent_id`, number, required): The agent who spent the time.
- From (`started_at`, date and time): When the work started. Defaults to now.
- To (`ended_at`, date and time, required): When the work ended.
- Category ID (`category_id`, number): The time tracking category's ID.
- Comment (`comment`, text): What was done.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "status": "example",
    "timetracking_id": 1
  }
}
```

### Reassign request

Assign a request to a help desk, and optionally to an agent in it.

**Inputs**

- Request ID (`request_id`, number, required): The request's ID, from an earlier step or the request's page.
- Done as (`author_id`, number, required): The agent the change is made as, by user ID.
- Help desk (`group_id`, number, required): The help desk to assign it to.
- Agent (`agent_id`, number): The agent to assign it to.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "info": "example",
    "status": "example"
  }
}
```

### Reopen request

Reopen a closed or solved request.

**Inputs**

- Request ID (`request_id`, number, required): The request's ID, from an earlier step or the request's page.
- Done as (`author_id`, number): The agent the change is made as, by user ID.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "info": "example",
    "status": "example"
  }
}
```

### Search Knowledge Base articles

Find Knowledge Base articles by keywords, best match first.

**Inputs**

- Keywords (`keywords`, text, required): The words to search for.
- Results (`limit`, number): How many to return. InvGate's default is 25. At least 1.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "articles": [
      {
        "category_id": 1,
        "content": "example",
        "creation_date": "example",
        "external_id": "example",
        "id": 1,
        "last_update_date": "example",
        "responsible_id": 1,
        "search_scoring": 1,
        "status": 1,
        "title": "example"
      }
    ]
  }
}
```

### Update request

Change a request's title, description, category, type, priority, customer, source or location. Fields left empty are kept.

**Inputs**

- Request ID (`request_id`, number, required): The request's ID, from an earlier step or the request's page.
- Title (`title`, text): A new title.
- Category (`category_id`, number): The request's category.
- Type (`type_id`, text): What kind of request it is. One of: `1` (Incident), `2` (Service request), `3` (Question), `4` (Problem), `5` (Change), `6` (Major incident).
- Priority (`priority_id`, text): How urgent it is. One of: `1` (Low), `2` (Medium), `3` (High), `4` (Urgent), `5` (Critical).
- Description (`description`, text): What it is about.
- Customer ID (`customer_id`, number): The customer it is for, by user ID.
- Source (`source_id`, number): How it came in.
- Location (`location_id`, number): The location.
- Reassign (`reassignment`, true/false): Reassign it to the help desk its new details point to.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "assigned_group_id": 1,
    "assigned_id": 1,
    "attachments": [
      1
    ],
    "category_id": 1,
    "closed_at": "example",
    "closed_reason": "example",
    "comments": [
      {}
    ],
    "created_at": "example",
    "creator_id": 1,
    "custom_fields": {},
    "date_ocurred": "example",
    "description": "example",
    "id": 1,
    "last_update": "example",
    "location_id": 1,
    "pretty_id": "example",
    "priority_id": 1,
    "process_id": 1,
    "rating": 1,
    "sla_incident_first_reply": "example",
    "sla_incident_resolution": "example",
    "solved_at": "example",
    "source_id": 1,
    "status_id": 1,
    "title": "example",
    "type_id": 1,
    "user_id": 1
  }
}
```

### Wait for customer

Mark a request as waiting for the customer.

**Inputs**

- Request ID (`request_id`, number, required): The request's ID, from an earlier step or the request's page.

**Outputs**

- `data` (object): The response from InvGate Service Management.

**Example output**

```json
{
  "data": {
    "info": "example",
    "status": "example"
  }
}
```
