Factory Labs

PIM Module

Product Information Management — unified catalog, ERP sync, AI enrichment, channels, and public catalog sites.

Product Information Management (PIM)

The PIM module centralizes SKU masters, structured attributes, assets, supplier intake, completeness scoring, and channel publication — inside your multi-tenant CRM org (schema-per-tenant products + pim_* tables).

What's included

AreaDescription
Tenant catalogGET /api/v1/pim/products — search, paginate, draft/publish workflow
AttributesTyped facet definitions + localized values (pim_attribute_definitions, pim_attribute_values)
Families & categoriesMerchandising hierarchy + inheritance hooks (pim_categories, pim_families)
AssetsBlob-backed media with checksum/dedup hooks (pim_assets, pim_asset_links)
ChannelsPublication matrix (pim_channels, pim_channel_views) — web, ERP, marketing, conversations
CompletenessHeuristic scoring + daily snapshots (pim_completeness_snapshots, cron /api/cron/pim-completeness)
Supplier intakeImport jobs + review queue (pim_supplier_imports, pim_review_tasks)
Public catalogSEO-friendly /catalog/{orgSlug} microsite + POST /api/v1/catalog/{orgSlug}/quote → lead
AI toolsMCP pim_* tools + enrichment pipeline (PDF, vision, translator, gap detector)

Enablement

PIM ships off by default.

  • Self-service: POST /api/v1/pim/setup/enable (authenticated org user) provisions DDL + seeds default channels + flips organizations.settings.modules.pim.
  • Super admin: /admin/tenants/{slug}/modules can toggle PIM for any tenant.

CRM / ERP / Marketing wiring

  • ERP sync: nightly erp-sync mirrors ERP master SKUs into erp_products and upserts unified products rows when PIM is enabled (source = erp).
  • Marketing segments: audience builders can filter on products.attributes JSON and linked ERP facets — treat PIM-enriched attributes as first-class segment predicates alongside CRM fields (evaluate against tenant products rows).
  • Automations: steps pim_publish_product and pim_enrich_product ship in the workflow registry.

OAuth scopes

Machine clients may request:

  • pim:read, pim:write, pim:assets:write, pim:publish

Deprecated API

Legacy GET/POST /api/v1/products (global products.env table + x-org-id) is retired. Use /api/v1/pim/products with a normal session or Bearer token — tenant routing uses Auth.js org context, not custom headers.