HTTP Operation Type Object DTO Why-DTOs?
(Mutation) salesOpenItemSettlement SalesOpenItemSettlementGLDtoInput

Description

The SalesOpenItemSettlement service is designed to manage the settlement of open items in financial accounts, allowing users to adjust payments against outstanding invoices partially or fully.
The purpose of this action is to target open items that have not yet been fully paid (status = NOT_SPECIFIED or PARTIAL) related to a sales invoice.
A total or partial amount for each due date can be specified.
The action will then create a bank entry and modify the open items to align them with the elements mentioned in the action.
img

How to retrieve the IDs of open items?
  1. Retrieving open items from accounting entries
    This method is used when sales invoices have not been recorded in Sage Active, and only the accounting entries related to these invoices have been entered or imported.
    Open items are accessible via accountingEntries/accountingEntryLines/accountingEntryInvoice/openItems.
    Refer to the πŸ†• AccountingEntry - Pending Open Items of a Specific Invoice by Due Date example in the Postman collection under the Discover DATA LOADER Query Samples section.

  2. Retrieving open items directly from sales invoices
    This approach is applicable when sales invoices are available in Sage Active.
    It allows for direct access to open items without going through the accounting entries.
    Use salesOpenItemSettlement for direct retrieval.
    Refer to the πŸ†• salesInvoice - Pending Open Items of a Specific Invoice by Due Date example in the Postman collection under the Discover DATA LOADER Query Samples section.

Functionality

Input Parameters

Settlement Details: Specify the details of the settlement.

Open Items: Mandatory, specify the open items and the amounts for settlement.

Response

The service returns a OpenItemSettlementOutputGLDto object containing the following field:

Key Value
Authorization Bearer Current access Token How to find?
X-TenantId Current tenant id How to find?
X-OrganizationId Current organization Id How to find?
x-api-key Primary or secondary subscription key of your app How to find?
graphQL Mutation
mutation($input: SalesOpenItemSettlementGLDtoInput!) {
  salesOpenItemSettlement(input: $input) {
    id
  }
}
graphQL Variables
{
  "input": {
    "entryDate": "2024-01-01",
    "paymentMethodId": "815c1835-90dd-4e62-8504-79a3f97fac67",
    "description": "Full settlement of Invoice IN0022",
    "documentNumber": "IN00022",
    "thirdPartyId": "815c1835-9cb5-4e62-8504-79a3f97fac67",
    "salesOpenItemLinkagePaidAmounts": [
        {
            "openItemId": "815c1835-a4e7-4e62-8504-79a3f97fac67",
            "paidAmount": 500
        },{
            "openItemId": "815c1835-a647-4e62-8504-79a3f97fac67",
            "paidAmount": 792
        }
    ]
  }
}
Example Response, ID of the Financial accounting Entry Created
{
  "id": "815c1835-d4e7-4e62-8504-79a3f97fac89"
}

salesOpenItemSettlement Input parameters

Fields Type Description
entryDate Date Date of the entry
paymentMethodId UUID Bank Account and cash Id
description String Description of the settlement action
documentNumber String Reference number for the document
thirdPartyId UUID Third party involved
salesOpenItemLinkagePaidAmounts List List of open items and the paid amounts

salesOpenItemSettlement/salesOpenItemLinkagePaidAmount

Fields Type Description
openItemId UUID Unique identifier of the open item to settle.
paidAmount Number Amount paid for the specified open item.

salesOpenItemSettlement Response

Fields Type Description
id UUID Unique identifier of the financial entry created