--- title: "Configure KPI Rollups" slug: "configure-kpi-rollups" updated: 2025-12-22T15:49:44Z published: 2025-12-22T15:49:44Z canonical: "docs.sightmachine.com/configure-kpi-rollups" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.sightmachine.com/llms.txt > Use this file to discover all available pages before exploring further. # Configure KPI Rollups ## **Overview** KPI rollups let you control which machines are included when calculating Key Performance Indicators at the factory and line level on the Factory Analyze homepage. Instead of automatically including all machines, you can specify exactly which machines contribute to each KPI calculation. --- ## **Find Factory and Line IDs** Factory and line IDs are not visible in the UI and must be retrieved the following method. ### **Step 1: Get the Factory ID from the URL** ![](https://cdn.us.document360.io/c65001f1-30e3-4f1d-b335-57abf64ebd31/Images/Documentation/Untitled design (12)(1).gif) 1. Navigate to the **Factory Analyze homepage** 2. Select a F**acility** to open the facility detail page 3. Look at the **URL in your browser's address bar** - URL format: `https://<tenant>.sightmachine.io/eb/facility/<factory_id>` - Example: `https://acme.sightmachine.io/eb/facility/ETL3_Atlanta` - The factory ID is: `ETL3_Atlanta` ![](https://cdn.us.document360.io/c65001f1-30e3-4f1d-b335-57abf64ebd31/Images/Documentation/Screenshot 2025-11-14 at 4.29.26 PM.png) **Step 2: Open Developer Tools** Open your browser's Developer Tools: ![](https://cdn.us.document360.io/c65001f1-30e3-4f1d-b335-57abf64ebd31/Images/Documentation/Screenshot 2025-11-14 at 4.31.18 PM.png) **Step 3: Find Line IDs in the Network Tab** 1. In Developer Tools, select the **Network** tab 2. Refresh the facility page (using your browser's refresh button or Ctrl+R / Cmd+R) 3. In the Network tab, locate the request to `/assets` - You can use the filter/search box to find it quickly 4. Select the `/assets` request 5. Select the **Response** tab to view the response data 6. In the response, find the `line` array 7. For each line object, note: - The `name`` `or `id`` `fields → This is the **line ID** for rollups - The `factory_id` field → Confirms which factory this line belongs to ![](https://cdn.us.document360.io/c65001f1-30e3-4f1d-b335-57abf64ebd31/Images/Documentation/Untitled design (13).gif) **Example response snippet:** ```json {  "results": {    "line": [      {        "id": "Processing_line1",        "name": "Processing_line1",     ← This is the line ID for rollups        "display_name": "Processing Line 1",        "factory_id": "ETL3_Atlanta",   ← This confirms the factory ID        "machine": [          {"name": "Packer1", "id": "..."},          {"name": "Packer2", "id": "..."}        ]      },      {        "id": "Processing_line2",        "name": "Processing_line2",     ← Another line ID        "display_name": "Processing Line 2",        "factory_id": "ETL3_Atlanta",        "machine": [          {"name": "Packer3", "id": "..."}        ]      }    ]  } } ``` 💡 **Tip**: The `factory_id` field in each line object shows which factory the line belongs to—this helps you verify you're configuring the correct relationships. --- ## **Configure Rollups in Workspace Manager** ### **Step 1: Open the KPI Artifact** 1. Navigate to **Workspace Manager** 2. Select your workspace 3. Select **KPI** artifact 4. Find your KPI 5. Select the KPI to open the editor ### **Step 2: Add the Rollups Configuration** In the KPI artifact editor, locate the JSON configuration and add or update the `rollups` field: ```json {  "name": "quality",  "display_name": "Quality",  "formula": "good_parts/total_parts * 100",  "dependencies": [    {      "name": "good_parts",      "aggregate": "sum"    },    {      "name": "total_parts",      "aggregate": "sum"    }  ],  "field_maps": [    {      "machine_types": ["Packer"],      "alias_map": {        "good_parts": {          "row_formula": "stats__good_parts__val"        },        "total_parts": {          "row_formula": "stats__total_parts__val"        }      }    }  ],  "rollups": {    "factory": {      "ETL3_Atlanta": ["Packer1", "Packer2"]    },    "line": {      "Processing_line1": ["Packer1"],      "Processing_line2": ["Packer2"]    }  },  "unit": "%",  "directionality": "positive",  "good_threshold": 90,  "bad_threshold": 70 } ``` ### **Step 3: Validate Your Configuration** 1. Select **Validate** in Workspace Manager 2. Review any errors or warnings: - ✓ Factory IDs exist - ✓ Line IDs exist - ✓ Machine names are valid - ✓ Machine lists are not empty 3. Fix any validation errors before proceeding ⚠️ **Warning**: If validation fails with "factory id not found," verify you copied the exact `name` from the API response. ### **Step 4: Save and Deploy** 1. Select **Save** to save the KPI artifact 2. Review changes in the workspace summary 3. Select **Deploy** to activate your changes 4. Wait for deployment to complete ### **Step 5: Verify on Homepage** 1. Open the **Factory Analyze homepage** 2. Check that KPI values display for: - Your configured factories (using specified machines) - Your configured lines (using specified machines) 3. Verify the values match your expectations ## **Configuration Examples** ### **Example 1: Factory-Only Rollups** Specify machines for factory-level KPIs, use defaults for lines: ```json {  "rollups": {    "factory": {      "Chicago_Plant": ["Dryer_1", "Dryer_2", "Dryer_3"]    },    "line": {}  } } ``` ### **Example 2: Multiple Factories and Lines** Configure different machines for each factory and line: ```json {  "rollups": {    "factory": {      "Atlanta_Plant": ["Packer1", "Packer2", "Packer3"],      "Dallas_Plant": ["PKR_A", "PKR_B"]    },    "line": {      "Line_A": ["Packer1"],      "Line_B": ["Packer2", "Packer3"],      "Line_C": ["PKR_A", "PKR_B"]    }  } } ``` ### **Example 3: Exclude Problematic Machines** Include only reliable machines in your rollup: ```json {  "rollups": {    "factory": {      "Main_Factory": ["Machine_1", "Machine_2", "Machine_3"]      // Machine_4 and Machine_5 excluded due to data quality issues    },    "line": {}  } } ``` ### **Example 4: Use Default Behavior** Leave rollups empty to automatically include all matching machines: ```json {  "rollups": {    "factory": {},    "line": {}  } } ``` 💡 **Tip**: When rollups are empty, the system includes all machines in each factory/line that match the KPI's `machine_types`. --- ## **Feature Benefits** - **Control homepage display**: Prevent individual machine KPIs from showing at the facility level—only display aggregated factory and line KPIs - **Improve accuracy**: Exclude machines with data quality issues or those undergoing maintenance from aggregate calculations - **Flexible testing**: Gradually roll out KPIs to new machines or compare performance across different configurations **Summary** The **KPI Rollups** feature provides administrative control over how Key Performance Indicators are aggregated at the factory and line levels. By manually specifying which machines contribute to these calculations, users can ensure that the **Factory Analyze homepage** reflects accurate, high-quality data, effectively excluding machines that are under maintenance or have known data issues.