# SimpleKPI AI

> Track KPIs in SimpleKPI AI: record actuals and targets, manage KPIs and categories, and pull reports.

App · 22 actions. Web page: https://docs.lodol.com/docs/integrations/simplekpi-ai

## Actions

### Add or update KPI entry

Record an actual or target for a KPI on a date, updating the entry if that date already has one.

**Inputs**

- KPI (`kpi_id`, number, required): The KPI to record against.
- Date (`entry_date`, date, required): The date the value is for. It must suit the KPI's frequency: a weekly KPI refuses a mid-week date.
- Actual (`actual`, number): The value achieved.
- Target (`target`, number): The value aimed at.
- Notes (`notes`, text): Text to store with the entry, up to 500 characters.
- User (`user`, number): The person to record it against. Leave empty on a KPI with no breakdown.
- User email (`email`, text): Or the person's sign-in email, instead of User.
- Breakdown item (`source_id`, number): The breakdown item the value belongs to. Leave empty for the KPI's default.
- Write actual (`setActual`, true/false): Turn on to write Actual; off leaves the stored actual as it is.
- Write target (`setTarget`, true/false): Turn on to write Target; off leaves the stored target as it is.
- Write notes (`setNotes`, true/false): Turn on to write Notes; off leaves the stored notes as they are.
- Add to actual (`addToActual`, true/false): Turn on to add Actual to the stored value instead of replacing it.

**Outputs**

- `data` (object): The response from SimpleKPI AI.

**Example output**

```json
{
  "data": {
    "actual": 42,
    "created_at": "2026-08-04T09:12:00",
    "entry_date": "2026-08-03T00:00:00",
    "id": 987654,
    "kpi_id": 1234,
    "notes": "Strong week",
    "source_id": 0,
    "target": 50,
    "updated_at": "2026-08-04T09:12:00",
    "user_id": 42
  }
}
```

### Add or update many KPI entries

Record many actuals or targets in one go, updating any that already exist.

**Inputs**

- Entries (`entries`, list, required): The entries to write. Each needs a KPI and a date.
- Has actuals (`hasActuals`, true/false): Turn on when the entries carry actual values.
- Has targets (`hasTargets`, true/false): Turn on when the entries carry targets.
- Has notes (`hasNotes`, true/false): Turn on when the entries carry notes.

**Outputs**

- `data` (object): The response from SimpleKPI AI.

**Example output**

```json
{
  "data": {
    "rows_added": 2,
    "rows_rejected": 0
  }
}
```

### Create category

Add a KPI category.

**Inputs**

- Name (`name`, text, required): What the category is called, up to 50 characters.
- Position (`sort_order`, number): Where the category sits in the list.

**Outputs**

- `data` (object): The response from SimpleKPI AI.

**Example output**

```json
{
  "data": {
    "created_at": "2026-02-21T10:57:00",
    "id": 5478,
    "name": "Sales",
    "sort_order": 1,
    "updated_at": "2026-02-21T10:57:00"
  }
}
```

### Create KPI

Add a KPI to a category.

**Inputs**

- Category (`category_id`, number, required): The category the KPI goes in.
- Name (`name`, text, required): What the KPI is called, up to 100 characters.
- Frequency (`frequency_id`, text, required): How often data is entered against it. One of: `D` (Daily), `W` (Weekly), `M` (Monthly), `Q` (Quarterly), `Y` (Yearly).
- Good direction (`value_direction`, text, required): Which way the KPI has to move to be doing well. One of: `U` (Up is good), `D` (Down is good), `N` (Neither).
- Roll-up (`aggregate_function`, text, required): How its values combine over a period. One of: `SUM` (Add the values together), `AVG` (Average the values).
- Icon (`icon_id`, number, required): The icon shown with the KPI. SimpleKPI refuses a KPI without one.
- Unit (`unit_id`, number, required): How its values are formatted. SimpleKPI refuses a KPI without one.
- Description (`description`, text): Text shown with the KPI, up to 150 characters.
- Default target (`target_default`, number): The target new entries get when none is given. Leave empty for no target.
- Position (`sort_order`, number): Where the KPI sits in its category.
- Active (`is_active`, true/false): Turn off to hide the KPI from day-to-day views.

**Outputs**

- `data` (object): The response from SimpleKPI AI.

**Example output**

```json
{
  "data": {
    "aggregate_function": "SUM",
    "category_id": 5478,
    "created_at": "2026-02-21T10:57:00",
    "description": "Closed-won deals per week",
    "frequency_id": "W",
    "icon_id": 1,
    "id": 1234,
    "is_active": true,
    "is_calculated": false,
    "name": "New Sales",
    "sort_order": 1,
    "target_default": 100,
    "unit_id": 123,
    "updated_at": "2026-02-21T10:58:00",
    "value_direction": "U"
  }
}
```

### Delete category

Delete an empty KPI category.

**Inputs**

- Category (`id`, number, required): The category to delete. It must have no KPIs.

**Outputs**

- `data` (object): The response from SimpleKPI AI.

**Example output**

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

### Delete KPI

Delete a KPI and every entry recorded against it. This can't be undone.

**Inputs**

- KPI (`id`, number, required): The KPI to delete.

**Outputs**

- `data` (object): The response from SimpleKPI AI.

**Example output**

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

### Delete KPI entry

Delete one KPI entry.

**Inputs**

- Entry ID (`id`, number, required): The entry to delete, from List KPI entries.

**Outputs**

- `data` (object): The response from SimpleKPI AI.

**Example output**

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

### Get actuals and targets report

Get actuals and targets for KPIs over a date range, rolled up to each KPI's own frequency.

**Inputs**

- KPIs (`kpiIDs`, list): The KPIs to report on. Leave empty for all.
- From (`dateFrom`, date): Start of the date range.
- To (`dateTo`, date): End of the date range.
- Breakdown items (`groupItemIDs`, list): Only these breakdown items.
- Users (`userIDs`, list): Only these users.

**Outputs**

- `data` (list): The response from SimpleKPI AI.

**Example output**

```json
{
  "data": [
    {
      "actual": 42,
      "direction": "U",
      "direction_name": "Up",
      "entry_date": "2026-08-03",
      "has_target": true,
      "is_percentage": false,
      "item_id": 0,
      "item_name": "Global",
      "kpi_description": "Closed-won deals per week",
      "kpi_id": 1234,
      "kpi_name": "New Sales",
      "label_format": "#,##0",
      "notes": "Strong week",
      "period": "Weekly",
      "period_id": "W",
      "target": 50
    }
  ]
}
```

### Get breakdown item

Get one breakdown item by its ID.

**Inputs**

- Breakdown item (`id`, number, required): The breakdown item to get.

**Outputs**

- `data` (object): The response from SimpleKPI AI.

**Example output**

```json
{
  "data": {
    "breakdown_id": 12,
    "created_at": "2026-02-21T10:57:00",
    "id": 77,
    "is_archived": false,
    "is_system": false,
    "name": "North",
    "sort_order": 1,
    "updated_at": "2026-02-21T10:57:00",
    "user_id": 42
  }
}
```

### Get KPI

Get one KPI by its ID.

**Inputs**

- KPI (`id`, number, required): The KPI to get.

**Outputs**

- `data` (object): The response from SimpleKPI AI.

**Example output**

```json
{
  "data": {
    "aggregate_function": "SUM",
    "category_id": 5478,
    "created_at": "2026-02-21T10:57:00",
    "description": "Closed-won deals per week",
    "frequency_id": "W",
    "icon_id": 1,
    "id": 1234,
    "is_active": true,
    "is_calculated": false,
    "name": "New Sales",
    "sort_order": 1,
    "target_default": 100,
    "unit_id": 123,
    "updated_at": "2026-02-21T10:58:00",
    "value_direction": "U"
  }
}
```

### Get KPI entry

Get one KPI entry by its ID.

**Inputs**

- Entry ID (`id`, number, required): The entry to get, from List KPI entries.

**Outputs**

- `data` (object): The response from SimpleKPI AI.

**Example output**

```json
{
  "data": {
    "actual": 42,
    "created_at": "2026-08-04T09:12:00",
    "entry_date": "2026-08-03T00:00:00",
    "id": 987654,
    "kpi_id": 1234,
    "notes": "Strong week",
    "source_id": 0,
    "target": 50,
    "updated_at": "2026-08-04T09:12:00",
    "user_id": 42
  }
}
```

### List breakdown items

List the parts your KPIs can be broken down by, such as people, teams or regions.

**Inputs**

- Page (`page`, number): Which page of items to read, counting from 1. At least 1.
- Page size (`rows`, number): How many items a page holds. SimpleKPI uses 500 if left empty. At least 1.

**Outputs**

- `data` (list): The response from SimpleKPI AI.

**Example output**

```json
{
  "data": [
    {
      "breakdown_id": 12,
      "created_at": "2026-02-21T10:57:00",
      "id": 77,
      "is_archived": false,
      "is_system": false,
      "name": "North",
      "sort_order": 1,
      "updated_at": "2026-02-21T10:57:00",
      "user_id": 42
    }
  ]
}
```

### List categories

List the categories that group your KPIs.

**Inputs**

- Page (`page`, number): Which page of categories to read, counting from 1. At least 1.
- Page size (`rows`, number): How many categories a page holds. SimpleKPI uses 500 if left empty. At least 1.

**Outputs**

- `data` (list): The response from SimpleKPI AI.

**Example output**

```json
{
  "data": [
    {
      "created_at": "2026-02-21T10:57:00",
      "id": 5478,
      "name": "Sales",
      "sort_order": 1,
      "updated_at": "2026-02-21T10:57:00"
    }
  ]
}
```

### List frequencies

List how often data can be entered against a KPI, such as daily or weekly.

**Inputs**: None.

**Outputs**

- `data` (list): The response from SimpleKPI AI.

**Example output**

```json
{
  "data": [
    {
      "id": "W",
      "name": "Weekly"
    }
  ]
}
```

### List icons

List the icons a KPI can be given.

**Inputs**: None.

**Outputs**

- `data` (list): The response from SimpleKPI AI.

**Example output**

```json
{
  "data": [
    {
      "id": 1,
      "name": "Bar chart"
    }
  ]
}
```

### List KPI entries

List the actuals and targets recorded against your KPIs.

**Inputs**

- KPI (`kpiId`, number): Only entries for this KPI.
- User (`userId`, number): Only entries recorded against this user.
- Breakdown item (`sourceId`, number): Only entries for this breakdown item.
- From (`dateFrom`, date): Only entries on or after this date.
- To (`dateTo`, date): Only entries on or before this date.
- Page (`page`, number): Which page of entries to read, counting from 1. At least 1.
- Page size (`rows`, number): How many entries a page holds. SimpleKPI uses 500 if left empty. At least 1.

**Outputs**

- `data` (list): The response from SimpleKPI AI.

**Example output**

```json
{
  "data": [
    {
      "actual": 42,
      "created_at": "2026-08-04T09:12:00",
      "entry_date": "2026-08-03T00:00:00",
      "id": 987654,
      "kpi_id": 1234,
      "notes": "Strong week",
      "source_id": 0,
      "target": 50,
      "updated_at": "2026-08-04T09:12:00",
      "user_id": 42
    }
  ]
}
```

### List KPIs

List the KPIs on your account.

**Inputs**

- Page (`page`, number): Which page of KPIs to read, counting from 1. At least 1.
- Page size (`rows`, number): How many KPIs a page holds. SimpleKPI uses 500 if left empty. At least 1.

**Outputs**

- `data` (list): The response from SimpleKPI AI.

**Example output**

```json
{
  "data": [
    {
      "aggregate_function": "SUM",
      "category_id": 5478,
      "created_at": "2026-02-21T10:57:00",
      "description": "Closed-won deals per week",
      "frequency_id": "W",
      "icon_id": 1,
      "id": 1234,
      "is_active": true,
      "is_calculated": false,
      "name": "New Sales",
      "sort_order": 1,
      "target_default": 100,
      "unit_id": 123,
      "updated_at": "2026-02-21T10:58:00",
      "value_direction": "U"
    }
  ]
}
```

### List KPIs in category

List the KPIs in one category.

**Inputs**

- Category (`category_id`, number, required): The category to list.
- Page (`page`, number): Which page of KPIs to read, counting from 1. At least 1.
- Page size (`rows`, number): How many KPIs a page holds. SimpleKPI uses 500 if left empty. At least 1.

**Outputs**

- `data` (list): The response from SimpleKPI AI.

**Example output**

```json
{
  "data": [
    {
      "aggregate_function": "SUM",
      "category_id": 5478,
      "created_at": "2026-02-21T10:57:00",
      "description": "Closed-won deals per week",
      "frequency_id": "W",
      "icon_id": 1,
      "id": 1234,
      "is_active": true,
      "is_calculated": false,
      "name": "New Sales",
      "sort_order": 1,
      "target_default": 100,
      "unit_id": 123,
      "updated_at": "2026-02-21T10:58:00",
      "value_direction": "U"
    }
  ]
}
```

### List units

List the units that set how KPI values are typed in and shown.

**Inputs**

- Page (`page`, number): Which page of units to read, counting from 1. At least 1.
- Page size (`rows`, number): How many units a page holds. SimpleKPI uses 500 if left empty. At least 1.

**Outputs**

- `data` (list): The response from SimpleKPI AI.

**Example output**

```json
{
  "data": [
    {
      "created_at": "2026-02-21T10:57:00",
      "display_format": "#,##0",
      "entry_format": "#,##0.00",
      "id": 123,
      "is_percentage": false,
      "name": "Pounds",
      "updated_at": "2026-02-21T10:57:00"
    }
  ]
}
```

### List users

List the people on your account.

**Inputs**

- Page (`page`, number): Which page of users to read, counting from 1. At least 1.
- Page size (`rows`, number): How many users a page holds. SimpleKPI uses 500 if left empty. At least 1.

**Outputs**

- `data` (list): The response from SimpleKPI AI.

**Example output**

```json
{
  "data": [
    {
      "created_at": "2026-01-14T09:00:00",
      "email": "alex@example.com",
      "first_name": "Alex",
      "id": 42,
      "last_name": "Okafor",
      "updated_at": "2026-05-02T11:00:00",
      "user_status_id": "A",
      "user_type": "Manager"
    }
  ]
}
```

### Update KPI

Replace a KPI's settings. Anything left empty goes back to its default.

**Inputs**

- KPI (`id`, number, required): The KPI to change.
- Category (`category_id`, number, required): The category the KPI goes in.
- Name (`name`, text, required): What the KPI is called, up to 100 characters.
- Frequency (`frequency_id`, text, required): How often data is entered against it. One of: `D` (Daily), `W` (Weekly), `M` (Monthly), `Q` (Quarterly), `Y` (Yearly).
- Good direction (`value_direction`, text, required): Which way the KPI has to move to be doing well. One of: `U` (Up is good), `D` (Down is good), `N` (Neither).
- Roll-up (`aggregate_function`, text, required): How its values combine over a period. One of: `SUM` (Add the values together), `AVG` (Average the values).
- Icon (`icon_id`, number, required): The icon shown with the KPI. SimpleKPI refuses a KPI without one.
- Unit (`unit_id`, number, required): How its values are formatted. SimpleKPI refuses a KPI without one.
- Description (`description`, text): Text shown with the KPI, up to 150 characters.
- Default target (`target_default`, number): The target new entries get when none is given. Leave empty for no target.
- Position (`sort_order`, number): Where the KPI sits in its category.
- Active (`is_active`, true/false): Turn off to hide the KPI from day-to-day views.

**Outputs**

- `data` (object): The response from SimpleKPI AI.

**Example output**

```json
{
  "data": {
    "aggregate_function": "SUM",
    "category_id": 5478,
    "created_at": "2026-02-21T10:57:00",
    "description": "Closed-won deals per week",
    "frequency_id": "W",
    "icon_id": 1,
    "id": 1234,
    "is_active": true,
    "is_calculated": false,
    "name": "New Sales",
    "sort_order": 1,
    "target_default": 100,
    "unit_id": 123,
    "updated_at": "2026-02-21T10:58:00",
    "value_direction": "U"
  }
}
```

### Update KPI entry

Change the values of one KPI entry.

**Inputs**

- Entry ID (`id`, number, required): The entry to change, from List KPI entries.
- Actual (`actual`, number): The value achieved.
- Target (`target`, number): The value aimed at.
- Notes (`notes`, text): Text to store with the entry, up to 500 characters.
- Write actual (`setActual`, true/false): Turn on to write Actual; off leaves the stored actual as it is.
- Write target (`setTarget`, true/false): Turn on to write Target; off leaves the stored target as it is.
- Write notes (`setNotes`, true/false): Turn on to write Notes; off leaves the stored notes as they are.
- Add to actual (`addToActual`, true/false): Turn on to add Actual to the stored value instead of replacing it.

**Outputs**

- `data` (object): The response from SimpleKPI AI.

**Example output**

```json
{
  "data": {
    "actual": 42,
    "created_at": "2026-08-04T09:12:00",
    "entry_date": "2026-08-03T00:00:00",
    "id": 987654,
    "kpi_id": 1234,
    "notes": "Strong week",
    "source_id": 0,
    "target": 50,
    "updated_at": "2026-08-04T09:12:00",
    "user_id": 42
  }
}
```
