> For the complete documentation index, see [llms.txt](https://docs.solutioo.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.solutioo.de/entwicklerdokumentationen-business-central-dhl-connector/dhl-connector-entwicklerdokumentation/codeunit-referenz/72242951-soudhl-installation.md).

# 72242951 SOUDHL Installation

## Verantwortung

Install-Codeunit für mandantenbezogene Defaultdaten: Konfiguration, Parcel-Billing-Map und ISO-Alpha-3-Ländercodes.

`Subtype = Install`.

## Trigger

### `OnInstallAppPerCompany()`

1. `SeedOnce` für die Billing Map.
2. `SeedCountryCodes`.
3. Bei vorhandener Configuration nur Billing Numbers migrieren.
4. Andernfalls einen Default-Setupdatensatz mit Name und Standardprofil anlegen.
5. Default Billing Number aus Konfiguration erzeugen, soweit möglich.

### `OnRun()`

Wartungsentry zum erneuten idempotenten Seed von Map, Ländern und Billing Numbers, ohne eine neue Konfiguration zu erzwingen.

## Öffentliche Procedures

### `SeedCountryCodes()`

Initialisiert die ISO-2-zu-ISO-3-Map und schreibt `Country/Region."SOUDHL Country Code"`, wenn der vorhandene Wert abweicht.

### `GetAlpha3CountryCode(Alpha2: Code[2]; var Alpha3: Code[3]): Boolean`

Lookup in derselben Map. Verwendet von API Management und Tarifimport als Fallback, wenn die Country-Tabelle keine gepflegte Alpha-3-Angabe enthält.

## Lokale Procedures

* `SeedOnce`: bricht ab, wenn die Billing Map bereits Daten enthält.
* `Add(Product: Enum SOUDHLProducts; IProduct: Code[10]; ServiceType: Code[2])`: idempotenter Insert einer gültigen Mappingzeile.
* `InitCountryMap`: vollständige ISO-3166-Zuordnung.

## Warum eine Billing Map?

Parcel DE verwendet ein fachliches Produkt-Enum, benötigt für die Abrechnungsnummer aber numerische Bestandteile aus i-Product und Service Type. Diese Details werden zentral geseedet und nicht auf jeder Box dupliziert.

## Datenwirkung

Insert/Modify auf Configuration, Billing Map, Billing Number und Country/Region. Kein externer API-Aufruf.

## Externe Verwendung

`GetAlpha3CountryCode` ist eine nützliche Lookup-API. `SeedCountryCodes` kann administrativ erneut ausgeführt werden. Consumer-Apps sollen vorhandene Billing-Map-Seeds nicht überschreiben; neue Produkte benötigen abgestimmte Map-Zeilen.


---

# 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.solutioo.de/entwicklerdokumentationen-business-central-dhl-connector/dhl-connector-entwicklerdokumentation/codeunit-referenz/72242951-soudhl-installation.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.
