flow
Parameter Graph Persistence
Persist scraped parameter assignments through the canonical dictionary, taxonomy upsert, and variant_parameters junction writer.
FlowStatus: Implemented in api-v1
Overview
This flow documents how api-v1 scrape persistence aligns with the canonical parameter schema (PARAM-S5/S6). It runs inside bulk product creation and refresh/reload scrape paths — not as a standalone HTTP endpoint.
Parent workflows:
- Create Product From URL — parameter graph runs during the “Persist catalog” step
- Refresh and Reload Product Scrape — parameter graph runs during re-materialization
Entities
- ParameterKey — owned by bim-ontology; scraping either maps onto an approved key or creates one in
active - ParameterValue — also owned by bim-ontology; product-marketplace reads it through the internal catalog-read routes
- VariantParameter — owned by product-marketplace
Ports
ForCreatingScrapedParameterGraph— orchestrates taxonomy upsert + junction writesForReadingCanonicalParameterDictionary— loads dictionary snapshotForStoringPendingParameterLinks— ephemeral pending-link storeForLinkingVariantParameters— PM mirror lookups and variant_parameters ensure-link
Code References
apps/api-v1/src/modules/product-marketplace/adapters/outbound/persistence/airtable/AirtableScrapedParameterGraphAdapter.tsapps/api-v1/src/modules/product-marketplace/adapters/outbound/persistence/airtable/CanonicalParameterDictionaryIndex.tsapps/api-v1/src/modules/product-marketplace/adapters/outbound/persistence/airtable/AirtableVariantParameterLinkingAdapter.tsapps/api-v1/src/modules/product-marketplace/adapters/outbound/scraping/persistence/airtable/bulkProductCreation.service.tsapps/api-v1/src/modules/product-marketplace/core/application/use-cases/ReconcilePendingParameterLinksUseCase.tsapps/api-v1/src/modules/product-marketplace/composition/scrapedParameterGraph.composition.ts
Notes
- Single junction writer: bulk product creation must not duplicate variant_parameters writes; the graph adapter owns junction creation.
- Pending-link store: local file at
apps/api-v1/.cache/pending-parameter-links.json(ephemeral; durable backing deferred). - Stable domain_id: TS mint uses slugified handle; Python Phase-B backfill used legacy key-type inputs — reuse is via dictionary name/handle lookup.
- Deferred: scraper mapping Airtable tables, live dry-run scrape validation, MTO
model_parameterswrites (PARAM-S7).