> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neoagent.io/llms.txt
> Use this file to discover all available pages before exploring further.

# AFAS Profit API

> Read and change subscriptions, debtors, items, orders, invoices and projects in your AFAS Profit environment through its GetConnectors and UpdateConnectors

The AFAS Profit API tool gives Neo agents access to your AFAS Profit environment through the AFAS Profit REST API: every standard GetConnector and UpdateConnector AFAS documents, and the GetConnectors your administrator builds. The common use is keeping invoicing in step with licences: when an agent orders a Microsoft 365 seat, or a supplier's order confirmation arrives on a ticket, the agent finds the client's debtor, reads their subscription lines, and raises the licence line and the lines you tie to it, such as your workplace package and SLA.

> [!NOTE]
>
> Automatically enabled when you configure AFAS Profit permissions in your agent workflow.

## What It Does

* Read a client's subscription lines: item, quantity, price, start and end date
* Raise or lower a line's quantity, add a line or end one, when a licence is ordered or cancelled
* Find a client's debtor, open invoices, sales orders and projects
* Read any GetConnector linked to Neo's app connector, standard or custom, and list each connector's fields
* Create and update relations, dossier items, sales orders, items and other records through the UpdateConnectors you link, when you allow it

## Permission Groups

| Group | Covers |
| - | - |
| **Subscriptions** | Subscriptions and their lines (`Profit_Subscriptions`, `FbSubscription`) |
| **Sales, Orders & Items** | Items, prices and stock, sales orders and quotations, packing slips, direct invoices |
| **Purchasing & Warehouse** | Purchase orders and requests, receipts, warehouses and stock entries |
| **Organisations, Persons & Debtors** | Organisations, persons, contacts, debtors and purchase contacts |
| **Dossiers & Workflows** | Dossier items, responses, tasks and workflow actions |
| **Finance & Tax** | Ledger, journals and entries, debtor and creditor invoices, budgets, fixed assets, VAT and tax returns |
| **Projects, Hours & Flex** | Projects, actual costing, rates, Flex, construction and courses |
| **Employees, Leave & Recruitment** | Employees, contracts, leave and absence, applicants and vacancies |
| **Payroll** | Wage entries, pay slips, payroll documents, an employee's salary, tax and pension details and payroll bank account |
| **Profit Users** | Profit users and user groups |
| **Setup & Custom Files** | Metainfo (which connectors Neo may call and their fields), the Profit version, code tables and custom files |
| **Custom GetConnectors** | The GetConnectors your administrator built |

Each group has an access level: **Disabled**, **Read Only**, or **Read/Write**. Custom GetConnectors offers only Disabled and Read Only.

## Access Profiles

> [accordion] Read Only
>
> Every everyday group Read Only. Employees, Payroll and Profit Users Disabled. The agent reads and never changes anything.

> [accordion] Helpdesk
>
> Subscriptions, Organisations, Persons & Debtors, and Dossiers & Workflows at Read/Write, every other everyday group Read Only. Employees, Payroll and Profit Users Disabled. Every write in the three Read/Write groups requires technician approval.

> [accordion] IT Admin
>
> Every writable group at Read/Write. Finance & Tax, Payroll, Profit Users, and Setup & Custom Files writes require technician approval; subscription changes run on their own.

> [accordion] Full Automation
>
> Every supported write runs autonomously, finance and payroll included. A Profit user change still requires approval.

## Safety Controls

| Control | Behavior |
| - | - |
| **Technician-in-the-Loop** | Require human approval for writes, configurable per group |
| **Ticket scope** | On a ticket run, a read of a GetConnector that holds debtors must filter on the ticket's client's debtor, a write goes only as a subscription change or a new record for that client's debtor, and other changes, deletes and the GetConnectors that hold customers' records with no debtor number are refused |
| **Subscription check** | Before a subscription change that names its debtor (`DbId`), as every change on a ticket run must, Neo reads the subscription and refuses the change when it bills another debtor. A scheduled or chat run that sends no `DbId` gets no such read |
| **Pay** | An employee write that sets a salary, tax or pension details, or a payroll bank account also needs Payroll at Read/Write, and its approval |
| **Profit users** | Creating or changing a Profit user always requires approval, because it grants access to the administration |
| **The app connector** | AFAS answers only the connectors linked to Neo's app connector in Profit |
| **Documented writes only** | Every write must match an UpdateConnector write in AFAS's published OpenAPI definitions with its own method, and any other is refused |
| **Files** | The File, Subject, Image and Report connectors, which answer files as Base64, are refused, and so is the one-time-password sign-up |

## How to Configure

**1. Connect AFAS Profit**

Save your environment number, environment and the app connector's client ID and secret in the Neo Dashboard under the **Accounting** integrations category. See [Connecting AFAS Profit to Neo](https://docs.neoagent.io/integrations/afas-profit/connecting-to-neo.md).

**2. Configure permissions**

On the agent's **Tools & Settings** tab, click **Accounting** and expand the **AFAS Profit** block. Pick one of its **Presets**, which are the access profiles above, or set each permission group yourself.

**3. Set approval requirements**

Decide per permission group whether writes need a technician.

> [!TIP]
>
> To keep subscriptions in step with licences, turn on **Subscriptions** at Read/Write and **Setup & Custom Files** at Read Only, and say in the agent's instructions which items move with a Microsoft 365 seat, such as your workplace package and SLA.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.