> ## 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.

# Prism

> Connect Prism to KODE OS for work orders data

> Connect Prism to KODE OS for work orders data integration

## Overview

Use this integration to connect Prism (Building Engines) to KODE OS. You can sync work orders, photos, and task updates with hybrid collection—including historical data where enabled—and use supported actions from Data Sources.

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

## Supported Capabilities

* Collect Sensor Data
* Collect Non-Sensor Data
* Collect Historical Data

## Prerequisites

* An active account with Prism and access to their API or developer portal
* KODE OS environment with access to Data Sources

## Configure Connector in KODE OS

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

| Field                 | Required | Type     | Description                                          |
| --------------------- | -------- | -------- | ---------------------------------------------------- |
| **Tenant Account ID** | No       | password | The tenant account identifier in the external system |

## What Data You Get

### Work Orders

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

KODE OS maps Prism data to these standard fields:

| KODE Field          | Source Field                                                                                   | Notes                |
| ------------------- | ---------------------------------------------------------------------------------------------- | -------------------- |
| **id**              | `inspectionId`                                                                                 | --                   |
| **title**           | `identifier`                                                                                   | --                   |
| **description**     | `inspectionTypeName`                                                                           | --                   |
| **status**          | `status`                                                                                       | --                   |
| **assignedTo**      | `PrismUtils.resolveAssignedTo( Utils.getSafe(assignee, assignee -> assignee.email`             | transformed          |
| **assignmentGroup** | `teamAssignee.name`                                                                            | transformed          |
| **createdAt**       | `PrismUtils.toMillisUtc(createdAt`                                                             | --                   |
| **updatedAt**       | `PrismUtils.toMillisUtc(updatedAt`                                                             | --                   |
| **dueDate**         | `PrismUtils.toMillisUtc(dueDate`                                                               | --                   |
| **completedAt**     | `PrismUtils.toMillisUtc(completedAt`                                                           | --                   |
| **externalUrl**     | `url`                                                                                          | --                   |
| **customFields**    | `(custom fields)`                                                                              | custom fields object |
| **id**              | `id`                                                                                           | --                   |
| **title**           | `identifier`                                                                                   | --                   |
| **description**     | `name`                                                                                         | --                   |
| **status**          | `status`                                                                                       | --                   |
| **assignedTo**      | `PrismUtils.resolveAssignedTo( Utils.getSafe(assignee, assignee -> assignee.email`             | transformed          |
| **assignmentGroup** | `team_assignee.name`                                                                           | transformed          |
| **createdAt**       | `PrismUtils.toMillisUtc(created_at`                                                            | --                   |
| **updatedAt**       | `PrismUtils.toMillisUtc(updated_at`                                                            | --                   |
| **dueDate**         | `PrismUtils.toMillisUtc(due_date`                                                              | --                   |
| **completedAt**     | `PrismUtils.toMillisUtc(completed_at`                                                          | --                   |
| **serviceProvider** | `organization_assignee.name`                                                                   | transformed          |
| **estimatedCost**   | `total_cost + total_cost_currency`                                                             | --                   |
| **duration**        | `PrismUtils.getCompletionTimeInMinutes( created_at, notBlankOrDefault(completed_at, closed_at` | --                   |
| **customFields**    | `(custom fields)`                                                                              | custom fields object |
| **location**        | `equipment.location_details`                                                                   | --                   |
| **floor**           | `equipment.floor`                                                                              | --                   |
| **assetId**         | `equipment.id`                                                                                 | --                   |
| **assetName**       | `equipment.identifier`                                                                         | --                   |
| **assetType**       | `equipment`                                                                                    | transformed          |
| **location**        | `equipment.location_details`                                                                   | conditional          |
| **id**              | `id`                                                                                           | --                   |
| **title**           | `identifier`                                                                                   | --                   |
| **description**     | `description`                                                                                  | --                   |
| **status**          | `status`                                                                                       | --                   |
| **priority**        | `priority`                                                                                     | --                   |
| **location**        | `locationDetails`                                                                              | --                   |
| **floor**           | `floor`                                                                                        | --                   |
| **createdBy**       | `createdBy.email`                                                                              | transformed          |
| **assignedTo**      | `PrismUtils.resolveAssignedTo( Utils.getSafe(assignee, assignee -> assignee.email`             | transformed          |
| **assignmentGroup** | `teamAssignee.name`                                                                            | transformed          |
| **createdAt**       | `PrismUtils.toMillisUtc(createdAt`                                                             | --                   |
| **updatedAt**       | `PrismUtils.toMillisUtc(updatedAt`                                                             | --                   |
| **dueDate**         | `PrismUtils.toMillisUtc(dueDate`                                                               | --                   |
| **completedAt**     | `PrismUtils.toMillisUtc(completedAt`                                                           | --                   |
| **duration**        | `actualLaborHours`                                                                             | --                   |
| **estimatedCost**   | `totalCost`                                                                                    | --                   |
| **assetId**         | `equipmentId`                                                                                  | --                   |
| **externalUrl**     | `baseUrl`                                                                                      | --                   |
| **customFields**    | `(custom fields)`                                                                              | custom fields object |
| **category**        | `issueType.issueCategory`                                                                      | --                   |
| **subCategory**     | `issueType.name`                                                                               | --                   |
| **category**        | `issueType.issueCategory`                                                                      | conditional          |

### Polling Schedule

* **WorkOrder** -- Default polling: 10 minutes (min: 10 minutes, max: 1 days)
* **Inspections**

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

## Available Actions

### Create Work Order

**Type:** Write

Creates a new work order in Prism

| Field                | Type   | Required | Input     | Options / Default                             |
| -------------------- | ------ | -------- | --------- | --------------------------------------------- |
| **Issue Type**       | STRING | Yes      | Drop Down | Dynamic: fetched from Prism issue types API   |
| **Space**            | STRING | Yes      | Drop Down | Dynamic: fetched from Prism floors/spaces API |
| **Description**      | STRING | Yes      | Text Area | --                                            |
| **Location Details** | STRING | No       | Text Area | --                                            |
| **Image URL**        | STRING | No       | Text Area | --                                            |

#### Example Request

```json theme={null}
{
  "issue_type_id": "12345",
  "space_id": "12345",
  "description": "example-value",
  "location_details": "example-value",
  "url": "https://example.com/resource"
}
```

#### 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

### Cancel Work Order

**Type:** Write

Cancels an existing work order in Prism

| Field             | Type   | Required | Input    | Options / Default |
| ----------------- | ------ | -------- | -------- | ----------------- |
| **Work Order ID** | STRING | Yes      | Text Box | --                |

#### Example Request

```json theme={null}
{
  "work_order_id": "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. Double-check all credential fields match the values from the Prism platform.
  </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 Prism API.
  </Accordion>
</AccordionGroup>
