> For the complete documentation index, see [llms.txt](https://kb.theloops.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.theloops.io/agentstudio/skills-library/engineering-product-lifecycle-and-quality/detect-product-model-cost-anomaly.md). Agents can also search and read this documentation through its [MCP server](https://kb.theloops.io/~gitbook/mcp).

# Detect Product Model Cost Anomaly

For one product model (ProductNo + ModelNo), compares standard and calculated cost on every function, flags variance and roll-up gaps, and drills into linked engineering part revisions for evidence. Read-only.

| Business area                               | Action type |
| ------------------------------------------- | ----------- |
| Engineering, Product Lifecycle, and Quality | Read-only   |

## Overview

A product model in IFS Cloud (entity ProductModel, keys ProductNo, ModelNo) is broken down into a function structure (entity ProductFunction). Each function carries a standard cost (StdCost, date DtStdCost) and a calculated cost (CalcCost, date DtCalcCost), and is linked to engineering part revisions through ProductFunctionEngPart.

The IFS Cloud integration reads product model functions and engineering part revision costs to detect cost anomalies.

## How it works

{% stepper %}
{% step %}
If ProductNo or ModelNo is missing, ask. Do not guess keys.
{% endstep %}

{% step %}
Call Get Product Model Header. If not found or not permitted, stop.
{% endstep %}

{% step %}
Call List Function Costs. If zero functions, report "no function structure" and stop.
{% endstep %}

{% step %}
Compute variance and flags (MISSING\_STD, MISSING\_CALC, VARIANCE\_HIGH, STALE\_CALC) per function.
{% endstep %}

{% step %}
Call Get Function Hierarchy and check parent vs child CalcCost roll-up (ROLLUP\_MISMATCH is informational).
{% endstep %}

{% step %}
For flagged functions (max 10), call List Function Engineering Parts and Get Part Revision Cost Basis (max 5 parts per function).
{% endstep %}
{% endstepper %}

## Key capabilities

* Resolve and validate one product model by ProductNo and ModelNo.
* Read standard and calculated cost, and their dates, for all functions in the model.
* Compute absolute and percentage variance per function against a configurable threshold.
* Flag missing standard cost, missing calculated cost, stale calculated cost and high variance.
* Compare parent function cost against the sum of child function costs (roll-up consistency check).
* Identify engineering part revisions connected to each flagged function, including their state and change order.
* Drill into engineering part revision cost fields (StdCost, CalcCost, MaterialCost, WorkCost) as root-cause evidence.
* Return a ranked anomaly table with evidence and a recommended next business action.

## Requirements

The following IFS Cloud components and projections must be available, with permission sets that grant access to each projection.

| Component | Projection                       |
| --------- | -------------------------------- |
| PDMCON    | FunctionStructureHandling        |
| PDMCON    | ProductFunctionsHandling         |
| PDMCON    | EngineeringPartRevisionsHandling |

## Version compatibility

| Projection                       | Supported IFS Cloud releases |
| -------------------------------- | ---------------------------- |
| FunctionStructureHandling        | 24R2, 25R1, 25R2, 26R1, 26R2 |
| ProductFunctionsHandling         | 24R2, 25R1, 25R2, 26R1, 26R2 |
| EngineeringPartRevisionsHandling | 24R2, 25R1, 25R2, 26R1, 26R2 |

## Known limitations

* Read-only: does not create, update, or delete IFS Cloud data.
* Requires projection-level security. Permission errors halt the run.
