Administration: Smart Quote Attributes
Attributes are the core variables of a Smart Quote configuration. They store user selections (e.g., Frame Color, Bolt Length), environmental context (e.g., Customer Type), or calculated values (e.g., Total Volume) that drive the behavior of rules and the final Bill of Materials.
🏗️ Attribute Setup
Every Attribute is defined by a set of core properties that determine how it behaves in the UI and how it is processed by the logic engine.
1. Source (Selected vs. Generated)
- SELECTED: Inputs provided directly by the user on a Page.
- GENERATED: Values calculated by the Configurator Rules. These are usually read-only for the user.
2. Data Types
Choosing the correct type is critical for calculation logic and UI formatting: - TEXT: Standard alphanumeric strings. Use for names, colors, or IDs. - DIMENSION: Used for measurements (Length, Width, Diameter). These support unit conversion and numeric operations. - NUMBER: Standard integers or decimals for counts or factors. - BOOLEAN: Yes/No toggles.
3. Key Properties
- Attribute Name: The internal variable name used in Rules (e.g.,
DIA,MATERIAL). - Display Label: The user-friendly name shown on the screen (e.g., "Bolt Diameter").
- Default Value: The initial value assigned when the configurator starts.
🛠️ Setting up LEN and DIA
To implement the "Atomic Attributes" pattern for a bolt, you would configure the following in the Admin UI:
DIA (Diameter) Setup
- Name:
DIA - Label:
Diameter - Type:
DIMENSION - Source:
SELECTED - Default Value:
0.5 - Valid Values: (Optional)
1/4,1/2,3/4,1.0
LEN (Length) Setup
- Name:
LEN - Label:
Length - Type:
DIMENSION - Source:
SELECTED - Default Value:
3.0 - Valid Values: (Optional)
1.0,2.0,3.0,4.0,5.0
COATING Setup
- Name:
COATING - Label:
Coating - Type:
TEXT - Source:
SELECTED - Default Value:
PLAIN - Valid Values:
PLAIN,ZINC,CADMIUM,XYLAN
📐 Example: Hex Bolt Attributes
When setting up a Hex Bolt configurator, the choice of attributes directly impacts the simplicity of your formulas.
Atomic vs. Combined Attributes (Architecture Tip)
While you might be tempted to use a single SIZE attribute (e.g., "1/2x3"), it is better to split these into Atomic Attributes:
| Attribute Name | Type | Source | Purpose |
|---|---|---|---|
| DIA | DIMENSION | SELECTED | Bolt Diameter (e.g., 0.5) |
| LEN | DIMENSION | SELECTED | Bolt Length (e.g., 3.0) |
| COATING | TEXT | SELECTED | Surface finish (e.g., PLAIN) |
| VOLUME | NUMBER | GENERATED | Calculated cubic volume |
| WEIGHT | NUMBER | GENERATED | Calculated weight in lbs |
Why split them?
- Simpler Math: You can use DIA.Value directly in formulas without complex string parsing.
- Better Validation: You can set minimum/maximum ranges for length and diameter independently.
- Cleaner Pricing: Pricing rules can be applied per-inch of length or per-diameter class.
👉 See the full Hex Bolt Calculation Example
🔗 Valid Values and Dynamic Queries
Attributes can be restricted to a specific list of options to prevent invalid configurations.
- Static Valid Value Sets: Defined sets of options that can appear based on conditions (e.g., "Show these materials only for BSL-2").
- Dynamic SQL Queries: Populated from your Items Catalog. This ensures users only select items that exist in your ERP.
💡 Best Practices
- Upper Case Naming: Use
ALL_CAPSfor attribute names to make them stand out in C# Rules code. - Provide Defaults: Always set a default for
SELECTEDattributes to provide a "starting point" for the user. - Filter Early: Use Valid Value Sets to prevent users from picking bad combinations, rather than writing a Rule to show an error message after they've made a choice.