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

# Cfs GS

> Connect Cfs GS to KODE OS for work orders, asset, reservations, other data

> Connect Cfs GS to KODE OS for work orders, asset, reservations, other data integration

## Overview

Use this integration to connect CFS GS to KODE OS for work orders, assets, reservations, and related data. You can discover devices and points, collect operational data with hybrid snapshot collection, and run supported connector actions where the API allows.

| Property            | Value                                   |
| ------------------- | --------------------------------------- |
| **System Type**     | Work Orders, Asset, Reservations, Other |
| **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
* Discover Assets

## Prerequisites

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

## Generate API Credentials

1. Log in to the Cfs GS 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

## Configure Connector in KODE OS

1. Navigate to **Data Sources** in your building
2. Click **API Catalog** and search for **Cfs GS**
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        |
| **Client ID**       | Yes      | password | The OAuth client ID from the vendor's developer portal   |
| **Tenant ID**       | Yes      | password | The tenant identifier in the external system             |
| **API Building ID** | Yes      | text     | The building or source identifier in the external system |
| **Environment**     | Yes      | dropdown | The deployment environment to connect to                 |

## Discover Devices and Points

After configuring the connector, click **Discover** on the connector detail page. KODE OS will query the Cfs GS 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

| Point              | Display Name     |
| ------------------ | ---------------- |
| `msdyn_name`       | msdyn name       |
| `gs_criticality`   | gs criticality   |
| `gs_type`          | gs type          |
| `gs_locationarea`  | gs locationarea  |
| `gs_macaddress`    | gs macaddress    |
| `gs_model`         | gs model         |
| `gs_installeddate` | gs installeddate |
| `statuscode`       | statuscode       |

## 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 Cfs GS data to these standard fields:

| KODE Field            | Source Field                                      | Notes                |
| --------------------- | ------------------------------------------------- | -------------------- |
| **id**                | `workOrder.msdynWorkOrderId`                      | --                   |
| **title**             | `workOrder.msdynName`                             | --                   |
| **description**       | `workOrder.gsWorkOrderDetails`                    | --                   |
| **status**            | `workOrder.gsWoStatusFormatted`                   | --                   |
| **priority**          | `workOrder.msdynPriorityValueFormatted`           | --                   |
| **category**          | `workOrder.msdynWorkOrderTypeValueFormattedValue` | --                   |
| **subCategory**       | `workOrder.gsWoClassValueFormatted`               | --                   |
| **location**          | `workOrder.gsDeskLocation`                        | --                   |
| **floor**             | `workOrder.gsFloorFormula`                        | --                   |
| **createdBy**         | `workOrder.createdByValueFormatted`               | --                   |
| **assignedTo**        | `workOrder.gsAssignedToValueFormatted`            | --                   |
| **assignmentGroup**   | `workOrder.gsAssignedToPoolValueFormatted`        | --                   |
| **createdAt**         | `workOrder.createdOn`                             | transformed          |
| **updatedAt**         | `workOrder.modifiedOn`                            | transformed          |
| **dueDate**           | `workOrder.msdynDateWindowEnd`                    | transformed          |
| **startedAt**         | `workOrder.gsWorkStartDateOnWo`                   | transformed          |
| **completedAt**       | `workOrder.gsDateCompleted`                       | transformed          |
| **duration**          | `workOrder.gsHoursWorkedOnWorkOrder`              | --                   |
| **serviceProvider**   | `workOrder.gsServiceProviderIdValue`              | --                   |
| **problemCause**      | `workOrder.gsProblemCodeOnWoValue`                | --                   |
| **resolutionDetails** | `workOrder.msdynWorkOrderResolutionKpiIdValue`    | --                   |
| **lastComment**       | `workOrder.gsComments`                            | --                   |
| **assetName**         | `workOrder.msdynCustomerAsset`                    | --                   |
| **externalUrl**       | `workOrder.gsRecordUrl`                           | --                   |
| **customFields**      | `(custom fields)`                                 | custom fields object |

### Assets

Asset inventory records including asset type, location, condition, and associated metadata

### Polling Schedule

* **WorkOrder** -- Default polling: 5 minutes (min: 5 minutes, max: 60 minutes)
* **Asset** -- Default polling: 15 minutes (min: 5 minutes, max: 60 minutes)
* **GsPmSchedule** -- Default polling: 1 hours (min: 1 hours, max: 6 hours)
* **GsBookLabor** -- Default polling: 7 days (min: 7 days, max: 7 days)
* **GsBooking**
* **GsBookingDate**
* **GsServiceRequest**
* **GsSurvey**
* **GsServiceProvider**
* **GsBuilding**

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 the CFS GS (Dynamics 365 Field Service) system

| Field               | Type   | Required | Input     | Options / Default                                                              |
| ------------------- | ------ | -------- | --------- | ------------------------------------------------------------------------------ |
| **Project ID**      | STRING | Yes      | Text Area | KODE Alarm                                                                     |
| **Description**     | STRING | Yes      | Text Area | --                                                                             |
| **Priority**        | STRING | Yes      | Text Area | Life-Safety → High, Critical → High, Warning → Medium, Alert → Low, Info → Low |
| **Work Order Type** | STRING | Yes      | Drop Down | Dynamic: fetched from CFS work order types API                                 |
| **CFS Asset**       | STRING | Yes      | Drop Down | Dynamic: fetched from CFS customer assets API                                  |
| **Incident Type**   | STRING | Yes      | Drop Down | Dynamic: fetched from CFS incident types API (auto-filled for alarm-type WOs)  |
| **Safety Related**  | STRING | Yes      | Drop Down | Static: NO, YES                                                                |
| **Assignee**        | STRING | Yes      | Drop Down | Dynamic: fetched from CFS bookable resources API                               |
| **Comment**         | STRING | Yes      | Text Area | --                                                                             |

#### Example Request

```json theme={null}
{
  "gsProjectidJmac": "12345",
  "gs_workorderdetails": "example-value",
  "msdyn_priority": "High",
  "msdyn_workordertype": "example-value",
  "msdyn_customerasset": "example-value",
  "msdyn_primaryincidenttype": "12345",
  "gs_safetyrelated": "NO",
  "gs_AssignedTo": "example-value",
  "gs_comments": "example-value"
}
```

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

### Create Asset

**Type:** Write

Creates a new asset record in the CFS GS system

| Field                 | Type   | Required | Input     | Options / Default |
| --------------------- | ------ | -------- | --------- | ----------------- |
| **Name**              | STRING | Yes      | Text Box  | --                |
| **Criticality**       | STRING | Yes      | Drop Down | --                |
| **Type**              | STRING | No       | Drop Down | --                |
| **Location**          | STRING | No       | Text Box  | --                |
| **MAC Address**       | STRING | No       | Text Box  | --                |
| **Model**             | STRING | No       | Text Box  | --                |
| **Serial Number**     | STRING | No       | Text Box  | --                |
| **Installation Date** | DATE   | No       | Text Box  | --                |

#### Example Request

```json theme={null}
{
  "msdyn_name": "example-value",
  "gs_criticality": "example-value",
  "gs_type": "example-value",
  "gs_locationArea": "example-value"
}
```

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

### Update Asset

**Type:** Write

Updates an existing asset record in the CFS GS system

| Field                 | Type   | Required | Input     | Options / Default |
| --------------------- | ------ | -------- | --------- | ----------------- |
| **Name**              | STRING | Yes      | Text Box  | --                |
| **Criticality**       | STRING | Yes      | Drop Down | --                |
| **Type**              | STRING | No       | Drop Down | --                |
| **Location**          | STRING | No       | Text Box  | --                |
| **MAC Address**       | STRING | No       | Text Box  | --                |
| **Model**             | STRING | No       | Text Box  | --                |
| **Serial Number**     | STRING | No       | Text Box  | --                |
| **Installation Date** | DATE   | No       | Text Box  | --                |

#### Example Request

```json theme={null}
{
  "msdyn_name": "example-value",
  "gs_criticality": "example-value",
  "gs_type": "example-value",
  "gs_locationArea": "example-value"
}
```

#### 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
* Centralize space and resource booking data across platforms

## 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 Cfs GS developer portal.
  </Accordion>

  <Accordion title="Discovery returns no devices">
    Verify the connector credentials have sufficient permissions in the Cfs GS 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 Cfs GS API.
  </Accordion>
</AccordionGroup>
