Skip to content

Administration - Smart Quote / Product / Rules

Smart Quote Rules are the "glue" that maps Attribute values to the Router and Bill of Materials. This section enables an ADMIN user to manage the Rules for a Smart Quote product.

Functions

Functions

References - Items

Rules can add Items to the BOM. To speed up review and solving of problems (cost incorrect, etc), an Item Refernces view shows all the Items the could be added to the BOM across all Rules for the selected product.

Item Refererences

List

The List view allows you to see various properties across all rules. Use the View button to see other properties. Shown below is the Priority view. A second view is Rules All which shows all rules in one view for easy comparison with links and buttons for editing.

Rules List

Detail

Rule Detail

The format of a Rule is a when block followed by a then block. The syntax is C#. Lines in the When clause are ANDED (Boolean AND) together (all must be true). Boolean OR can be used within the lambda expression, like this (the || on the right). The order of evaluation follows the same rules as a mathematical expression.

when
    // find the Configurator object (so we can use it in the Then block)
    var config = Configurator();
    // find TEXT attribute having Name "MATERIAL" and (Value "STEEL1" OR Value "STEEL2")
    var mat = Attribute_TXT(x => x.NameIs("MATERIAL") && (x.ValueIs("STEEL1") || x.ValueIs("STEEL2")) );

then
    // Add Task(s)
    config.TaskAdd("DESIGN");

Simple

when
    // find the Configurator object (so we can use it in the Then block)
    var config = Configurator();

then
    // Add Task(s)
    config.TaskAdd("DESIGN");

Complex (Slightly)

when
    // find the Configurator object (so we can use it in the Then block)
    var config = Configurator();
    // ** AND **
    // find TEXT attribute having Name "MATERIAL" and Value "STEEL1"
    var mat = Attribute_TXT(x => x.NameIs("MATERIAL") && x.ValueIs("STEEL1") );

then
    // Add Item to Bill Of Materials. Item Number is from Items
    // Alternative to adding via Rules is to use Item Mapping
    config.AddItem("ItemNumber", 1.0m); // m indicates decimal value (required)
    // config.AddItem("ItemNumber", 1.0m).AddNote("Note...");
    // config.AddItem("ItemNumber", 1.0m).AddAttribute("Name", "Value");
    // Add Tasks
    config.TaskAdd("DESIGN");
    config.TaskAdd("ROUTER_PROG");
    config.TaskAdd("ROUTER_PROG").Detail("Process Detail Here...");
    //
    config.AddNote("This is a note");
    //
    config.WeightSet(1.25m);
    config.WeightAdd(0.25m);
    //
    config.LengthSet(20m);
    config.LengthAdd(0.25m);
    //
    config.QuantitySet(1.0m);
    config.QuantityAddAdd(1.0m);

Add

The "Rule Add" view allows you to add a Rule. At this stage just the Rule basics are required (not the Rule itself).

Rules are evaluated by Group first, then in Priority in descending order (highest first). This allows you to control the sequence of rule execution and thus the sequence of how a router is built up.

Rule Add

Edit

The "Rule Edit" view allows you to update the basic details of the Rule and the Rule itself.

Rule Edit

"Fast Add" buttons enable you to quickly add when/then elements that can be further edited.

Rule Edit