ERP Quirks & Integration Notes
Prophet21 (P21)
Section titled βProphet21 (P21)βOrder tiers: P21 has a 3-tier order fallback chain for order retrieval.
See apps/dagster/erp_pipeline/sources/prophet21/order_service.py and the
tier-hierarchy README in the P21 docs directory.
Custom source migration: Thereβs a get_p21_custom_source_enabled() flag in
config.py that controls whether to use the new custom source path. This was
added as part of a migration β donβt remove the flag gate until the migration
is complete for all customers.
Inventory routing: The PDF extraction workflow runs a P21-specific enrichment
step (enrich_order_with_inventory_routing) that annotates each order item with
the best source location. This is P21-only β a no-op for other ERPs.
Auth: Prophet21AuthHandler handles session management. P21 sessions expire
and need to be refreshed β the handler manages this transparently.
WhereFour
Section titled βWhereFourβHybrid scraping: WhereFour doesnβt have a real API. We use Playwright for login only (to handle their auth flow), then httpx for all actual API calls once we have a session cookie. Donβt try to use Playwright for the full scrape β itβs too slow.
Acumatica
Section titled βAcumaticaβNetSuite
Section titled βNetSuiteβSAP B1 / Eclipse E4
Section titled βSAP B1 / Eclipse E4βGeneral ERP credential storage
Section titled βGeneral ERP credential storageβERP credentials are encrypted with AES-256-GCM. TypeScript (webapp) encrypts them, Python (Dagster/temporal-worker) decrypts them. The encryption key is shared via env var. Do not store plaintext credentials anywhere.