Use one automation rule to tag assembly orders, or their sales order, once every product on the sales order is covered by assembly orders.
Before you start
The tag must already exist. Go to Manage → Tags → Add Tag and create it (for example, “Full Order Assembly”). If the tag doesn’t exist, the rule fails with “The following tag(s) do not exist.”
Create the rule
- Go to Tools → Automation and click Create Rule.
- Set Event Trigger to Assembly Order Created.
- Click Add Global Condition. Change Condition Type to Sales Order Fully Covered By Assembly Orders.
- Click Add Action and choose Assign Tags. Enter your tag.
- In the Tag dropdown, choose what gets tagged:
- This record: the assembly order that triggered the rule.
- Source sales order: the sales order it was built from.
- All assembly orders on the same sales order: every assembly order created from that sales order.
- Click Create Automation, name the rule, and click Save.
How the condition decides
- For each product on the sales order, the planned quantity of its assembly orders must reach the ordered quantity. A product with no assembly order counts as not covered.
- Completed assembly orders still count toward coverage.
- Shipping and fee lines (lines with no product) are ignored by default. To change this, untick Ignore Shipping and Fee Lines on the condition. If you do, those lines will keep the order from counting as covered.
- A sales order with no product lines never qualifies.
- Assembly orders created from Assembly Orders → Create aren’t linked to a sales order, so the condition is always false for them.
Creating assembly orders linked to a sales order
Go to Operations → Sales Order Grid, expand the order, and open the line’s ⋮ menu. Choose Create Assembly Order. You may need to scroll the grid to the right to see the menu. The sales order must be allocated for its lines to appear.
Troubleshooting: To check why a rule did or didn’t run, go to Tools → Automation → Testing. Set Model Type to Assembly_order, enter the assembly order’s ID (from its URL), set Event Name to Assembly_order_created, and click Trigger Test. Each rule shows as Executed, Skipped (condition not met) or Failed, and Failed includes the error message. This replaces the old workaround of an "Assembled" product tag, "Has Assembly" and "Has Stock Items" order tags, and three rules.