> 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/service-management-and-contracts/certify-ready-application-for-payment.md). Agents can also search and read this documentation through its [MCP server](https://kb.theloops.io/~gitbook/mcp).

# Certify Ready Application for Payment

Certify one submitted sales-contract application for payment after evidence and gate checks, with preview and explicit approval.

| Business area                    | Action type                                |
| -------------------------------- | ------------------------------------------ |
| Service Management and Contracts | Updates IFS Cloud data after user approval |

## Overview

When a customer returns a certificate for a submitted application for payment (AfP), the contractor must record the certified values and move the AfP from Submitted to Certified. Certification posts an application voucher and, depending on the contract invoice method, can create (and release) the customer invoice.

IFS Cloud OData integration for application for payment certification.

## How it works

{% stepper %}
{% step %}
Context: SalesContractApplicationForPaymentHandling.
{% endstep %}

{% step %}
Evidence: AfpLineArray and AfpLineItemsArray.
{% endstep %}

{% step %}
Gates: Validation functions and actions for certification.
{% endstep %}

{% step %}
Certify: POST CertifyApplication.
{% endstep %}

{% step %}
Verify: Read-back `Objstate` and invoices.
{% endstep %}
{% endstepper %}

## Key capabilities

* Resolve one AfP by ContractNo + AfpNo and confirm it is in state Submitted (the client gate enabled = \[Objstate = "Submitted"]).
* Compare header certified values (WorkCertEntered, SmCertEntered) with line/item certified roll-ups.
* Detect missing item certified values and accumulated certification of earlier submitted AfPs (server warnings AFPNOCERTVALUE, AFPPREVNOTCERT).
* Detect missing certified retention release (AFPCERTRETRELNULL error) and header/item mismatches (AFPCERTMISMATCH warning).
* Check customer credit block (with contract override) and contract on-hold status.
* Resolve voucher defaults (user group, application and invoice voucher types) and validate them for the voucher date.
* Determine whether an invoice will be created on certification from InvoiceMethod.
* Execute certification for one record only, after explicit approval, and read back state, date and invoice status.

{% hint style="info" %}
This skill keeps a human in the loop. It previews every change and updates IFS Cloud only after a user approves it.
{% endhint %}

## Requirements

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

| Component                        | Projection                                 |
| -------------------------------- | ------------------------------------------ |
| APPPAY (APPLICATION FOR PAYMENT) | SalesContractApplicationForPaymentHandling |

## Version compatibility

| Projection                                 | Supported IFS Cloud releases |
| ------------------------------------------ | ---------------------------- |
| SalesContractApplicationForPaymentHandling | 24R2, 25R1, 25R2, 26R1, 26R2 |

## Known limitations

* Write paths require explicit user confirmation or authorization where configured.
