Administration: Smart Quote Dynamic Catalog Lookups
Attributes can have their available options populated dynamically from the Items Catalog. The Dynamic Valid Values editor saves a canonical JSON lookup definition and searches the tenant's normalized catalog data in catalog_items_attributes.
Legacy item AttributesJSON and attribute SQL/XML are not runtime data sources. They may be retained temporarily as read-only migration evidence, but a lookup is active only after its item attributes are normalized and its canonical definition is saved.
Catalog Lookups for Dynamic Lists
Use Dynamic Valid Values on an Attribute to populate a dropdown from Item Catalog numbers or Item Catalog attribute values. Choose an optional category, then add rules that require an item attribute to be present, equal a fixed value, or equal the value of another Smart Quote attribute. All rules are combined with AND.
The lookup searches the current tenant's Item Catalog. Add a category and attribute filters that identify the intended items; it is not limited automatically to the product's item references.
Example: return MATCOND values from the item attribute COND, filtered by the selected GRD
To populate MATCOND, set Generate valid values from to Item Catalog Attribute Value, select COND, and add a rule for Item Catalog attribute GRD that matches Smart Quote attribute GRD. Use Test valid values to enter representative attribute selections and inspect the returned values and filter log.
Saving validates that every matches Smart Quote attribute selection exists on the same product and does not refer to the attribute being populated.
Moving Existing Lookups Forward
The Attribute Query page identifies old SQL/XML definitions as Legacy SQL/XML — disabled. Supported catalog definitions can be reviewed and converted to canonical JSON; review the return field, category, filters, and test results before saving the new definition.
Arbitrary SQL lookups cannot be converted automatically. Recreate them with the Dynamic Valid Values editor only when the same behavior can be represented and validated against normalized catalog attributes. Otherwise, leave the legacy XML read-only for forensic context and record the reason in the tenant's operational notes. New SQL valid-value queries are disabled.
After migration, clear obsolete item AttributesJSON values only after confirming the normalized row count and lookup results. Clearing that field makes the canonical ownership explicit and prevents stale data from being mistaken for an active fallback.
Rule-Based Category Filter
Rules can also populate valid values from any catalog category in the current instance:
config.Attribute("RATE_A")
.Valid()
.FromItems()
.Category("ZZ TEST")
.Attribute("RATE_A")
.HasName("GEN").HasValue("2019")
.HasName("PROGRAM").HasValue("SVR_MODERN")
.Values();
This returns distinct RATE_A item-attribute values for items in category ZZ TEST whose GEN and PROGRAM attributes match. The values are applied before Smart Quote validates and defaults the dropdown. When a selected value is no longer valid, Smart Quote applies the available default and keeps dependent catalog lookups in sync.
Best Practices for Attributes
- Consistent Naming: Use clear, uppercase names (e.g.,
WIDTH,MATERIAL_TYPE) to make your Rules easier to read. - Use Default Values: Provide sensible defaults for optional selections to speed up the quoting process.
- Validate via Rules: Use Error Logging to alert users if an attribute combination is technically impossible.
- Pro Tip: Whenever possible, use Attribute Valid Value sets to filter options before a selection is made, rather than relying on error messages after the fact.