> 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/financials-and-accounts-receivable/deduction-handling.md). Agents can also search and read this documentation through its [MCP server](https://kb.theloops.io/~gitbook/mcp).

# Deduction Handling

Records a deduction from a payment, or reports where an existing CF's evidence stands from its notes. After a payment creates a deduction, drafts and sends an evidence email when the caller passed sendEvidence true. For an existing CF, sends it when no request was sent yet.

| Business area                      | Action type                                |
| ---------------------------------- | ------------------------------------------ |
| Financials and Accounts Receivable | Updates IFS Cloud data after user approval |

## Overview

For IFS data.

## How it works

{% stepper %}
{% step %}
Read Open Deductions: Reads the customer's open ledger items from Customer Analysis so deduction handling can find CF difference items.
{% endstep %}

{% step %}
Create Instant Invoice: Creates an Instant credit invoice in IFS Cloud as a Preliminary draft, or prints it so IFS posts it.
{% endstep %}

{% step %}
Create Clearing Application: Creates a zero mixed payment that matches one open CF deduction and one posted instant-invoice credit.
{% endstep %}

{% step %}
Find Customer New3: Identifies the customer in IFS Cloud from identity, name, or other payment-document references.
{% endstep %}

{% step %}
Send Evidence Request Email: Sends the deduction evidence-request email after the payment that created the CF was approved.
{% endstep %}

{% step %}
Link Evidence: Links one evidence file onto an existing instant invoice in IFS Cloud.
{% endstep %}
{% endstepper %}

## Key capabilities

* Reads the customer's open ledger items from Customer Analysis so deduction handling can find CF difference items.
* Creates an Instant credit invoice in IFS Cloud as a Preliminary draft, or prints it so IFS posts it.
* Creates a zero mixed payment that matches one open CF deduction and one posted instant-invoice credit.
* Identifies the customer in IFS Cloud from identity, name, or other payment-document references.
* Sends the deduction evidence-request email after the payment that created the CF was approved.
* Links one evidence file onto an existing instant invoice in IFS Cloud.
* Reads the notes on a CF in IFS Cloud, or adds a new one, so the deduction's evidence history stays on the CF.

{% 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                           |
| --------- | ------------------------------------ |
| IFS Cloud | CustomerAnalysis                     |
| IFS Cloud | CustomerHandling                     |
| IFS Cloud | DocReferenceObjectAttachmentHandling |
| IFS Cloud | InstantInvoiceHandling               |
| IFS Cloud | PaymentHandling                      |
| IFS Cloud | SalesObjectsHandling                 |

## Version compatibility

| Projection                           | Supported IFS Cloud releases |
| ------------------------------------ | ---------------------------- |
| CustomerAnalysis                     | 24R2, 25R1, 25R2, 26R1, 26R2 |
| CustomerHandling                     | 24R2, 25R1, 25R2, 26R1, 26R2 |
| DocReferenceObjectAttachmentHandling | 24R2, 25R1, 25R2, 26R1, 26R2 |
| InstantInvoiceHandling               | 24R2, 25R1, 25R2, 26R1, 26R2 |
| PaymentHandling                      | 24R2, 25R1, 25R2, 26R1, 26R2 |
| SalesObjectsHandling                 | 24R2, 25R1, 25R2, 26R1, 26R2 |

## Known limitations

* Read-only: does not create, update, or delete IFS Cloud data.
* Write paths require explicit user confirmation or authorization where configured.
