Design note · Form configuration
Product-line extensibility
Add product as a configuration scope without encoding it into journey identity.
1. Scope
This note covers product-line scoping only. Profile enrichment no longer uses the composed-plan proposal that previously appeared here. See the accepted Customer update journeys design for NewGen assessment, configured form resolution, authenticated APIs, progress, and core submission.
2. Product lines
The same country can require different journeys and form overlays for banking, insurance, and future product lines. A product line is a nullable scope beside channel.
journeyId remains the stable flow identity. Encoding product into that ID would duplicate whole journeys and force client changes when products are added. Instead, configuration gains productLine, and resolution selects the most specific matching variant.
3. Resolution precedence
| Priority | Scope | Example |
|---|---|---|
| 1 | Country wildcard | Kenya base behavior |
| 2 | Product line | Kenya banking |
| 3 | Channel | Kenya mobile |
| 4 | Channel and product line | Kenya mobile banking |
The same precedence applies to JourneyVariantSelector, FormResolver.OrderByPrecedence, and patch filenames. Equal-specificity matches remain configuration errors.
4. Studio changes
- Declare supported product lines in country data.
- Add a product-line selector beside channel in the journey builder.
- Add the same selector to form overlays and API response mocks.
- Preview the exact country, channel, and product-line combination.
- Validate ambiguous variants and malformed patch filenames before publish.
StartOnboardingRequest already carries account type information before journey resolution. The service must map selected products to the product-line scope rather than ask the client to choose a journey ID.
5. Sequencing
- Define the closed product-line vocabulary and its mapping from account products.
- Add the nullable scope to service configuration and deterministic resolution.
- Add product-line controls and validation to the studio.
- Extend preview fixtures and API response mocks.
- Release country variants only after fallback and ambiguity tests pass.