Delete a product and clear its confirmation template
What It Does
Deletion checks the current product, its setup protection and dependent references before removing the local aggregate. After commit, Accounting attempts cleanup of the product's owned confirmation template.
The Flow
When Something Fails
Local refusals leave the product and owned records intact. Some dependency constraints lack a matching refusal translation and can surface as generic server errors. A cleanup failure is logged and does not reverse deletion or schedule a retry. Recreating the identity while stale owned content remains requires care.
Open Design Questions
Template cleanup needs a recovery policy if operators cannot rely on logs alone. Dependency failures also need consistent explanations and direct proof.