Skip to content

Administration - Smart Quote : Item Bundle

This example demontrates how items (bundled or loose) can be configured and added to a Sales Quote or Sales Order. Bundled items unlike Configured Line Items do not have a router with an associated Bill of Materials.

This setup requires:

Attributes

Create a SELECTED Attribute of type TEXT called POWERCORD wity Entry Type DROPDOWN. This will determine whether to add the power cord item to the Items list. Update the Default Values from the Detail view to add a valid value set called Default with values N, Y.

Rules

Three rules are required: 1) Init, 2) Add Unit, 3) Add Power Cord.

1) Init

This rule sets the output of the Configurator to Bundled Items (instead of Configured Line Item). This dicates what is shown on the Smart Quote view and how the Items are added to a Sales Quote or Sales Order.

when
    var config = Configurator();

then
    config.OutputBundle();

2) Add Item

when
    var config = Configurator();

then
    config.AddItem("0932-3423", 1.0m); // P/N, qty 1

3) Add Power Cord

when
    var config = Configurator();
    var cord = Attribute_TXT(x => x.NameIs("POWERCORD") && x.ValueIs("Y"));

then
    config.AddItem("0932-3430", 1.0m); // P/N, qty 1

Validate

Validate the Smart Quote setup to ensure there are no errors.

Test

Click on the Test button in the ADMIN view to test.