RevenueFlow.Customers
0.1.0-alpha.7.2
dotnet add package RevenueFlow.Customers --version 0.1.0-alpha.7.2
NuGet\Install-Package RevenueFlow.Customers -Version 0.1.0-alpha.7.2
<PackageReference Include="RevenueFlow.Customers" Version="0.1.0-alpha.7.2" />
<PackageVersion Include="RevenueFlow.Customers" Version="0.1.0-alpha.7.2" />
<PackageReference Include="RevenueFlow.Customers" />
paket add RevenueFlow.Customers --version 0.1.0-alpha.7.2
#r "nuget: RevenueFlow.Customers, 0.1.0-alpha.7.2"
#:package RevenueFlow.Customers@0.1.0-alpha.7.2
#addin nuget:?package=RevenueFlow.Customers&version=0.1.0-alpha.7.2&prerelease
#tool nuget:?package=RevenueFlow.Customers&version=0.1.0-alpha.7.2&prerelease
RevenueFlow.Customers
Durable customer workflows use IRevenueDocumentQueryStore, the configured scoped user store and the same commerce store instance. In-memory stores remain development examples.
CustomerInfoService.GetAsync(scope, userId) selects the customer's economic/access dependencies, original payers of transferred access, exact family source owners and the requested user's resource history. IRevenueDocumentSnapshotStore supplies one consistent engine view across discovery and all pages in PostgreSQL, MongoDB, EF and in-memory. Native reference indexes filter before pagination; unrelated application customers do not consume the default 10,000-document dependency budget or change its revision. A large involved payer's retained economic history still counts against the explicit bound. User revisions bracket the document snapshot when user storage is configured as a separate role, without implying a cross-database transaction.
Recurring purchase access joins the immutable payer, product, exact mode and canonical subscription ownership epoch, using the order's confirmation time and subscription's period start. Billing-account detours and later returns to the same payer cannot move earlier epochs' orders to a current access recipient. Exact scoped ownership registries are point-read into the same dependency snapshot and revision; no new history scan is required. Missing registries for epoch-specific sources fail explicitly, while a legacy default-epoch source retains its same-payer canonical fallback. Access transfer still leaves economic order ownership unchanged.
Custom stores that omit snapshot support retain bounded double-collection of the same dependencies. Their native UserId filters are used when available; other reference discovery may scan. Identical monotonic revisions and retained fences establish a stable interval. Such stores must prohibit deletion/recreation during this protocol. Changed relevant state retries up to eight attempts, and bounds fail explicitly. RevenueCommerceSnapshotEvaluator computes entitlement/resource views from the complete immutable dependency set without constructing a mutation service or writing resource materialization. RevenueFeatureConfiguration.CreateCustomers() composes the configured operational documents, users and clock.
CustomerProfileService records application-authorized Anonymous or Identified classification. Missing classification is conservatively Identified, and an Identified profile cannot be demoted. A null external ID does not imply anonymity.
PurchaseRestoreService retrieves provider-verified evidence through Core's IProviderPurchaseReconciler. The application authorizes the target identity and receipt/token. Canonical originating store/account/transaction or subscription lineage selects the local source. Default behavior keeps an existing owner; AdoptAnonymous requires an explicit current anonymous profile, and TransferAccess requires explicit application authorization. IRestorePurchaseImporter composes new verified evidence with the application's existing inbox/catalog/fulfillment policy. ProviderEntitlementRestoreImporter supplies a working import path for verified entitlement-only sources such as supported Amazon/Roku receipts, using an application entitlement mapping and monotonic version authority.
Access ownership is separate from immutable order, original credit, ledger and debt ownership. Transfers CAS-fence the economic source and both access owners. Resources and debt never move implicitly; the existing explicit resource transfer operation preserves source lots and append-only transfer entries. Future reconciliation continues using the source's original economic owner. Refunds/revocations still govern transferred access. Retrying a completed restore returns the original result without querying the provider; retry a previously unresolved operation with a new command key when new evidence is available.
Restore results describe purchase ownership, not an assertion of current entitlement access. Read CustomerInfo for current access. The built-in unpriced importer does not modify existing monetary sources; an application importer advertises HandlesExistingMonetarySources when it can route such verified observations through its authoritative monetary/access reconciliation policy.
After a billing ownership transfer, recurring restore uses the verified period start to select the matching canonical ownership epoch and personal source. A team-owned period returns an ownership conflict; a transferred lineage without an exact verified period remains unresolved. An importer receives that period's immutable payer, and restore refreshes source selection after import. Completion and access transfer fence the canonical registry revision atomically with the result. Access transfer does not transfer billing authority or resources.
Verified restore mode must match the retained source before import, economic replay or ownership transfer. An immutable account-mode guard partitions canonical originating store/account identities within the complete scope; direct and aggregator integrations share its same-mode alias. Configure distinct originating account aliases or environments for sandbox and production. Historical unknown mode cannot be inferred from a new receipt; applications must use an explicit controlled migration. Guard deletion/rebinding is unsupported during service operation. Existing valid guards are read-only, so unrelated customer purchases do not contend on an account-wide revision.
RevenueLifecycleService.GrantEntitlementAsync creates independent complimentary, promotional or family grants with provenance and explicit validity. RevokeEntitlementAsync revokes only the selected supplemental source. Family access derives from one exact active source grant, follows its expiration/revocation/ownership and never shares purchaser resources. Nested family relationships are rejected. Entitlement-guarded resource spending fences the original source so a winning revocation cannot be bypassed by stale access.
ApplyProviderAccessAsync accepts verified Core observations with EntitlementsOnly authority, a trusted entitlement mapping and monotonically increasing source version. It records source access and grants without inventing price, order, payment or resource evidence. Unknown status/missing validity is rejected; permanent access requires explicit application policy. Canceled subscriptions retain access only through their authoritative access end. Stale observations cannot reactivate a revoked source.
PromotionService publishes immutable campaign revisions and atomically commits global/per-user redemption counters, independent expiring grants, redemption evidence, command receipt, history and outboxes. Advisory eligibility is re-evaluated during redemption. A first-purchase rule checks original purchase history and fences concurrent local fulfillment. Complete provider-history attestations must be no older than the configured freshness bound (default five minutes); absent, stale or future attestations yield UnknownHistory. This does not certify provider-native introductory pricing eligibility or exclude unseen remote activity after the attested instant. Provider-native eligibility/signatures use separate Core capabilities.
Applications own endpoints, authorization, authentication, credential/reference storage and ownership-transfer policy. None of these services trusts client user references or payment metadata as authentication evidence. No implicit economic user merge is performed.
Public composition uses IPurchaseRestoreService, IRestorePurchaseImporter and Commerce's replaceable IRevenueCustomerAccessLifecycle. Custom access implementations must preserve source/mode CAS fences and commit the supplied customer completion writes with access effects, command receipt, history and outboxes in the same store transaction.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- RevenueFlow.Commerce (>= 0.1.0-alpha.7.2)
- RevenueFlow.Customers.Abstractions (>= 0.1.0-alpha.7.2)
- RevenueFlow.Events (>= 0.1.0-alpha.7.2)
- RevenueFlow.Events.Abstractions (>= 0.1.0-alpha.7.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-alpha.7.2 | 52 | 11/10/2026 |