Quote Module – RAG Knowledge Base

Chunk 1: Module Overview
Metadata: module=Quote, type=overview, location=CMH.HFA.Accounting.Orchestration/src/Quote, count=1, purpose=customerPreprocessing
Purpose: Preprocessing layer transforming insurance quote events into Oracle customer master data structures
Scope: Single Lambda function handling quote-to-customer conversion in the quote offering workflow
Integration Points: Receives InsuranceQuoteOfferedEventPayload, produces OracleCustomer for Oracle Fusion, enables customer record initialization before policy issuance
Key Concepts: quote preprocessing, customer data transformation, Oracle customer creation, account establishment, site configuration, bill-to designation

Chunk 2: PreprocessQuoteOfferedLambda Function
Metadata: component=PreprocessQuoteOfferedLambda, type=Lambda, pattern=dataTransformation, deployment=serverless
Description: Converts insurance quote event data into Oracle Fusion customer account structures
Input: InsuranceQuoteOfferedEventPayload (demographics, address, account identifiers)
Output: OracleCustomer object with complete account, site, and bill-to setup for Oracle integration
Lambda Configuration: 256 MB memory, 30-second timeout, basic execution role policies
Processing Pattern: Stateless, synchronous transformation, no external service calls

Chunk 3: Customer Demographic Mapping
Metadata: operation=customerMapping, source=quotePayload, target=OracleCustomer, fields=name
Extracted Fields: First, Last, Middle names, Name suffix
Customer Properties: SourceSystem="HFA"
Mapping Logic: Direct property-to-property assignment, handles optional middle name/suffix
Purpose: Establishes customer identity for Oracle customer master

Chunk 4: Account Identifier Extraction
Metadata: operation=accountIdentifierMapping, identifierTypes=2, primaryKey=AccountID
Identifier Types:

AccountID → AccountSourceReference (primary account ID)
iSeriesAccountKey → AccountDescription prefixed with "HFA_" for legacy correlation
Extraction Method: Finds identifiers by Type property, non-null assertion
Account Source: "HFA" (Home First Agency)
Purpose: Links Oracle account to source system for reference and synchronization

Chunk 5: Account Configuration
Metadata: entity=Account, properties=7, status=active, lifecycle=openEnded
Account Properties:

AccountSourceReference → from AccountID
AccountSource="HFA"
AccountDescription="HFA_{iSeriesAccountKey}"
CustomerClass="HFA Customer"
AccountStatus="A"
AccountEstablishedDate=current date
AccountTerminationDate=4712-12-31 (open-ended)
Purpose: Creates foundational account record for sites, payment terms, transaction history

Chunk 6: Site Record Configuration
Metadata: entity=Site, siteName=MAILING, purpose=addressRepository, status=active
Site Properties:

SiteName="MAILING"
AddressLine1/2, City, State (converted via ToDescription()), PostalCode, Country="US"
SiteStatus="A", AccountAddressSet="CHI_HFA_SET"
Date Ranges: SiteFromDate=current date, SiteToDate=4712-12-31
Purpose: Stores physical location for correspondence and compliance

Chunk 7: Bill-To Site Use Configuration
Metadata: entity=SiteUse, purpose=BILL_TO, primaryIndicator=true, cardinality=one
Site Use Properties:

Purpose="BILL_TO", primary indicator=true
SiteUseFromDate=current date, SiteUseToDate=4712-12-31
Cardinality: Single bill-to site per mailing site
Purpose: Establishes billing destination for invoices, credit memos, payment applications

Chunk 8: Address Normalization
Metadata: operation=addressMapping, source=quoteAddress, normalization=stateCode, defaultCountry=US
Address Extraction: From InsuranceQuoteOfferedEventPayload.Address
State Handling: Converts StateCode enum → string description using ToDescription()
Zip Code Handling: Uses 5-digit base only
Country Defaulting: US
Purpose: Normalizes addresses for Oracle Fusion integration

Chunk 9: Temporal Validity Pattern
Metadata: pattern=temporalValidity, startDate=today, endDate=4712-12-31, standard=Oracle
Applied To: Account establishment/termination, Site from/to dates, SiteUse dates
Semantic Meaning: Start date = effective date; End date 4712-12-31 = indefinite validity
Purpose: Enables temporal querying and historical record keeping, indicates active status

Chunk 10: Quote-to-Policy Workflow Context
Metadata: workflow=quoteToPolicy, stage=preprocessing, timing=quoteOffering
Workflow Position: Initial step before binding decision
Dependencies: Oracle customer must exist before policy issuance; account number needed for invoices; site configuration required for billing
Event Trigger: InsuranceQuoteOfferedEvent
Purpose: Decouples customer creation from policy issuance for workflow efficiency

Chunk 11: Oracle Integration Points
Metadata: integration=OracleFusion, modules=CustomerMaster, operations=customerCreation
Oracle Modules: Customer Master (HZ_PARTIES, HZ_PARTY_SITES), Accounts Receivable
Data Structures: OracleCustomer, Account, Site, SiteUse matching Oracle REST API
Integration Pattern: Lambda produces Oracle-formatted data; downstream orchestration sends to Oracle OIC
Account Address Set: "CHI_HFA_SET" for HFA customer accounts
Purpose: Ensures compatibility with Oracle Fusion REST APIs

Chunk 12: Data Quality and Defaults
Metadata: dataQuality=defaulting, requiredFields=validated, optionalFields=graceful
Required Fields: First name, Last name, AccountID, iSeriesAccountKey, primary address components
Optional Fields: Middle name, name suffix, address line 2
Default Values: Country="US", AccountSource="HFA", SourceSystem="HFA", CustomerClass="HFA Customer", SiteStatus="A", AccountStatus="A"
Validation: Assumes required fields present, non-null assertion operators
Purpose: Applies business rule defaults while maintaining Oracle customer master integrity

Chunk 13: Search Queries Supported
Metadata: type=queryPatterns, purpose=RAGRetrieval
Sample Queries:

"How are insurance quotes converted to Oracle customers?"
"What Lambda function processes quote offered events?"
"How is the bill-to site configured for new customers?"
"What account identifiers are extracted from quote payloads?"
"How are customer addresses normalized for Oracle?"
"What is the temporal validity pattern for customer accounts?"
"What default values are applied during quote preprocessing?"
"How is the AccountDescription field constructed?"
"What Oracle address set is used for HFA customers?"
"When does customer record creation occur in the quote workflow?"
"What fields are mapped from quote payload to Oracle customer?"
"How are state codes converted for Oracle integration?"
"What is the purpose of the MAILING site name?"
"How long are customer accounts valid after creation?"