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

# Customer relations

> Link customers as organisation, reseller or distributor to record who belongs together, who receives the invoices and who orders for whom.

A customer relation connects two customers of your Fynn account. It always belongs to the customer that is linked (the branch, the end customer) and points to the other customer (the organisation, the reseller, the distributor). A relation applies from the moment you add it until you remove it. Removed relations stay in the history with their end date.

The former organisation hierarchy and the partner assignment are now part of customer relations.

## The three relation types

| Type | What it is for | Example | Effect on billing |
| - | - | - | - |
| **Organisation** | Several customers belong to one company, for example branches, sites or departments. | "Bäckerei Schmidt Filiale Nord" belongs to "Bäckerei Schmidt GmbH". | None. Each branch receives and pays its own invoices. |
| **Reseller** | A reseller sells your services on to its own customers and receives your invoices for them. | "IT-Haus Nord GmbH" receives the invoices for the subscriptions of "Bäckerei Schmidt GmbH". | New invoices go to the reseller, with its invoice address and its payment method. |
| **Distributor** | A distributor orders devices for customers who sign the contract with you and pay themselves. | "Nordlicht Distribution GmbH" orders ten tablets for "Bäckerei Schmidt GmbH". | None. The customer pays its own invoices. |

Any customer can be a reseller or distributor for others. The customer type "Partner" is only a label for the partner list and has no effect on relations.

### Organisation

A company with several sites often appears in Fynn as several customers, because each site has its own address, its own devices and its own contracts. The "Organisation" relation records that these customers belong together. The organisation's page then lists all related customers, and several views can evaluate them together (see "Views for organisations" below).

Each customer keeps its own invoicing, addresses and payment method. Nothing changes in the customer portal either.

An organisation has at most three levels including the top one, for example "Bäckerei Schmidt GmbH", below it "Bäckerei Schmidt Region Nord", below that "Bäckerei Schmidt Filiale Nord".

### Reseller

The reseller sells your devices and services to its own customers and invoices them itself. You invoice the reseller, and the end customer keeps the contracts.

While the relation exists, the following applies to the end customer:

| Changes | Stays the same |
| - | - |
| Every new invoice for its subscriptions goes to the reseller. | The end customer keeps its subscriptions, prices and customer prices. |
| The invoice carries the reseller's invoice address, or its main address if it has no separate invoice address. | The end customer keeps its contracts, devices and orders. |
| Payment uses the reseller's default payment method. | Invoices issued before the relation was added keep their recipient. |
| The delivery address of the subscriptions is the reseller's delivery address, or its main address if it has no separate delivery address. | |

Credit notes always go to the customer of the invoice they correct, with that invoice's address, currency and tax treatment. This also applies when the reseller has changed in the meantime or the relation has ended. If two customers received an invoice for the credited period, Fynn splits the credit note between them in proportion to the amounts invoiced. A credit note is never higher than what the invoices for that period billed. Fynn does not credit a remainder above that automatically.

An example: Bäckerei Schmidt GmbH received an invoice of €499.00 for October. From 15 October, IT-Haus Nord GmbH bills as reseller and receives €100.00 for the rest of the month. Fynn splits a credit of €499.00 for October in the ratio 499 to 100: €415.69 go to Bäckerei Schmidt GmbH and €83.31 to IT-Haus Nord GmbH, each on its own document.

### Distributor

The distributor orders on behalf of its customer, who receives the devices, signs the contract with you and pays the invoices itself, with its own address and payment method. The relation records which distributor orders for whom, so you see all customers of a distributor in one place.

Fynn creates the relation automatically when an order has a service recipient other than the orderer. This happens when the order is created, through "Empfänger ändern" (change recipient) on the order and when a delivery is activated for a different recipient. The service recipient then gets the orderer as its distributor, provided it has no distributor yet. An existing distributor stays. If the rules below do not allow the relation, for example because the orderer is archived, the order still goes through, only without the relation.

Devices, subscription and invoices belong to the service recipient. The order itself, with its history, belongs to the orderer.

> [!TIP]
>
> If a dealer buys in its own name and passes the devices on, it is your contracting party and must receive the invoice. In that case, leave the service recipient on the order unchanged and link the end customer to the dealer as reseller.

### Several relations on one customer

A customer can have an organisation, a reseller and a distributor at the same time, but only one of each type. The relations work side by side: if Filiale Nord belongs to Bäckerei Schmidt GmbH and IT-Haus Nord GmbH bills for it, the branch appears in the organisation's views and its invoices go to IT-Haus Nord. The other branches keep receiving their own invoices as long as they have no reseller of their own.

## Adding a relation

You always add the relation on the page of the branch or end customer that is being linked.

**1. Open the customer**

Open the customer and choose **Aktionen** (actions), then **Kundenbeziehung hinzufügen** (add customer relation).

**2. Choose the linked customer**

Under **Verknüpfter Kunde** (linked customer), search for the other customer: the organisation, the reseller or the distributor.

**3. Choose the role**

Choose the role this customer has towards the current customer: **Distributor**, **Reseller** or **Übergeordnete Organisation** (parent organisation).

**4. Check the billing**

The **Rechnungsstellung** (billing) box shows who will receive the invoices (**Rechnungsempfänger**, invoice recipient) and who receives the service (**Leistungsempfänger**, service recipient). For a reseller the invoice recipient is the reseller; for a distributor or an organisation the current customer remains the invoice recipient.

**5. Save**

Click **Beziehung hinzufügen** (add relation).

![Aktionen menu of a customer with the entry Kundenbeziehung hinzufügen](https://mintcdn.com/fynnsubscriptionbilling/tv50Rqhs2iBwmkcc/images/customers/relations-action-menu.png?fit=max\&auto=format\&n=tv50Rqhs2iBwmkcc\&q=85\&s=8423e57e50c592d522cdbaf27c072256)

The Aktionen menu on the customer page.

![Dialog Kundenbeziehung hinzufügen with the role cards Distributor, Reseller and Übergeordnete Organisation](https://mintcdn.com/fynnsubscriptionbilling/tv50Rqhs2iBwmkcc/images/customers/relations-assign-dialog.png?fit=max\&auto=format\&n=tv50Rqhs2iBwmkcc\&q=85\&s=707dc27ebab9fc4c2cbc9256a69d6ebf)

The Kundenbeziehung hinzufügen dialog with a chosen customer, the role Distributor and the Rechnungsstellung box.

If the current customer already holds a role, its card names the existing customer under "Zugeordnet" (assigned). If you choose that role, the button reads **Ändern** (change) and replaces the existing relation. If the chosen customer already holds a role for the current customer, that card is locked and marked "bereits zugeordnet" (already assigned).

> [!NOTE]
>
> The role "Übergeordnete Organisation" is available once the organisation hierarchy is enabled for your account. Contact support to have it enabled. You can use reseller and distributor without it.

## Relations on the customer page

### In the side column

Under **Stammdaten** (master data) there is one row for each relation the customer itself holds: **Organisation**, **Reseller** or **Distributor**, with the linked customer and the date the relation started.

![Side column of a customer with the row Organisation and the linked customer since 14.10.2026](https://mintcdn.com/fynnsubscriptionbilling/tv50Rqhs2iBwmkcc/images/customers/relations-rail-rows.png?fit=max\&auto=format\&n=tv50Rqhs2iBwmkcc\&q=85\&s=0d89766536a21c8e12f343fde1bcaa26)

The Organisation row in the master data, showing the linked customer and its start date.

### In the "Beziehungen" tab

If a customer is the organisation, reseller or distributor for other customers, its page has the **Beziehungen** (relations) tab. It shows up to three sections, each only when it has entries:

| Section | Content |
| - | - |
| **Zugehörige Kunden** (related customers) | The organisation as a tree down to the third level. The current customer is highlighted, every other entry leads to its customer page. |
| **Abgerechnete Kunden** (billed customers) | The end customers for which this customer receives the invoices as reseller, with customer number and start date. |
| **Belieferte Kunden** (supplied customers) | The customers this customer orders for as distributor, with customer number and start date. |

![Beziehungen tab with the organisation tree under Zugehörige Kunden](https://mintcdn.com/fynnsubscriptionbilling/tv50Rqhs2iBwmkcc/images/customers/relations-tab.png?fit=max\&auto=format\&n=tv50Rqhs2iBwmkcc\&q=85\&s=85497d688c25a64fb3db1e0aa59ae17e)

The Beziehungen tab of an organisation with the Zugehörige Kunden section.

A customer can be both at once, for example a reseller that itself belongs to an organisation. It then has the row in the side column and the tab.

> [!NOTE]
>
> If your account still uses the previous customer page, you find relations there in the **⋯** menu: "Organisation setzen", "Kunden hinzufügen" and "Aus Organisation entfernen" for the organisation, "Partner zuweisen" and "Partner entfernen" for the reseller. They write the same relations and follow the same rules.

## Changing or removing a relation

You find both actions in the row menu in the side column of the customer that holds the relation.

**1. Open the row**

Open the customer and click the menu of the **Organisation**, **Reseller** or **Distributor** row in the master data.

**2. Change or remove**

**Ändern** (change) opens the dialog with the role preselected, where you choose the new linked customer from the search. **Entfernen** (remove) ends the relation after a confirmation.

A removed relation ends immediately and stays in the history with its start and end date. Running subscriptions stay unchanged with their positions, prices and devices. Invoices already issued keep their recipient, address and payment method, so an open invoice to the reseller is still paid by the reseller.

| Type | What applies after removal |
| - | - |
| Organisation | The customer leaves the organisation's views. Billing does not change. |
| Reseller | The next invoice for the subscriptions goes to the end customer itself, with its own invoice address and payment method: the payment method on the subscription, otherwise its default payment method, otherwise "Auf Rechnung" (pay by invoice). Credit notes for periods the reseller was invoiced for still go to the reseller. |
| Distributor | Billing does not change. Orders keep their orderer and service recipient. |

> [!WARNING]
>
> **Ändern** first ends the existing relation and then adds the new one. If adding fails, for example because the new reseller was archived in the meantime, the customer has no relation for that role any more and the dialog shows the error. For a reseller, the invoices then go to the end customer itself until you add a reseller again.

Adding and removing an organisation or a reseller appear in the customer's activity.

## Rules

Fynn checks these rules for every new relation, in the app and through the API:

| Rule | Message |
| - | - |
| A customer has at most one active relation of each type. | "Für diese Rolle besteht schon eine Verbindung." |
| A customer cannot be linked to itself. | "Ein Kunde kann nicht mit sich selbst verbunden werden." |
| The linked customer belongs to your Fynn account. | "Der Kunde wurde nicht gefunden." |
| The linked customer is not archived. | "Der Kunde ist archiviert." |
| Relations of one type do not form a circle. If Filiale Nord belongs to Bäckerei Schmidt GmbH, Bäckerei Schmidt GmbH cannot belong to Filiale Nord, directly or through other customers. | "Diese Verbindung würde einen Kreis bilden." |
| An organisation has at most three levels. | "Eine Organisation hat höchstens drei Ebenen." |

Two more rules apply when archiving. An organisation cannot be archived while it has related customers that are not archived. A reseller cannot be archived while it receives the invoices for active end customers. Remove the relations first or archive the end customers first.

## Views for organisations

When the organisation hierarchy is enabled for your account, several views work with organisations:

* The customer list has the tabs **Alle inkl. Organisationen** (all including organisations) and **Nur Hauptkunden** (main customers only). "Nur Hauptkunden" hides the related customers. The **Organisationen** column shows how many related customers a customer has.
* On an organisation's page you switch between **Eigene** (own) and **Organisation**. With "Organisation", the subscriptions and figures of the related customers are included.
* The sent e-mails of an organisation also include the e-mails to its related customers.

The customer list has no filter by reseller or distributor. You find the customers of a reseller or distributor in the **Beziehungen** tab on its page.

## In the customer portal

Each customer sees its own data in the [customer portal](https://docs.fynn.eu/en/guide/customer-portal/introduction.md):

* **Reseller:** The end customer sees its subscriptions and devices. The invoices for them appear with the reseller, because they are issued to it. The reseller does not see its end customers' subscriptions and devices.
* **Distributor:** The customer sees the subscription, devices and invoices from the order. The distributor sees the order itself, because it placed it.
* **Organisation:** Each related customer sees its own data. The organisation sees its own data and none of its related customers'.

## For developers

> [accordion] API, filters and webhooks
>
> Reading requires the permission to read customers. Adding and removing require the permission to edit customer relations; every role that may edit customers has it. The type `organisation` requires the organisation hierarchy to be enabled, otherwise the API answers with `403`.
>
> **Read relations.** `GET /api/customers/{customerId}/relations` returns the active relations in both directions: `relations` are the customers this customer points to (at most one per type), `relatedCustomers` are the customers pointing to it. In both lists the other customer is under `counterpart`.
>
> ```json theme={null}
> {
>   "relations": [],
>   "relatedCustomers": [
>     {
>       "id": "0199e1b2-4c7a-7d2e-9a10-5b3c2d1e0f45",
>       "role": "reseller",
>       "counterpart": {
>         "id": "0199e1a0-11f3-7b6c-8e2d-4a5b6c7d8e90",
>         "name": "Bäckerei Schmidt GmbH",
>         "number": "K-1042"
>       },
>       "validFrom": "2026-10-01T09:12:44+00:00",
>       "validTo": null,
>       "createdByAccountId": "0199c3f0-2a1b-7c3d-8e4f-5a6b7c8d9e01"
>     }
>   ]
> }
> ```
>
> **Add a relation.** `POST /api/customers/{customerId}/relations`. `customerId` is the customer being linked (branch or end customer), `role` is `organisation`, `reseller` or `distributor`, `relatedCustomerId` is the organisation, reseller or distributor. The answer is `201` with the new relation.
>
> ```json theme={null}
> {
>   "role": "reseller",
>   "relatedCustomerId": "0199e1a5-6b2c-7f1d-9c3e-2a4b6c8d0e12"
> }
> ```
>
> If the relation breaks a rule, the API answers with `422` and names the field in `violations`:
>
> | Code | Field |
> | - | - |
> | `CUSTOMER_RELATION__ALREADY_ACTIVE` | `role` |
> | `CUSTOMER_RELATION__SELF` | `relatedCustomerId` |
> | `CUSTOMER_RELATION__RELATED_CUSTOMER_NOT_FOUND` | `relatedCustomerId` |
> | `CUSTOMER_RELATION__RELATED_CUSTOMER_ARCHIVED` | `relatedCustomerId` |
> | `CUSTOMER_RELATION__CYCLE` | `relatedCustomerId` |
> | `CUSTOMER_RELATION__DEPTH_EXCEEDED` | `relatedCustomerId` |
>
> **End a relation.** `DELETE /api/customers/{customerId}/relations/{relationId}` ends the relation immediately. The answer is `200` with the relation, now with `validTo` set. A second call changes nothing. To change a reseller, end the existing relation and add the new one.
>
> **Previous endpoints.** `PUT /customers/{id}/assign-partner`, `PUT /customers/{customerId}/set-parent` and `PUT /customers/{customerId}/remove-parent` keep working on the same relations with the same rules. `remove-parent` answers with `422` (`CUSTOMER_RELATION__NONE_ACTIVE`) for a customer without an organisation. `GET /customers/{customerId}/children` and `GET /customers/{customerId}/hierarchy` return the related customers and the organisation tree. The organisation endpoints also require the organisation hierarchy to be enabled.
>
> **Filters.** The customer list filters by organisation with `parentCustomerId`, `isParent=true` and `hasParent=true`. You read the subscriptions and invoices of all related customers of an organisation with the `parentCustomer` filter:
>
> ```bash theme={null}
> GET /subscriptions?parentCustomer={customerId}
> GET /invoices?parentCustomer={customerId}
> ```
>
> **Webhooks.** Adding and removing an organisation trigger `customer.parent.assigned` and `customer.parent.removed`, whichever way the change is made. Reseller and distributor relations trigger no webhooks. See [Webhooks](https://docs.fynn.eu/en/guide/webhooks/introduction.md).
