> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.kodelabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Service Channel

> Connect Service Channel to KODE OS for work orders data

> Connect Service Channel to KODE OS for work orders data integration

## Overview

Use this integration to connect Service Channel to KODE OS. You can discover devices and points, sync work order data with hybrid snapshot collection, create work orders from KODE OS workflows and automations, and use supported connector actions where enabled.

| Property            | Value                |
| ------------------- | -------------------- |
| **System Type**     | Work Orders          |
| **Communication**   | REST                 |
| **Collection**      | Hybrid (Pull + Push) |
| **Collection Mode** | SNAPSHOT             |
| **Actions**         | Supported            |

## Supported Capabilities

* Discover Devices & Points
* Collect Sensor Data
* Collect Non-Sensor Data
* Collect Historical Data
* Collect Historical Multi-Entity Data

## Prerequisites

* An active account with Service Channel and access to their API or developer portal
* OAuth client credentials (Client ID and Client Secret) from the Service Channel developer portal
* KODE OS environment with access to Data Sources

## Generate API Credentials

1. Log in to the Service Channel developer portal or admin console
2. Navigate to the API or developer settings section
3. Create a new API application or client
4. Note the **Client ID** and **Client Secret** -- you will need these when configuring the connector in KODE OS
5. Note the **Auth URL** for OAuth token exchange

## Configure Connector in KODE OS

1. Navigate to **Data Sources** in your building
2. Click **API Catalog** and search for **Service Channel**
3. Click **+ Add Datasource**
4. Fill in the fields below and complete the three-page setup flow

| Field             | Required | Type     | Description                                                |
| ----------------- | -------- | -------- | ---------------------------------------------------------- |
| **URL**           | Yes      | text     | The base URL or IP address of the external system          |
| **Auth URL**      | Yes      | text     | The OAuth authorization URL for token exchange             |
| **Username**      | Yes      | text     | The username for authenticating with the external system   |
| **Password**      | Yes      | password | The password for authenticating with the external system   |
| **Client ID**     | Yes      | password | The OAuth client ID from the vendor's developer portal     |
| **Client Secret** | Yes      | password | The OAuth client secret from the vendor's developer portal |
| **Store ID**      | Yes      | text     | The store identifier in the external system                |

## Discover Devices and Points

After configuring the connector, click **Discover** on the connector detail page. KODE OS will query the Service Channel system and return a list of available devices and their data points.

Review the discovered items and select the devices you want to register in KODE OS.

For more details on the discovery process, see the [Discovery guide](/products/integrations/capabilities/discovery).

## Devices and Points

When you discover devices from Service Channel, KODE OS maps them to the following device types and data points:

### Connected Device

Canonical Type: `default`

| # | Point               | Description                                                           | Unit | Writable | Collection |
| - | ------------------- | --------------------------------------------------------------------- | ---- | -------- | ---------- |
| 1 | `connection_status` | **True** -- device is connected / **False** -- device is disconnected | --   | No       | Polling    |

## What Data You Get

### Point History

Time-series readings including connection\_status, collected at regular intervals from connected devices

### Work Orders

Maintenance and service requests including title, description, status, priority, assignee, due dates, vendor response, resolution details, and cost estimates

KODE OS maps Service Channel data to these standard fields:

| KODE Field            | Source Field           | Notes                |
| --------------------- | ---------------------- | -------------------- |
| **id**                | `id`                   | --                   |
| **woNumber**          | `number`               | --                   |
| **title**             | `category`             | --                   |
| **description**       | `description`          | --                   |
| **status**            | `status.primary`       | transformed          |
| **priority**          | `priority`             | --                   |
| **category**          | `trade`                | --                   |
| **subCategory**       | `problemCode`          | --                   |
| **location**          | `(formatted location)` | --                   |
| **createdBy**         | `createdBy`            | --                   |
| **assignedTo**        | `assignee.userName`    | transformed          |
| **createdAt**         | `callDate`             | transformed          |
| **updatedAt**         | `updatedDate`          | transformed          |
| **dueDate**           | `scheduledDate`        | transformed          |
| **completedAt**       | `completedDate`        | transformed          |
| **serviceProvider**   | `provider.name`        | transformed          |
| **resolutionDetails** | `resolution`           | --                   |
| **estimatedCost**     | `nte`                  | --                   |
| **externalUrl**       | `id`                   | --                   |
| **customFields**      | `(custom fields)`      | custom fields object |
| **lastComment**       | `notes.last.noteData`  | --                   |
| **lastCommentBy**     | `notes.last.createdBy` | --                   |
| **assetId**           | `asset.id`             | --                   |
| **assetType**         | `asset.type`           | --                   |
| **assetName**         | `asset.tag`            | --                   |
| **lastComment**       | `notes.last.noteData`  | conditional          |
| **assetId**           | `asset.id`             | conditional          |

### Polling Schedule

* **Point History** -- Default polling: 15 minutes (min: 15 minutes, max: 1 hours)
* **WorkOrder** -- Default polling: 15 minutes (min: 15 minutes, max: 1 days)

For more details on collection modes, see the [Data Collection guide](/products/integrations/capabilities/data-collection).

## Available Actions

### Create Service Channel Work Order

**Type:** Write

Creates a new work order in Service Channel (Lowes configuration)

| Field                | Type   | Required | Input     | Options / Default                                       |
| -------------------- | ------ | -------- | --------- | ------------------------------------------------------- |
| **Location**         | STRING | Yes      | Drop Down | Dynamic: fetched from location associations             |
| **Category**         | STRING | Yes      | Drop Down | Repair/Reactive                                         |
| **Problem Code**     | STRING | Yes      | Drop Down | KODE FDD                                                |
| **Priority**         | STRING | Yes      | Drop Down | Static: P1, P2, P3, P4                                  |
| **NTE (Max Amount)** | STRING | Yes      | Number    | 0.00                                                    |
| **Description**      | STRING | Yes      | Text Box  | --                                                      |
| **Trade Name**       | STRING | Yes      | Drop Down | Dynamic: fetched from trades API (filtered by location) |
| **Provider**         | STRING | No       | Drop Down | Dynamic: fetched from providers API (filtered by trade) |

#### Example Request

```json theme={null}
{
  "locationId": "12345",
  "category": "example-value",
  "problemCode": "example-value",
  "priority": "P1",
  "nte": "example-value",
  "description": "example-value",
  "trade": "example-value",
  "providerId": "12345"
}
```

#### Expected Result

* KODE OS sends the action to the external API using the configured connector credentials
* The external system returns success (typically HTTP 2xx) and processes the requested operation

For more details on how actions work, see the [Actions guide](/products/integrations/capabilities/actions).

## Use Cases

Once connected, this integration enables you to:

* Centralize maintenance requests and work order status from facility management systems
* Create and update work orders directly from KODE OS when issues are detected
* Track maintenance KPIs including response time, completion rate, and cost

## Troubleshooting

<AccordionGroup>
  <Accordion title="Authentication or connection error">
    Verify that the credentials are correct and have not expired. Check that the URL is reachable from the KODE OS environment. Ensure the Client ID and Client Secret match the values from the Service Channel developer portal.
  </Accordion>

  <Accordion title="Discovery returns no devices">
    Verify the connector credentials have sufficient permissions in the Service Channel system to list devices. Run a test connection first to confirm connectivity. Some systems require specific API scopes or roles for device enumeration.
  </Accordion>

  <Accordion title="Data collection stops or gaps appear">
    Check the connector status on the Data Sources page. If the status shows an error, review the error logs on the connector detail page. Common causes include expired credentials, network changes, or rate limiting by the Service Channel API.
  </Accordion>
</AccordionGroup>
