> 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/procurement-and-sourcing/assess-replacement-order-eligibility.md). Agents can also search and read this documentation through its [MCP server](https://kb.theloops.io/~gitbook/mcp).

# Assess Replacement Order Eligibility

For one purchase receipt, decides whether credit-scrapped or credit-returned quantity can be replaced, how much remains, and why Create Replacement Order would be blocked. Read-only.

| Business area            | Action type |
| ------------------------ | ----------- |
| Procurement and Sourcing | Read-only   |

## Overview

When received goods are rejected at inspection, IFS records them as receipt scrap (ReceiptScrap, type ScrapCredit / ScrapNoCredit) or receipt returns (ReceiptReturn, type ReturnCredit / ReturnRework / ReturnLoaned). Only quantity that is scrapped or returned for credit can be replaced.

IFS Cloud reads receipt and purchase receipt data to assess replacement order eligibility.

## How it works

{% stepper %}
{% step %}
Find Purchase Receipt with the identifiers given. If nothing is found, say so and ask for corrected keys.
{% endstep %}

{% step %}
If `Objstate` = Cancelled, verdict NOT\_ELIGIBLE (receipt cancelled).
{% endstep %}

{% step %}
If SourceRefType = DualPOReceipt, verdict NOT\_ELIGIBLE (duplicate receipt in dual procurement).
{% endstep %}

{% step %}
Get Receipt Scrap Return Breakdown to list scrap and return rows with type and reason.
{% endstep %}

{% step %}
Get Replacement Gate for the PurchaseReceipt keys.
{% endstep %}

{% step %}
Choose the replaced quantity: if demand is distribution order (DO) use DisordReplacementQty, otherwise ReplacementQty (use qtyReplacedSuggested from the gate tool when present).
{% endstep %}
{% endstepper %}

## Key capabilities

* Resolve a purchase receipt from order number, line, release and receipt number, or from a receipt sequence.
* Confirm the receipt source type is PurchaseOrder (dual-PO duplicate receipts DualPOReceipt are excluded).
* Break down scrap and return quantities by type and reason (credit vs no-credit vs rework vs loan return).
* Read the server-calculated replacement gate CheckEnableCreateRO (same flag the IFS command uses).
* Compute the remaining replaceable quantity with the projection function GetQtyOnReplaceOrder.
* Explain blocking rules: no credit quantity, already fully replaced, project-connected line, customer-order direct delivery demand (CD), dual receipt.
* Flag warnings that the IFS command would raise: central order, configured part with non-DOP demand, distribution-order demand.
* Return a verdict, evidence table and next permissible step.

## Requirements

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

| Component | Projection      |
| --------- | --------------- |
| RCEIPT    | ReceiptHandling |

## Version compatibility

| Projection      | Supported IFS Cloud releases |
| --------------- | ---------------------------- |
| ReceiptHandling | 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.
