Skip to content

Keep-assembled cascade

When an order is cancelled or refunded, Assemblified walks the BOM tree to decide what to restore where. The walk respects a Keep Assembled on Return flag at every layer — both the parent BOM and each sub-assembly carry their own.

The rule that ties them together: traversal halts at any node with the flag set. This page explains the halt rule with examples.

  • The flag, briefly
  • The halt rule
  • The three-branch table
  • A worked example
  • Logistified asymmetry

Each sub-assembly has its own Keep Assembled on ReturnKeep Assembled on ReturnA toggle on BOMs and sub-assemblies that controls cancel/refund behavior. When on, returned units restore the entity's pre-assembled shelf instead of breaking back into raws. Cascades through nested sub-assemblies — traversal halts at any node with the flag set. Read more → toggle, independent of the parent BOM’s flag.

  • On. When the sub-assembly is being restored on cancel/refund, the units stay assembled — they go onto the sub-assembly’s pre-assembled shelf rather than breaking back into raws.
  • Off. The sub-assembly’s components are restored to their inventory tables.
  • Default: Off.

The same flag exists at the BOM level — see BOM Refunds & Cancellations for the BOM-side perspective. This page is the SA-side complement.

When the parent BOM’s flag is off (so we’re traversing), the cascade walks down through nested sub-assemblies. At each sub-assembly, the rule is:

  • If the sub-assembly’s flag is on: restore to that sub-assembly’s pre-assembled shelf, and don’t recurse further into its components. The components stay inside the assembled units.
  • If the sub-assembly’s flag is off: recurse deeper. The sub-assembly’s components are restored normally. Nested sub-assemblies inside it are evaluated by the same rule.

For a BOM B containing sub-assembly S:

Parent BOM flagSA flagWhat restores on cancel/refund of N units
On(any)Nothing decomposes. BOM’s pre-assembled +N.
OffOnSA’s pre-assembled +N×qty. SA’s components stay inside. BOM’s direct raws return.
OffOffAll raws return — both the BOM’s direct raws and the SA’s nested raws. Recursion continues into deeper nested SAs.

BOM B contains 3 × Raw R1 + 1 × Sub-assembly S.

S contains 5 × Raw R2 + 2 × Raw R3.

Customer orders 4 units of B. Then cancels.

Configuration A: B flag on

  • BOM B’s pre-assembled gets +4.
  • R1, R2, R3 all unchanged.
  • S’s pre-assembled unchanged.

Configuration B: B flag off, S flag on

  • R1 +12 (4 units × 3 per unit).
  • S’s pre-assembled +4 (4 units × 1 per unit).
  • R2, R3 unchanged.

Configuration C: B flag off, S flag off

  • R1 +12.
  • R2 +20 (4 × 1 × 5).
  • R3 +8 (4 × 1 × 2).
  • Pre-assembled unchanged at all levels.

If you have the Logistified integration, demand tracking always sees the full raw-material requirement on cancel/refund — regardless of the cascade. The reasoning: demand is in absolute terms. The order isn’t being fulfilled, so the demand drops. Whether the physical components actually return is a separate question (the cascade rule).

This is usually correct — the asymmetry only matters when reconciling cross-system reports. See BOM doc 06 → Logistified asymmetry for the BOM-side perspective.

  • The flag at a deeper SA is only consulted if the path can reach it. A parent BOM with the flag on stops everything — deeper SA flags are never checked.
  • Setting the flag late doesn’t retroactively change anything. Past cancels processed with the flag off applied that branch. Flipping the flag now affects future cancels only.
  • Decimal restorations are clamped at zero on the receiving end. If something inconsistent in the data would produce a negative restoration, the SA’s pre-assembled won’t go below zero.