Skip to main content
Version: Latest

10. Settings Recommendation and Apply

Full mechanics (recommendation engine rules, settings-patch schema per settings group, entitlement filtering, the internal apply bridge's request/response contract, and the TenantOnboardingApplyLog audit trail) are documented in Business Onboarding & Smart Configuration, Chapters 10–11. This chapter records only what is specific to a brand-new self-registered tenant.

10.1 Entitlement filtering happens again at apply time, not just at recommendation time

OnboardingService.ApplyRecommendationAsync re-checks the tenant's current subscription-allowed settings groups (ISettingsGroupEntitlementService.GetTenantAllowedSettingsGroupsAsync) and strips any settings group from the patch that the recommendation-time filter allowed but the tenant's live subscription no longer allows — logged as a warning, not a silent no-op. For a new Starter-package tenant verified in this task, no groups were stripped: the Starter package's entitlements matched the RetailStore profile's recommended groups exactly.

10.2 The internal apply bridge is disabled by default — including in dev

OnboardingApplyBridgeSettings.Enabled = false in every environment's checked-in config (appsettings.json, appsettings.Development.json) — this is a deliberate production-safe default, the same pattern already established for the accounting-chart-template and cost-center apply bridges (see Chapter 22 in the Tenant Starter Kit guide). To exercise a real end-to-end apply in a dev/local session, both sides of the loopback bridge must be enabled with a matching key, via environment variables only — never by committing a change to appsettings.*.json:

OnboardingApplyBridgeSettings__Enabled=true
OnboardingApplyBridgeSettings__InternalApiKey=<dev-only-value>
InternalServiceAuthSettings__OnboardingApplyApiKey=<same-dev-only-value>

Both settings live in the same Shumoul.Api process (the internal bridge is a loopback call to https://localhost:5001 in dev, https://api.shumoul.com in production) — see Chapter 12.

10.3 What gets written

The applied patch in the verified scenario touched CashierAppsSettings, ProductSettings, DiscountSettings, TaxSettings, LoyaltySettings, CostCenterSettings, FinancialSettings, and NotificationSettings — all via the tenant's existing, official settings service, not a direct database write from the onboarding engine itself. No inventory quantities, accounts, or product records are touched by this step — see Chapter 14 — Operational Boundaries.