About This Architecture
Template-driven trade processing pipeline transforming source trades through normalization and adaptation stages using central and client-defined functions. Source Trade flows through getNormalizedGranularityFromTrayportTrade() and getNormalizedTraderFromTrayportTrade() functions, leveraging Config Tables for WF State and Trayport-to-Normalized mappings, then enriched via enrichNormalizedTradeForCoral(). Normalized Trade proceeds to Adapted Trade stage via getMarketTemplate() and finalizeAdaptedCoralTrade(), applying Client Market Templates Config and Coral Finalization Config. This architecture separates core transformation logic (transform and adapt functions in LEAD Consult) from client-specific interceptors (enrich and finalize functions in Client Environment), enabling flexible trade processing without modifying central code. Fork this diagram to customize mapping strategies, add new config tables, or document your own trade enrichment pipeline. The pattern demonstrates how configuration tables and interceptor functions enable multi-tenant trade systems.