> For the complete documentation index, see [llms.txt](https://docs.younium.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.younium.com/erp-and-accounting-integrations/e-conomic.md).

# e-conomic

## Overview

The Visma e-conomic integration connects via agreement grant token, synchronises master data through import jobs, and posts draft invoices (optionally booked) to e-conomic when Younium invoices are posted. Amounts on the draft header mirror Younium subtotal, tax, rounding, and total.

***

## Authentication

You connect e-conomic with an agreement grant token, which you create in e-conomic and paste into the integration settings. Younium presents it on every request it makes, so the connection lasts as long as the grant does — there is nothing to renew and no periodic reauthorisation.

Revoking the grant in e-conomic ends the connection immediately, and posting stops until a new token is entered.

***

## Activation and deactivation

Entering a working agreement grant token activates the integration.

Saving the settings prepares Younium for posting: it creates the EAN custom field, the employee, VAT zone, layout and customer group lists the integration maps to, and turns on invoice posting when you have enabled it.

Deactivating stops invoice posting; documents already in e-conomic are untouched.

***

## Custom fields and lists

| Entity                  | Field name                    | Type                                                   |
| ----------------------- | ----------------------------- | ------------------------------------------------------ |
| Account                 | `EAN no` (EAN\_no\_FiledName) | Text                                                   |
| Order, Account, Invoice | `Employees`                   | List (employee/sales person)                           |
| Account                 | `VAT Zone`                    | List                                                   |
| Account                 | `Layout`                      | List                                                   |
| Account                 | `Customer Group`              | List                                                   |
| Invoice                 | `integrationEconomicHeading`  | Used in notes heading (non-integration prefix pattern) |

List items use **Key** as e-conomic numeric id and **Value** as display label.

***

## Eligibility and filtering

* Account must have VAT zone custom field populated.
* Layout custom field required on account.
* `PaymentTermReference.Name` parsed as integer `paymentTermsNumber`.
* `Account.ExternalERPId` → `customerNumber`.
* Lines: `HideZeroAmountRecurring`, `HideZeroAmountUsageAndMeasurementLines`; sorted by product line and charge number.

***

## Field mapping — posted draft invoice (Younium → e-conomic)

### Header

| Younium field                     | e-conomic field                                                            |
| --------------------------------- | -------------------------------------------------------------------------- |
| `Invoice.InvoiceDate`             | `date`                                                                     |
| `Subtotal.CurrencyCode`           | `currency`                                                                 |
| `Subtotal.Amount`                 | `netAmount`                                                                |
| `Tax.Amount`                      | `vatAmount`                                                                |
| `TotalRoundingAmount.Amount`      | `roundingAmount`                                                           |
| `TotalAmount.Amount`              | `grossAmount`                                                              |
| `PaymentTermReference.Name` (int) | `paymentTerms.paymentTermsNumber`                                          |
| `Account.ExternalERPId` (int)     | `customer.customerNumber`                                                  |
| `YourOrderNumber`                 | `references.other`                                                         |
| Employee list Key                 | `references.salesPerson.employeeNumber`                                    |
| Your reference contact            | `references.customerContact` (via `AddYourReference`)                      |
| Notes + heading custom field      | `notes.heading`, `notes.textLine1`                                         |
| Account name + invoice address    | `recipient` (name, address, zip, city, country, `vatZone`, optional `ean`) |
| Delivery address                  | `delivery`                                                                 |
| Layout list Key                   | `layout.layoutNumber`                                                      |

### Line

| Younium field                                 | e-conomic field                              |
| --------------------------------------------- | -------------------------------------------- |
| `GetPricePerUnitAndQuantity()`                | `quantity`, `unitNetPrice`, `totalNetAmount` |
| Discount logic on charge details              | `discountPercentage`                         |
| Description + service period + notes          | `description`                                |
| `OrderProductCharge.ExternalERPId`            | `product.productNumber`                      |
| Service period (non–one-off, accrual setting) | `accrual.startDate`, `accrual.endDate`       |

### Booking (optional)

When `AutomaticallyBookPostedInvoices` is true, POST `invoices/booked` with `draftInvoiceNumber`; `ExternalERPId` becomes booked invoice number.

### Write-back (Younium)

| e-conomic field                               | Younium field           |
| --------------------------------------------- | ----------------------- |
| `draftInvoiceNumber` or `bookedInvoiceNumber` | `Invoice.ExternalERPId` |

***

## Post invoice workflow

**Runs when:** an invoice is posted in Younium.

POST `invoices/drafts`; optional book step.

***

## Import jobs

Products, payment terms, financial accounts, currencies, accounts; export accounts job.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.younium.com/erp-and-accounting-integrations/e-conomic.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
