VantageDash

Industry Profiles & Templates

Industry profile schema, 8 built-in templates, onboarding workflow

The matching engine is configurable per-tenant via industry profiles. This allows VantageDash to work for any product vertical — packaging, cosmetics, electronics, etc. — without hardcoded domain knowledge.

How It Works

Each tenant has one row in the industry_profiles table. This row contains JSONB config that controls:

  • Product categories and keywords for classification
  • Scoring weights for match confidence calculation
  • Size equivalences for cross-format matching (e.g., "1/8 oz" = "3.5g" = "4x5 bag")
  • Hard block rules that prevent impossible matches
  • AI prompt configuration (extraction categories, matching rules)
  • Search terms for ILIKE candidate retrieval

Profile Schema

{
  "tenant_id": "mybrand",
  "industry_slug": "packaging",
  "industry_name": "Packaging & Containers",
  "categories": [
    {
      "slug": "mylar_bag",
      "display_name": "Mylar Bags",
      "keywords": ["mylar", "stand up pouch", "resealable bag"]
    }
  ],
  "scoring_config": {
    "category_match_bonus": 15,
    "category_mismatch_penalty": -40,
    "size_match_bonus": 30,
    "size_mismatch_penalty": -100,
    "unit_match_bonus": 10,
    "unit_mismatch_penalty": -25,
    "quantity_match_bonus": 10,
    "specialty_brand_penalty": -100,
    "partial_info_penalty": -20,
    "material_match_bonus": 10,
    "material_mismatch_penalty": -30,
    "price_ratio_limit": 10.0,
    "price_proximity_bonus": 5,
    "price_extreme_penalty": -50,
    "keyword_overlap_bonus": 12,
    "active_threshold": 65,
    "pending_threshold": 40,
    "ai_active_threshold": 80,
    "ai_pending_threshold": 50
  },
  "hard_block_rules": [
    {
      "field": "material",
      "categories": ["mylar_bag", "glass_jar"],
      "penalty": -100,
      "description": "Different materials should never match"
    }
  ],
  "search_terms": {
    "mylar_bag": ["%mylar%", "%stand up pouch%"],
    "glass_jar": ["%glass jar%", "%glass container%"]
  },
  "size_equivalences": {
    "mylar_bag": {
      "4x5": ["4x5", "4 x 5", "3.5x5", "1/8 oz", "3.5g"]
    }
  },
  "specialty_brands": {
    "miron": ["miron", "ultraviolet"]
  },
  "unit_types": [
    {"unit": "ml", "aliases": ["milliliter"], "is_base": true},
    {"unit": "oz", "aliases": ["ounce"], "conversion_to_ml": 29.57}
  ],
  "ai_extraction_categories": ["mylar_bag", "glass_jar", "tube", "other"],
  "ai_matching_rules": [
    "Different materials (glass vs plastic) are NEVER a match",
    "Size must match within 10% tolerance"
  ],
  "use_new_matcher": false
}

IndustryProfile Dataclass

The industry_profile.py module provides an IndustryProfile dataclass with helper methods:

MethodPurpose
get_category_keywords()Returns {slug: [keywords]} for product categorization
extract_product_category(text)Categorize a product title using keyword matching
find_canonical_size(category, text)Map product text to canonical size key
get_specialty_brand(title)Detect specialty brands that shouldn't cross-match
get_hard_block_rule(field, category)Get penalty rules for impossible matches
get_scoring(key, default)Read a scoring config value
get_ai_categories_string()Comma-separated categories for AI extraction prompt
get_ai_rules_block()Formatted rules for AI matching prompt

Caching

Profiles are cached in-memory with a 5-minute TTL. The cache is keyed by tenant_id. Call clear_profile_cache(tenant_id) after profile updates (the /api/profile PUT endpoint does this automatically).

Pre-Built Industry Templates

VantageDash ships with 8 industry templates that new tenants can apply during onboarding. Each template provides a complete profile tuned for its vertical.

TemplateSlugKey Categories
Packaging & Containerspackagingmylar_bag, glass_jar, plastic_jar, tube, pop_top_bottle, box, label
Cosmetics & Beautycosmeticsskincare, makeup, haircare, fragrance, nail, tools
Supplements & Vitaminssupplementscapsules, powder, gummies, liquid, softgels, tablets
Consumer Electronicselectronicscables, speakers, cases, chargers, headphones, storage
Food & Beveragefood_beveragesnacks, beverages, dairy, bakery, condiments, frozen
Apparel & Fashionappareltops, bottoms, shoes, outerwear, accessories, activewear
Home & Gardenhome_gardenlighting, furniture, kitchen, garden, decor, cleaning
Pet Productspetdog_food, cat_food, toys, health, grooming, beds

Template API

  • GET /api/profile/templates — List all available templates (metadata only)
  • GET /api/profile/templates/{slug} — Get full template with all config
  • POST /api/profile/templates/{slug}/apply — Apply template to tenant's profile (creates or replaces)

All templates default use_new_matcher: false for safety — tenants must explicitly opt in after validating.

Settings UI

The Settings page has two tabs:

  1. General — Brand name, URL, industry, timezone, brand color
  2. Matching Profile — Full industry profile editor:
    • Categories CRUD (add/remove with keywords)
    • Scoring weights grid (19 configurable fields)
    • AI rules textarea
    • Search terms JSON editor
    • Engine toggle (use_new_matcher switch)
    • Save/delete with toast notifications
  1. Pick an industry template during onboarding
  2. Customize categories and keywords to match your product catalog
  3. Sync your Shopify products
  4. Scrape a competitor
  5. Run parallel validation to compare old vs new matcher
  6. Review the validation report
  7. When satisfied, flip use_new_matcher to true
  8. Run production matching