BOM Rule

BOM Rule

BOM Rules in ianaiERP allow you to create dynamic Bills of Materials with conditional logic and automated component selection. This powerful feature enables flexible manufacturing configurations that adjust based on the attributes of your built items.

Overview

  • BOM Rules automate the process of determining which components are included in a BOM.

  • Rules can filter items based on various criteria and calculate quantities dynamically.

  • This feature is especially useful for configurable products or those with multiple variations.

Rule Expression Format

BOM Rules use a structured format with conditions, dynamic item filters, and quantity calculations.

Conditions Format

Conditions use the following syntax:

label|operator|value;label|operator|value

Where:

  • label is the attribute or option of the built item

  • operator is the comparison method

  • value is the criteria for comparison

  • ; separates each condition

Special characters | and ; are reserved for syntax and cannot be used as key values.

Example:

color|=|Red;size|>|10

This component is only included when the built item's color option is Red and its size option is greater than 10.

Supported Operators

OperatorDescriptionFormatApplicable Value Types
EqualExact match=text, number, date, boolean, list
NotEqualNot matching!=text, number, date, boolean, list
BlankIs emptyblanktext, number, date, list
NotBlankIs not emptynot_blanktext, number, date, list
GreaterThanGreater than>number, date
GreaterThanEqualGreater than or equal>=number, date
LessThanLess than<number, date
LessThanEqualLess than or equal<=number, date
ContainsContains textcontainstext
NotContainsDoesn't contain textnot_containstext
StartsWithStarts with textstarts_withtext
NotStartsWithDoesn't start with textnot_starts_withtext
EndsWithEnds with textends_withtext
NotEndsWithDoesn't end with textnot_ends_withtext
InValue in listinlist
NotInValue not in listnot_inlist

Dynamic Item Filters

Dynamic item filters let you automatically select BOM components based on criteria:

filter_by_category(FunctionName)
filter_by_attribute(value_type|label|operator|value)
order(direction|type)

Where:

  • filter_by_* functions create filter conditions — filter_by_type(...) and filter_by_category(...) filter on the item's type or category, and filter_by_attribute(value_type|label|operator|value) filters on any item attribute
  • order() functions determine sorting order when more than one item matches — only the first result after sorting becomes the component
  • Variables in curly braces {xxx} reference the built item's attributes or options

Example:

filter_by_category(Fasteners);filter_by_attribute(text|material|=|Steel);order(asc|price)

Selects the cheapest Steel fastener in the Fasteners category.

Quantity Calculations

Quantity calculations allow you to dynamically adjust the quantity of BOM components:

Dynamic Quantity Calculation

Quantities can be expressed as static values or dynamic calculations:

  • Static: 100

  • Simple addition: 100+{quantity}

  • Formula with multiple variables: {width}*{height}/100

  • Where variables in curly braces {xxx} reference the built item's attributes or options.
    If you want to use component's attribute use the prefix 'mattr_'. e.g.) {mattr_width}

Available functions: ROUND()
e.g.) ROUND({width}) or ROUND({width},2). The number after comma is precision.

Creating BOM Rules

To create a BOM Rule:

  1. Navigate to Manufacturing > BOM in the main menu.

  2. Find and select BOM relates to the assembly item for which you want to create a rule-based BOM.

  3. In the BOM detail view, Open the BOM Rules tab.

  4. Create rule-based components.

  5. Add your rule expressions following the formats described above.

Best Practices

  1. Test your BOM rules with various configurations to ensure they produce the expected results.

  2. Use clear and meaningful attribute names in your rules for better readability.

  3. Start with simple rules and gradually add complexity as needed.

  4. Document your rule logic separately for future reference.

  5. Regularly review and update BOM rules when product specifications change.

Related Features

For more detailed information on advanced BOM rule techniques and optimization, please refer to the specific sections in this documentation.

Still have questions?

Our support team is just a click away.