Production API expected setup allocation
Expected setup in Production reports
expectedSetupTime in POST /reports/production reports the part of a setup standard allocated to recorded setup activity windows inside the requested range and groups. It does not add the full standard for every activity set returned by the report. This applies to API integrations, CSV exports, custom dashboards, and reports built with the same endpoint.
For activity sets with a work-order operation reference, the API allocates one standard per operation and machine across its setup activities. For example, if a 120-minute standard has 54 minutes of recorded setup in one shift and 66 minutes in another, the shifts receive 54 and 66 minutes; production after setup receives zero. Gaps between setup activities receive no allocation. A report row for downtime or No Shift receives a share only when it overlaps a recorded setup activity.
When an activity set has no work-order operation reference, the API treats that set independently. Work-order and job number strings are not used to join sets because customers can reuse them. If some sets for one real operation have the reference and others do not, the referenced sets share one standard while each unreferenced set remains separate.
For a closed setup, the full standard is spread in proportion to the duration of each recorded setup activity. A closed setup with a 120-minute standard and only 90 recorded setup minutes still allocates 120 expected minutes across that window. For a setup still in progress, the allocated value accrues at recorded time until it reaches the standard. The GraphQL expectedSetupTimeMs field remains the raw setup standard when a client needs that value.
If your integration compares actual setup against the full ERP standard, use expectedSetupTimeMs from GraphQL for the standard. That field is on every ActivitySet, so an operation that spans several activity sets carries the standard on each of them. Take one value per workOrderOperation and machine rather than summing the rows. Sets with no workOrderOperation each keep their own standard. Use the Production API's expectedSetupTime when you need a value that adds correctly across report ranges, shifts, days, and runs.