A customer asks for their account to be deleted, the team clicks the corresponding button in the shop, the record disappears from customer administration, and the request is considered closed. At the same time, that same person is still in the ERP debtor master, in the open items of financial accounting, in the address line of forty archived invoices, in the export for the shipping provider and in the queue of the interface whose last synchronisation ended in a timeout. What was deleted is a view, not a data set. This article shows how three separate manual steps become one deletion concept that holds across shop, ERP and accounting.
Key takeaways
- The same person sits in three systems on three different legal bases. The shop stores because of the contract, the ERP because of the commercial letter, accounting because of the accounting document. A deletion concept has to know all three answers.
- Retention periods are staggered and almost all of them start at the end of the calendar year. Anyone who stores the document date as the start of the period clears out almost a year too early or too late.
- Periods for accounting documents were shortened from ten to eight years, and the change reaches into the existing archive. An archive that still clears after ten years keeps two annual sets longer than required.
- Between deleting and keeping sits the restriction of processing. It is a flag on the record that every consumer evaluates, not a second storage location.
- Deletion classes instead of case-by-case rulings: a manageable number of rules carrying period, period start, legal basis and leading system, stored in machine-readable form.
- The deletion order takes the same route as the data. It counts as done only once every target system has acknowledged it; a system that is down produces an open case instead of a silent gap.
Why deletion fails at the system boundary
The reason lies in the architecture, not in a lack of care. A link between shop and ERP creates copies, that is its purpose. Each copy then sits in a system with its own data storage, its own backups, its own permissions and, this is the decisive point, its own legal basis for storage. The shop stores the customer account because the contract requires it. The ERP stores the same name because it appears on a commercial letter. Accounting stores it a third time because it is part of an accounting document. Three systems, three reasons, three periods.
A deletion concept that does not know these three answers cannot work through them either. It typically fails not because of the technology, but because nobody ever wrote down which copy exists for which reason. The first working step is therefore an inventory of fields, not of systems. How field assignments across system boundaries can be described at all is shown in the article on data mapping between ERP and store; the same list is the basis for every deletion decision.
Shop: contract and purpose
Customer account, basket, session data and wish list depend on the contract or on consent. Once the purpose falls away, the basis is missing; a retention obligation of its own rarely arises from this.
ERP: document and commercial letter
Order confirmation, delivery note and customer correspondence are commercial or business letters. Their period follows tax and commercial law, not the wishes of a department.
Accounting: accounting document
Whatever carries a posting is an accounting document. A separate period applies here, and it keeps running regardless of whether the customer still exists in the shop.
The retention periods that actually apply
Every deletion concept starts with a sober inventory of retention periods. They are staggered, and they are shorter than many businesses assume. German tax law distinguishes three groups: ten years (§ 147 (3) AO) for books, records, inventories, annual financial statements and management reports, eight years (§ 147 (3) AO) for accounting documents and six years (§ 147 (3) AO) for the remaining records where they matter for taxation. Commercial law mirrors this staggering with the same three values. Put both provisions side by side and most of the retention framework is already in place.
The second half is the start of the period, and it is regularly underestimated. The period does not begin with the document date but with the end of the calendar year (§ 147 (4) AO) in which the accounting document was created or the commercial letter received; commercial law words it identically (§ 257 (5) HGB). An invoice dated 3 January 2026 therefore has to be kept until 31 December 2034, not until 3 January 2034. For invoices, VAT law sets the same frame: eight years (§ 14b (1) UStG), counted from the end of the calendar year of issue.
| Record | Period | Legal basis | Start of the period |
|---|---|---|---|
| Commercial books, inventories, annual statements | 10 years | § 147 (3) AO, § 257 (4) HGB | End of the calendar year of the last entry |
| Accounting documents | 8 years | § 147 (3) AO, § 257 (4) HGB | End of the calendar year the document was created |
| Invoices held by the business | 8 years | § 14b (1) UStG | End of the calendar year of issue |
| Commercial and business letters | 6 years | § 147 (3) AO, § 257 (4) HGB | End of the calendar year of receipt or dispatch |
| Accounting documents in the financial sector | 10 years | § 257 (4) HGB, Art. 97 § 19a EGAO | End of the calendar year the document was created |
| Customer master without document reference | No fixed period | Art. 5(1) GDPR | When the purpose falls away |
Suspension: the period stands still, but it does not stretch indefinitely
The move to eight years and its exception
Shortening the period for accounting documents from ten to eight years comes from the Fourth Bureaucracy Relief Act, promulgated on 29 October 2024 (BGBl. 2024 I No. 323). For deletion concepts, the transitional rule matters more than the figure. Under Art. 97 § 19a (2) EGAO, the new version applies for the first time to all records whose retention period had not yet expired under the law in force up to and including 31 December 2024. The shortening therefore reaches into the existing archive: documents filed under the old ten-year rule whose period was still running may be removed two years earlier.
An archive that still clears after ten years keeps two annual sets longer than required, and under the storage limitation principle that is not a neutral state. For part of the economy, however, the shortening does not apply: Art. 97 § 19a (3) EGAO exempts three groups of taxpayers, and commercial law expressly continues ten years (§ 257 (4) HGB) for their accounting documents. A shop operator supplying such a house is not affected; anyone who belongs to one of these groups documents the deletion class for accounting documents differently. The three groups are named in the law:
- Credit institutions. Institutions within the meaning of § 1 (1b) of the German Banking Act, including branches under § 53 of that Act.
- Supervised insurers. Persons and companies subject to supervision under § 1 (1) of the German Insurance Supervision Act.
- Securities institutions. Securities institutions within the meaning of § 2 (1) of the German Securities Institutions Act.
What the GDPR adds
A retention obligation is not a blank cheque. It justifies keeping exactly the record it names, for exactly the duration it states. Everything else falls under the storage limitation principle: personal data may be kept in identifiable form only for as long as is necessary for the purposes of the processing (Art. 5(1) GDPR). The right to erasure does fall away where processing is necessary for compliance with a legal obligation (Art. 17(3) GDPR), but only to that extent. A customer account with a wish list, newsletter status and session history does not become subject to retention simply because an invoice exists for the same customer.
This separation is the core of a deletion concept across system boundaries. It forces a finer cut through the data than tables provide: not customer, but customer master record, document address, communication history, payment attribute, access log. Two further requirements turn this into an obligation to deliver. First, accountability, under which compliance with the principles has to be demonstrated (Art. 5(2) GDPR). Second, the record of processing activities, which under Art. 30(1) GDPR contains, where possible, the envisaged time limits for erasure of the different categories of data. Filling in that point calls for classes, not individual cases.
- Storage limitation. Identifiable form only for as long as the purpose requires (Art. 5(1) GDPR).
- Accountability. Compliance with the principles has to be demonstrated, not asserted (Art. 5(2) GDPR).
- Erasure periods in the record. The envisaged period per data category, where possible (Art. 30(1) GDPR).
- Fine range. Infringements of the principles and of data subject rights sit in the upper range of up to EUR 20 000 000 (Art. 83(5) GDPR) or 4 per cent of total worldwide annual turnover, whichever is higher.
Allerdings berechtigen die benannten Ausnahmen nicht zu einer zeitlich unbegrenzten Verarbeitung der jeweiligen personenbezogenen Daten.
Deletion classes instead of case-by-case rulings
A deletion concept that assesses every data type individually is hard to maintain past the third interface. It becomes workable through deletion classes: a manageable number of rules, each bundling a period, a period start, a legal basis and a leading system. Every table, every field and every file in the group is assigned to exactly one class. The benefit shows at the next system change: a new connection inherits classes instead of triggering another round of assessment. In a group made up of shop, ERP and accounting, a small set of classes typically covers most of the data.
The class belongs in a machine-readable file rather than in a presentation, because a checking run is meant to read it later. A workable set contains, per class, a stable identifier, the period in years, the anchor for the start of the period, the legal basis in plain words and the system that calculates expiry. Where the period follows from purpose limitation rather than from a statute, an event takes the place of the number of years: end of contract, withdrawal, last contact. The middleware is the natural home for this file because it already knows every system involved.
{
"deletion_classes": [
{
"id": "LK-10-BUCH",
"period_years": 10,
"period_start": "end_of_calendar_year_last_entry",
"legal_basis": "§ 147 Abs. 3 AO, § 257 Abs. 4 HGB",
"leading_system": "accounting"
},
{
"id": "LK-08-BELEG",
"period_years": 8,
"period_start": "end_of_calendar_year_document_created",
"legal_basis": "§ 147 Abs. 3 AO, § 14b Abs. 1 UStG",
"leading_system": "accounting"
},
{
"id": "LK-06-BRIEF",
"period_years": 6,
"period_start": "end_of_calendar_year_sent_received",
"legal_basis": "§ 147 Abs. 3 AO, § 257 Abs. 4 HGB",
"leading_system": "erp"
},
{
"id": "LK-ZW-KONTO",
"period_years": null,
"period_start": "event:end_of_contract",
"grace_months": 6,
"legal_basis": "Art. 5 Abs. 1 lit. e GDPR",
"leading_system": "shop"
}
]
}Store the start, calculate the end
The matrix: one data type, three systems
The practical part starts with a matrix. Rows are data types, columns are the systems involved, and each cell holds the period that applies to the copy in that particular system. The matrix is unremarkable as long as a row carries the same value in every column. The interesting rows are those with differing values: there the same personal reference sits once without a fixed period and once with six or eight years. Those cells are the actual work. They decide whether the shop may delete while the ERP has to restrict, and whether the interface can carry that difference at all.
Two cases show up regularly. The first is the order: in the shop it is a contract document tied to the purpose, in the ERP the order confirmation becomes a commercial letter with six years. The second is payment data: the payment method stored in the shop hangs on the customer account, the payment document in accounting on the document period. How payment transactions can be reconciled between the systems at all is covered in the article on payment reconciliation with the ERP. For the customer master itself, master data synchronisation supplies the leading system, without which no row of the matrix becomes unambiguous.
| Data type | Shop | ERP | Accounting |
|---|---|---|---|
| Customer master without document reference | Purpose limitation | Purpose limitation | Purpose limitation |
| Order and order confirmation | Purpose limitation | 6 years | 6 years |
| Invoice document | 8 years | 8 years | 8 years |
| Payment data with document reference | Purpose limitation | 8 years | 8 years |
| Interface access log | Purpose limitation | Purpose limitation | Purpose limitation |
The row without a statutory period carries the most risk
Restriction instead of deletion: the middle state
Between deleting and keeping sits a third state that many systems handle technically and organisations overlook: the restriction of processing. It is first of all a right of the data subject (Art. 18(1) GDPR). German federal data protection law additionally makes it a substitute for erasure where, in the case of non-automated processing, erasure would only be possible with disproportionate effort and the interest of the data subject in erasure is to be regarded as low (§ 35 (1) BDSG), and under § 35 (3) BDSG also where retention periods under an organisation’s own articles or under a contract stand in the way of erasure. For the group of systems this means the record stays in place but is blocked for every use outside retention.
Technically this is a flag on the record, not a separate folder. A dedicated archive client or an export into a second database only shifts the problem, because the same periods and the same access rules apply there. What works is a restriction flag that the connected processes actually evaluate: marketing selection, recommendation logic, reporting, export lists, the shop search index. If the flag only shows up on an ERP screen, it is decoration.
- One flag, not a second location. The restriction sits on the record itself, not in a copy somewhere else.
- Evaluated by every consumer. Search index, marketing selection, reporting and export check the flag before they use the record.
- With a calculated end date. Every restriction carries the expiry date so that a later run picks the record up on its own.
- Logged. Who restricted, when and on what basis: that is the evidence accountability calls for.
The interface as a deletion path
As long as deleting in the shop, in the ERP and in accounting are three separate manual steps, what exists is an arrangement, not a concept. It becomes robust once the deletion order takes the same route as the data: as a message over the existing integration layer, with an identifier, target systems, an action per target system and an acknowledgement coming back. The order then counts as done only when every system involved has answered, and a system that is down produces an open case instead of a silent gap. The structure matches what has already been built for other processes; API development for deletion orders is not a special route.
This message should have two properties. It is idempotent, so that a repeated delivery attempt does not create the case twice. And it separates action from reason: deleting and restricting are different instructions, and the class they follow from belongs in the message. Where an order consists of partial deliveries and part invoices, more than one document hangs on the same case, and the periods then run per document rather than per order; the article on partial deliveries and part invoices describes that split in detail. Returns extend the chain by another document type, as the article on the RMA process between shop and ERP shows.
{
"process": "deletion_order",
"process_id": "DO-2027-000418",
"idempotency_key": "DO-2027-000418",
"subject": { "customer_no": "10042", "shop_id": "c-8831" },
"targets": [
{ "system": "shop", "action": "delete", "class": "LK-ZW-KONTO" },
{ "system": "erp", "action": "restrict", "class": "LK-06-BRIEF", "period_end": "2032-12-31" },
{ "system": "accounting", "action": "restrict", "class": "LK-08-BELEG", "period_end": "2034-12-31" },
{ "system": "shipping", "action": "delete", "class": "LK-ZW-KONTO" }
],
"receipt_required": true,
"received": "2027-01-08T09:14:00+01:00"
}Data subject requests across three systems
The stress test for a deletion concept is a data subject request, because it comes with a deadline. The controller provides information on the action taken without undue delay and in any event within one month (Art. 12(3) GDPR) of receipt of the request. That period may be extended by a further two months (Art. 12(3) GDPR) where necessary, taking into account the complexity and number of the requests, and the data subject has to be informed of the extension within the first month. One month sounds generous as long as the answer comes from a single system. Across three systems, half of it regularly goes on working out who looks where.
The way out is the same as for deletion: one case, one route, acknowledgements from every system. What works in practice is an information run that uses the same message path and returns a structured answer per system, covering records found, assigned deletion class, calculated expiry date and restriction status. That answer produces both the information for the data subject and the internal evidence. If customer data also sits in a CRM, it belongs on the same path; which fields arise there is shown in the article on CRM integration with the shop.
- Record the receipt. The period starts when the request arrives, not when it is assigned internally.
- Query every system. Shop, ERP, accounting, shipping, CRM and queues, including the ones that are not answering right now.
- Supply the expiry date. Where a record is restricted rather than deleted, the calculated end belongs in the answer to the data subject.
- Justify an extension. Two additional months are possible, but they have to be communicated within the first month.
What belongs in the documentation
A deletion concept is a document, not a configuration state. It describes the classes, their legal bases, the systems involved, the routes between them and the responsibilities. On the tax side it overlaps with the process documentation that is required for accounting-relevant systems anyway; how the document route of an interface can be described is covered in the article on GoBD process documentation. On the data protection side, the deletion concept supplies the content for the record of processing activities.
Civil law limitation belongs in it as a column of its own, because it can justify retention that neither tax nor commercial law requires. The standard limitation period is three years (§ 195 BGB); it begins at the end of the year in which the claim arose and the creditor learned of the circumstances giving rise to it, or would have learned of them but for gross negligence (§ 199 (1) BGB). Other claims for damages become time-barred, irrespective of knowledge, ten years (§ 199 (3) BGB) after they arose. Anyone holding data for the defence of legal claims relies on the corresponding exception to the right to erasure and limits the scope to what is necessary for that purpose.
Class register
Per class: identifier, period, period start, legal basis, leading system. Stored in machine-readable form so that a checking run reads it and nobody has to type it out.
Deletion path per data type
Which system starts, which follow, which acknowledgement counts and what happens when a target system does not answer. The path belongs in the same place as the other interface descriptions.
Basis per decision
The norm in plain words for every class. For a restriction, additionally the reference to the restriction of processing, so that the decision stays traceable later.
Rollout in four steps
The build can be put into a sequence that avoids bringing the project to a standstill. It starts with an inventory and ends with a repeatable run, and at no point does it touch ongoing sales. Experience suggests the second step is the most demanding, because that is where the business assignment happens; technical steps three and four are comparatively straightforward once the classes are in place. Which services interlock along the way is summarised in the overview of services.
- Take inventory. Record every system, table, file store, export and queue in which a personal reference can arise, including backups and test environments.
- Form and assign classes. Define period, period start and legal basis per class, then assign every recorded location to exactly one class. Open cases are named, not passed over in silence.
- Build the deletion path. Route deletion order, restriction flag and acknowledgement over the existing integration layer; every missing acknowledgement produces an open case.
- Run it dry first. Let the run report only, and hold the hit counts per class and system against an expectation. Only when both sides match is it switched to live.
The timing of the fourth step is rarely arbitrary. Since almost all periods start at the end of the calendar year, the first live run sensibly falls into the weeks after the turn of the year, the same phase in which stock is being reconciled anyway; how that phase can be planned across the interfaces is described in the article on stocktaking and year-end. For accounting, the same principle applies as for the document transfer itself: DATEV integration determines which documents reach the tax adviser at all, and the formats needed for that are described in the article on DATEV automation in e-commerce. Anyone also moving to e-invoicing should bring the deletion classes along; the article on the invoicing obligation from 2027 sets out the dates.
Related Articles
Building Test Environments for ERP Interfaces Properly
Sandbox tenants, anonymised test data and contract tests: how to test ERP shop interfaces safely before go-live instead of flying blind into production.
GoBD Process Documentation for ERP Shop Interfaces
The GoBD require process documentation for every bookkeeping-relevant IT system. How to document the document path of your ERP shop interfaces properly.
DATEV Connection in E-Commerce: Automated Accounting
DATEV connection for online stores: automatically transfer invoices, credit notes and payments. Posting batches, XML documents and API integration.