403 lines
17 KiB
Plaintext
403 lines
17 KiB
Plaintext
RAG Knowledge Chunks for CMH.HFA.Accounting.AccountsReceivable.CashReceipts
|
|
---
|
|
Title: CashReceiptLambda - Cash Receipt CRUD Operations
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceipts
|
|
• component: CashReceiptLambda
|
|
• type: component
|
|
• domain: Cash Receipts
|
|
• system: Oracle
|
|
Content: Purpose: AWS Lambda for retrieving, creating, and batch posting cash receipts to Oracle AR.
|
|
Processing Logic:
|
|
• GetCashReceipt(): Retrieves receipts with pagination (25 per page), defaults to last 12 months if no date specified
|
|
• GetCashReceiptByReceiptId(): Retrieves receipts by specific ReceiptId
|
|
• Post(): Creates single cash receipt in Oracle
|
|
• BatchPost(): Creates multiple cash receipts in single batch operation
|
|
Key Rules:
|
|
• LookupStartDate must be within past year from today
|
|
• Pagination continues until fewer than 25 results returned
|
|
• Results deduplicated by ReceiptId
|
|
• BatchPost validates ClientBatchRef is not null/empty
|
|
Example Questions:
|
|
• How do I retrieve cash receipts for an account?
|
|
• Which Lambda posts cash receipts to Oracle?
|
|
• How does cash receipt pagination work?
|
|
---
|
|
Title: Cash Receipt Pagination and Lookback Logic
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceipts
|
|
• component: CashReceiptLambda
|
|
• type: workflow
|
|
• domain: Cash Receipts
|
|
• system: Oracle
|
|
Content: Purpose: Paginated retrieval workflow for cash receipts with automatic date range handling.
|
|
Workflow Steps:
|
|
1. Validate LookupStartDate within past year (default: 12 months ago if null)
|
|
2. Retrieve batch of receipts (max 25) from Oracle
|
|
3. If results found, update LookupStartDate to first receipt's ReceiptDate
|
|
4. Add results to collection
|
|
5. Continue if exactly 25 results returned (indicates more available)
|
|
6. Deduplicate final collection by ReceiptId
|
|
Key Rules:
|
|
• maxLookBackDate = DateTime.Today.AddYears(-1)
|
|
• Throws ArgumentException if LookupStartDate < maxLookBackDate
|
|
• Pagination stops when result count < 25
|
|
Example Questions:
|
|
• How does cash receipt pagination work?
|
|
• What is the maximum lookback period for receipts?
|
|
• How are duplicate receipts handled?
|
|
---
|
|
Title: OracleReceipt DTO Structure
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceipts
|
|
• component: OracleReceipt
|
|
• type: concept
|
|
• domain: Cash Receipts
|
|
• system: Oracle
|
|
Content: Purpose: Data structure representing a cash receipt in Oracle AR system.
|
|
Key Properties:
|
|
• ReceiptId (long), ReceiptNumber (string): Identifiers
|
|
• ReceiptDate, AccountingDate (DateTime): Date fields
|
|
• Amount, UnappliedAmount (decimal): Receipt amounts
|
|
• ReceiptState (default: "Unapplied"), ReceiptStatus (default: "Remitted")
|
|
• CustomerAccountNumber (string): Customer identifier
|
|
• Comments, IntercompanyPaymentReference, UnidentifiedFundsClassification, RefundInvoiceNumber (string): Additional info
|
|
Default Values:
|
|
• BusinessUnit: "HFA BU"
|
|
• BusinessGroup: "HFA"
|
|
• ReceiptMethod: "HFA I/C VMF"
|
|
• Currency: "USD"
|
|
Example Questions:
|
|
• What fields define an Oracle cash receipt?
|
|
• What are the default receipt values?
|
|
• How are unapplied amounts tracked?
|
|
---
|
|
Title: MapCashReceipt Lambda - Escrow Event to Receipt Mapping
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceipts
|
|
• component: MapCashReceipt
|
|
• type: component
|
|
• domain: Cash Receipts
|
|
• system: Oracle
|
|
Content: Purpose: AWS Lambda that maps EscrowDisbursementInsuranceEvent to OracleReceipt using AutoMapper.
|
|
Processing Logic:
|
|
• Map(): Uses AutoMapper to transform EscrowDisbursementInsuranceEvent to OracleReceipt
|
|
• MapCustomer(): Extracts CustomerAccountNumber from customer's HFA account
|
|
• Logs event, receipt, and customer data as JSON for troubleshooting
|
|
Key Rules:
|
|
• Filters customer accounts for AccountSource equals "HFA" (case-insensitive)
|
|
• Uses First() to select HFA account (assumes exists)
|
|
• Sets receipt.CustomerAccountNumber from hfaAccount.AccountNumber
|
|
Example Questions:
|
|
• How do I map escrow events to cash receipts?
|
|
• Which Lambda converts insurance events to receipts?
|
|
• How is customer account number extracted?
|
|
---
|
|
Title: EscrowDisbursementInsuranceEvent to OracleReceipt AutoMapper Profile
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceipts
|
|
• component: AutoMapperProfile
|
|
• type: rule
|
|
• domain: Cash Receipts
|
|
• system: Oracle
|
|
Content: Purpose: AutoMapper configuration for mapping EscrowDisbursementInsuranceEvent to OracleReceipt.
|
|
Mapping Rules:
|
|
• Amount ← Payload.Amount
|
|
• ReceiptNumber ← Payload.PolicyNumber
|
|
• ReceiptDate ← Payload.Date
|
|
• AccountingDate ← Payload.Date
|
|
• IntercompanyPaymentReference ← Payload.LoanNumber
|
|
Configuration: Defined in CreateReceiptMappingProfile() within AutoMapperProfile class.
|
|
Example Questions:
|
|
• How are escrow events mapped to receipts?
|
|
• What AutoMapper profile maps insurance events?
|
|
• How is ReceiptNumber derived from events?
|
|
---
|
|
Title: CashReceiptMapDto - Receipt Mapping Input
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceipts
|
|
• component: CashReceiptMapDto
|
|
• type: concept
|
|
• domain: Cash Receipts
|
|
• system: Oracle
|
|
Content: Purpose: Input DTO containing event and customer data for cash receipt mapping.
|
|
Properties:
|
|
• EscrowDisbursementInsuranceEvent: Source event containing disbursement details
|
|
• OracleCustomer: Customer data with accounts for extracting CustomerAccountNumber
|
|
Processing Context:
|
|
• Used by MapCashReceipt.Map() to transform event to OracleReceipt
|
|
• Provides customer account context for mapping
|
|
• Enables customer account number extraction from HFA account
|
|
Example Questions:
|
|
• What input is needed for receipt mapping?
|
|
• How do I pass event and customer data together?
|
|
• What DTO contains receipt mapping context?
|
|
---
|
|
Title: CashReceiptGetDTO - Receipt Query Parameters
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceipts
|
|
• component: CashReceiptGetDTO
|
|
• type: concept
|
|
• domain: Cash Receipts
|
|
• system: Oracle
|
|
Content: Purpose: Query parameters DTO for retrieving cash receipts from Oracle.
|
|
Properties:
|
|
• AccountId (string, nullable): Customer account number filter
|
|
• LookupStartDate (DateOnly, nullable): Start date for receipt lookup
|
|
• ReceiptId (string, nullable): Specific receipt identifier
|
|
Processing Context:
|
|
• Used by CashReceiptLambda.GetCashReceipt() for paginated queries
|
|
• Used by CashReceiptLambda.GetCashReceiptByReceiptId() for single receipt lookup
|
|
• LookupStartDate defaults to 12 months ago if null
|
|
Example Questions:
|
|
• What parameters filter cash receipt queries?
|
|
• How do I query receipts by date range?
|
|
• What DTO specifies receipt lookup criteria?
|
|
---
|
|
Title: EscrowDisbursementInsuranceEventPayload - Insurance Escrow Data
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceipts
|
|
• component: EscrowDisbursementInsuranceEventPayload
|
|
• type: concept
|
|
• domain: Cash Receipts
|
|
• system: Insurance/Escrow
|
|
Content: Purpose: Payload structure for escrow disbursement insurance events.
|
|
Properties:
|
|
• Id (Guid): Event identifier
|
|
• AccountIdentifier: Account type and value
|
|
• Date, EffectiveDate (DateTime): Disbursement dates
|
|
• Amount (decimal): Disbursement amount
|
|
• CompanyNumber, CustomerNumber, LoanNumber (int): Entity identifiers
|
|
• TransferCode (int): Transfer type
|
|
• PolicyNumber (string): Insurance policy identifier
|
|
PII Fields: AccountIdentifier, CustomerNumber, LoanNumber, PolicyNumber marked with PersonallyIdentifiableInformation attribute.
|
|
Example Questions:
|
|
• What data is in escrow disbursement events?
|
|
• How are insurance disbursements structured?
|
|
• What PII is tracked in escrow events?
|
|
---
|
|
Title: EscrowDisbursementInsuranceEvent - Event Message Structure
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceipts
|
|
• component: EscrowDisbursementInsuranceEvent
|
|
• type: concept
|
|
• domain: Cash Receipts
|
|
• system: Event Bus
|
|
Content: Purpose: Event message wrapper for escrow disbursement insurance payloads.
|
|
Structure:
|
|
• Inherits from EventMessage<EscrowDisbursementInsuranceEventPayload>
|
|
• EventType attribute: EventType = "EscrowDisbursement", SubType = "Insurance"
|
|
• Contains strongly-typed Payload of type EscrowDisbursementInsuranceEventPayload
|
|
Usage: Consumed by MapCashReceipt to create cash receipts from escrow disbursements.
|
|
Example Questions:
|
|
• What event triggers cash receipt creation?
|
|
• How are escrow events structured?
|
|
• What event type represents insurance disbursements?
|
|
---
|
|
Title: BatchCashReceipt - Batch Upload Receipt Item
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceipts
|
|
• component: BatchCashReceipt
|
|
• type: concept
|
|
• domain: Cash Receipts
|
|
• system: Oracle
|
|
Content: Purpose: Single cash receipt item structure for batch upload operations.
|
|
Properties:
|
|
• ReceiptNumber, ReceiptMethod, BusinessUnit: Receipt identifiers
|
|
• Amount (decimal), Currency: Monetary values
|
|
• CustomerAccountNumber: Customer identifier
|
|
• ReceiptMatchBy, ReferenceAmount, ReferenceNumber: Matching criteria
|
|
• BusinessGroup, IntercompanyPaymentReference: Business context
|
|
• UnidentifiedFundsClassification, UnidentifiedFundsSourceDocument: Unidentified fund handling
|
|
• RefundInvoiceNumber: Refund reference
|
|
Usage: Collection of these items wrapped in BatchCashReceiptRequest for batch posting.
|
|
Example Questions:
|
|
• What fields define a batch receipt item?
|
|
• How are batch receipts structured?
|
|
• What matching criteria are supported?
|
|
---
|
|
Title: BatchCashReceiptRequest - Batch Receipt Submission
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceipts
|
|
• component: BatchCashReceiptRequest
|
|
• type: concept
|
|
• domain: Cash Receipts
|
|
• system: Oracle
|
|
Content: Purpose: Request structure for submitting multiple cash receipts in a single batch operation.
|
|
Properties:
|
|
• Receipts (IEnumerable<BatchCashReceipt>): Collection of receipt items
|
|
• ClientBatchRef (string): Client-provided unique batch identifier
|
|
Validation Rules:
|
|
• BatchCashReceiptRequest cannot be null
|
|
• Receipts collection cannot be null
|
|
• ClientBatchRef must not be null/whitespace
|
|
• Empty Receipts collection returns immediately without error
|
|
Example Questions:
|
|
• How do I submit batch cash receipts?
|
|
• What validates batch receipt requests?
|
|
• What DTO wraps batch receipt collections?
|
|
---
|
|
Title: CashReceiptOicIntegration - Cash Receipt API Client
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceipts
|
|
• component: CashReceiptOicIntegration
|
|
• type: component
|
|
• domain: Cash Receipts
|
|
• system: Oracle OIC
|
|
Content: Purpose: Oracle Integration Cloud (OIC) client for cash receipt operations.
|
|
Endpoints:
|
|
• CashReceiptPrefixEndpoint: "/ic/api/integration/v1/flows/rest/CHI_RECEIPT_API/1.0/Receipt?"
|
|
• BatchCashReceiptEndpoint: "/ic/api/integration/v2/flows/rest/project/CHI_HFA_OASIS/CHI_HFA_BATCHCAS_API/1.0/CashReceipt/Batch"
|
|
Methods:
|
|
• GetCashReceiptAsync(): GET with AccountId and date filter
|
|
• GetCashReceiptByReceiptIdAsync(): GET by ReceiptId
|
|
• PostCashReceiptAsync(): POST single receipt
|
|
• PostBatchCashReceiptsAsync(): POST batch receipts to v2 endpoint
|
|
Key Rules:
|
|
• Extracts "ARReceipts" array from JSON response
|
|
• Returns empty list if no results
|
|
Example Questions:
|
|
• What are the Oracle cash receipt endpoints?
|
|
• How do I integrate with Oracle receipt API?
|
|
• Which integration handles batch receipts?
|
|
---
|
|
Title: Cash Receipt Query Endpoint Construction
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceipts
|
|
• component: CashReceiptOicIntegration
|
|
• type: rule
|
|
• domain: Cash Receipts
|
|
• system: Oracle OIC
|
|
Content: Purpose: Defines Oracle API endpoint URL construction rules for cash receipt queries.
|
|
Endpoint Patterns:
|
|
• By Account and Date: "{prefix}CustomerAccountNumber={accountId}&q=ReceiptDate>={receiptDate}"
|
|
• By Receipt ID: "{prefix}ReceiptId={receiptId}"
|
|
• Post Receipt: "{prefix}CustomerAccountNumber={customerAccountNumber}&q=ReceiptDate>={receiptDate}"
|
|
Date Format: "yyyy-MM-dd"
|
|
Base Prefix: "/ic/api/integration/v1/flows/rest/CHI_RECEIPT_API/1.0/Receipt?"
|
|
Example Questions:
|
|
• How are receipt query URLs constructed?
|
|
• What date format is used in receipt queries?
|
|
• How do I query receipts by account and date?
|
|
---
|
|
Title: Cash Receipt JSON Response Parsing
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceipts
|
|
• component: CashReceiptOicIntegration
|
|
• type: rule
|
|
• domain: Cash Receipts
|
|
• system: Oracle OIC
|
|
Content: Purpose: Extracts receipt array from Oracle API JSON response wrapper.
|
|
Processing Logic:
|
|
• Parse JSON string to JObject
|
|
• Extract "ARReceipts" property as JArray
|
|
• Convert JArray to string
|
|
• Deserialize to IEnumerable<OracleReceipt>
|
|
• Return empty list if array is null or JSON is empty string
|
|
Method: GetArrayString(string jsonString, string arrayPropValue)
|
|
Key Rule: Empty JSON responses return empty list rather than null.
|
|
Example Questions:
|
|
• How are Oracle receipt responses parsed?
|
|
• What JSON property contains receipts?
|
|
• How are empty responses handled?
|
|
---
|
|
Title: ReceiptStatic Constants - Receipt Configuration Values
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceipts
|
|
• component: ReceiptStatic
|
|
• type: rule
|
|
• domain: Cash Receipts
|
|
• system: Oracle
|
|
Content: Purpose: Centralized constant values for cash receipt processing.
|
|
Constants:
|
|
• ReceiptMethodIcVmf: "HFA I/C VMF" (default receipt method)
|
|
• Unapplied: "Unapplied" (receipt state for unallocated receipts)
|
|
• Remitted: "Remitted" (default receipt status)
|
|
Usage: Referenced throughout receipt processing for consistent value assignment to ReceiptMethod, ReceiptState, and ReceiptStatus fields.
|
|
Example Questions:
|
|
• What is the default receipt method for HFA?
|
|
• What value indicates an unapplied receipt?
|
|
• What are valid receipt status values?
|
|
---
|
|
Title: HFA Account Extraction from Customer
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceipts
|
|
• component: MapCashReceipt
|
|
• type: rule
|
|
• domain: Cash Receipts
|
|
• system: Oracle
|
|
Content: Purpose: Extracts HFA account number from Oracle customer account collection.
|
|
Extraction Logic:
|
|
• Filter customer.Accounts for AccountSource equals "HFA" (case-insensitive, InvariantCultureIgnoreCase)
|
|
• Use First() to select matching account
|
|
• Extract AccountNumber from selected account
|
|
• Assign to receipt.CustomerAccountNumber
|
|
Key Rule: Assumes at least one HFA account exists (First() throws if none found).
|
|
Example Questions:
|
|
• How is customer account number extracted?
|
|
• How do I filter for HFA accounts?
|
|
• What comparison is used for AccountSource matching?
|
|
---
|
|
Title: Cash Receipt Batch Validation Rules
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceipts
|
|
• component: CashReceiptLambda
|
|
• type: rule
|
|
• domain: Cash Receipts
|
|
• system: Oracle
|
|
Content: Purpose: Defines validation rules for batch cash receipt submissions.
|
|
Validation Rules:
|
|
1. BatchCashReceiptRequest cannot be null (throws ArgumentNullException)
|
|
2. Receipts collection cannot be null (throws ArgumentNullException)
|
|
3. ClientBatchRef must not be null/whitespace (throws ArgumentException)
|
|
4. Empty Receipts collection (Any() returns false) results in early return without processing
|
|
Processing: Validation occurs in CashReceiptLambda.BatchPost() before calling integration.
|
|
Example Questions:
|
|
• What validates batch receipt requests?
|
|
• What happens if receipts collection is empty?
|
|
• Is ClientBatchRef required for batch posts?
|
|
---
|
|
Title: Cash Receipt Default Field Values
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceipts
|
|
• component: OracleReceipt
|
|
• type: rule
|
|
• domain: Cash Receipts
|
|
• system: Oracle
|
|
Content: Purpose: Defines standard default values for OracleReceipt properties.
|
|
Default Values:
|
|
• ReceiptState: "Unapplied" (from ReceiptStatic.Unapplied)
|
|
• ReceiptStatus: "Remitted" (from ReceiptStatic.Remitted)
|
|
• BusinessUnit: "HFA BU" (from HfaStatic.HfaBusinessUnit)
|
|
• BusinessGroup: "HFA" (from HfaStatic.HFA)
|
|
• ReceiptMethod: "HFA I/C VMF" (from ReceiptStatic.ReceiptMethodIcVmf)
|
|
• Currency: "USD" (from HfaStatic.USD)
|
|
Usage: Set during OracleReceipt instantiation or mapping operations.
|
|
Example Questions:
|
|
• What are default receipt field values?
|
|
• What currency is used for receipts?
|
|
• What receipt state is default?
|
|
---
|
|
Title: Cash Receipt Event-to-Receipt Mapping Workflow
|
|
Metadata:
|
|
• module: CMH.HFA.Accounting.AccountsReceivable.CashReceipts
|
|
• component: MapCashReceipt
|
|
• type: workflow
|
|
• domain: Cash Receipts
|
|
• system: Oracle
|
|
Content: Purpose: Workflow for transforming EscrowDisbursementInsuranceEvent into OracleReceipt.
|
|
Workflow Steps:
|
|
1. Log incoming EscrowDisbursementInsuranceEvent as JSON
|
|
2. Use AutoMapper to transform event to OracleReceipt (Amount, ReceiptNumber, dates, LoanNumber)
|
|
3. Filter customer.Accounts for AccountSource = "HFA" (case-insensitive)
|
|
4. Extract AccountNumber from HFA account
|
|
5. Set receipt.CustomerAccountNumber to extracted value
|
|
6. Log mapped receipt and customer details as JSON
|
|
7. Return completed OracleReceipt
|
|
Example Questions:
|
|
• How are escrow events converted to receipts?
|
|
• What workflow maps insurance disbursements?
|
|
• How is customer account linked to receipts?
|
|
---
|
|
This completes the RAG knowledge chunks for the CMH.HFA.Accounting.AccountsReceivable.CashReceipts module. Each chunk is atomic, non-overlapping, and optimized for retrieval-augmented generation with precise technical details about cash receipt processing, event mapping, and Oracle integration.
|