> 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/architektur-und-prozessflusse/parcel-de-labelprozess.md).

# Parcel-DE-Labelprozess

## Einstieg

`SOUDHL API Management.GenerateLabel` erkennt anhand der Konfiguration, dass Parcel DE aktiv ist, und ruft den lokalen Parcel-Pfad auf.

## Ablauf

1. `SOUDHL Configuration` laden.
2. Empfänger über `SOUDHL Package Recipient Mgt.ResolveAndSnapshot` aktualisieren.
3. Repräsentativen Verkaufsauftrag bestimmen.
4. Zollroute prüfen und gegebenenfalls Zolldaten vervollständigen.
5. Box und normalisierte Paketabmessungen laden.
6. Gewicht, Weight UOM und Uploadstatus validieren.
7. Absender und Empfänger auf DHL-Feldlängen begrenzen.
8. Parcel-Produkt und 14-stellige Abrechnungsnummer ermitteln.
9. Request mit Profil und Shipment erzeugen.
10. OAuth-Token beziehen und `/parcel/de/shipping/v2/orders` aufrufen.
11. Response validieren und Sendungsnummer, Routingcode, Label und optional CN23 speichern.
12. Tracking auf die Quellaufträge zurückschreiben.
13. Labelbild erzeugen, Paket als hochgeladen markieren und speichern.
14. Labelerfolg committen; danach optional Kartonbestand buchen.

## Request-Bereiche

Der Request enthält fachlich:

* `profile`
* `shipments[]`
* Produkt und Billing Number
* Referenznummer
* Shipper oder Shipper Reference
* Consignee
* Abmessungen und Gewicht
* optional `customs`

Die konkrete Serialisierung ist Implementierungsdetail. Für Parcel DE existiert aktuell kein Request-IntegrationEvent.

## Abrechnungsnummer

Die Parcel-Billing-Nummer wird aus drei Bestandteilen aufgebaut:

1. EKP mit zehn Zeichen aus Package, Default Billing Number oder Konfiguration,
2. numerischer Produktanteil aus der Billing Map,
3. zweistelliger Service Type.

Das Ergebnis muss exakt 14 Zeichen lang sein.

## Länder

Parcel DE erwartet Alpha-3-Ländercodes. Die Auflösung erfolgt aus:

1. bereits dreistelligem Code,
2. `Country/Region."SOUDHL Country Code"`,
3. eingebauter ISO-2-zu-ISO-3-Map.

Fehlt eine Zuordnung, wird die Labelerzeugung mit einem Fehler beendet.

## Response

Aus `items[]` werden verarbeitet:

* `shipmentNo`
* `routingCode`
* `label.b64`
* `label.printFormat`
* optional `customsDoc.b64`

Validierungsfehler werden aus `validationMessages` in `ExtraMessage` übernommen.

## Transaktionsverhalten

Ein erfolgreiches DHL-Label wird vor der optionalen Kartonbestandsbuchung committet. Ein Inventurfehler liefert deshalb eine Warnung, rollt das Label aber nicht zurück.

## Erweiterungsgrenze

Externe Apps steuern Parcel DE über Setup, Paketdaten, Box, Billing Number und Zolldaten. Low-Level-Token- oder POST-Methoden und eine eigene Request-Nachbildung sind nicht Teil des unterstützten Vertrags.


---

# 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/architektur-und-prozessflusse/parcel-de-labelprozess.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.
