Title: CreditMemoApplication Lambda - Get Method Metadata: • module: CreditMemoApplications • component: CreditMemoApplication • type: component • domain: Accounts Receivable • system: Oracle AR Content: Purpose: Retrieves credit memo applications from Oracle AR based on search criteria. Processing Logic: • Accepts GetCreditMemoApplicationDto with search parameters • Delegates to ICreditMemoApplicationOicIntegration.GetCreditMemoApplicationAsync • Returns List • Lambda configuration: 256MB memory, 30s timeout Example Questions: • How do I retrieve credit memo applications by credit memo number? • What Lambda method gets credit memo applications from Oracle? • What are the input parameters for retrieving credit memo applications? --- Title: CreditMemoApplication Lambda - Post Method Metadata: • module: CreditMemoApplications • component: CreditMemoApplication • type: component • domain: Accounts Receivable • system: Oracle AR Content: Purpose: Posts a single credit memo application to Oracle AR system. Processing Logic: • Accepts OracleCreditMemoApplication DTO • Delegates to ICreditMemoApplicationOicIntegration.PostCreditMemoApplicationAsync • Returns posted OracleCreditMemoApplication with Oracle-assigned values • Lambda configuration: 256MB memory, 30s timeout Example Questions: • How do I create a credit memo application in Oracle? • What Lambda method posts credit memo applications? • What is the return value when posting a credit memo application? --- Title: CreditMemoApplication Lambda - Pre Method (Preprocessing) Metadata: • module: CreditMemoApplications • component: CreditMemoApplication • type: component • domain: Accounts Receivable • system: Oracle AR Content: Purpose: Preprocesses credit memo applications by matching unapplied credit memos to open installments. Processing Logic: • Accepts PreProcessCreditMemoApplicationsDto with CreditMemos and Installments collections • Filters credit memos where UnappliedBalanceDecimal < 0 • Filters installments where InstallmentBalanceDue > 0, sorts by InstallmentSequence • Routes to ApplyEndorsementEvenly for "HFA CM Endorse Int" or "HFA CM Endorse Ext" transaction types • Routes to ApplySequentially for all other transaction types • Returns IEnumerable • Lambda configuration: 256MB memory, 30s timeout Example Questions: • How are credit memos matched to installments automatically? • What Lambda method generates credit memo application recommendations? • How does preprocessing determine which application algorithm to use? --- Title: Credit Memo Application - Sequential Allocation Algorithm Metadata: • module: CreditMemoApplications • component: CreditMemoApplication • type: workflow • domain: Accounts Receivable • system: Oracle AR Content: Purpose: Applies credit memo balance to installments sequentially (oldest first) using greedy algorithm. Processing Logic: 1. Iterates through sorted installments (by InstallmentSequence ascending) 2. For each installment with InstallmentBalanceDue > 0 and creditMemo.UnappliedBalanceDecimal < 0: • Calculates unappliedCreditMemoBalance = UnappliedBalanceDecimal * -1 • Calculates amountApplied = Math.Min(unappliedCreditMemoBalance, InstallmentBalanceDue) • Creates OracleCreditMemoApplication with amountApplied • Updates creditMemo.UnappliedBalance (adds amountApplied) • Reduces installment.InstallmentBalanceDue by amountApplied 3. Breaks when creditMemo.UnappliedBalanceDecimal == 0 Example Questions: • How does the sequential credit memo allocation algorithm work? • How are credit memo balances applied to installments in order? • What is the greedy algorithm for credit memo applications? --- Title: Credit Memo Application - Endorsement Even Distribution Algorithm Metadata: • module: CreditMemoApplications • component: CreditMemoApplication • type: workflow • domain: Accounts Receivable • system: Oracle AR Content: Purpose: Distributes endorsement credit memo balance evenly across all open installments. Processing Logic: 1. Calculates remainingToDistribute = Math.Abs(UnappliedBalanceDecimal) 2. Filters active installments where InstallmentBalanceDue > 0 3. Calculates equalShare = Math.Round(remainingToDistribute / installmentCount, 2, AwayFromZero) 4. If equalShare <= 0, sets to Math.Min(remainingToDistribute, 0.01m) 5. For each installment: allocates Math.Min(equalShare, InstallmentBalanceDue) 6. Updates credit memo and installment balances after each allocation 7. Adds any remaining balance to first installment (InstallmentNumber == "1") Key Rules: • Minimum allocation: 0.01m (one cent) • Remainder goes to installment 1 Example Questions: • How are endorsement credit memos distributed across installments? • What transaction types trigger even distribution of credit memos? • How is rounding handled for endorsement credit memo applications? --- Title: Credit Memo Application - Unapplied Credit Memo Filtering Rule Metadata: • module: CreditMemoApplications • component: CreditMemoApplication • type: rule • domain: Accounts Receivable • system: Oracle AR Content: Purpose: Filters credit memos eligible for automatic application. Processing Logic: • Filters credit memos where UnappliedBalanceDecimal < 0 (negative indicates available credit) • Returns empty collection if no unapplied credit memos or no installments available • Negative UnappliedBalanceDecimal values represent credit available to apply Key Rules: • UnappliedBalanceDecimal < 0 indicates available credit • Both credit memos and installments must exist for processing Example Questions: • How do I identify credit memos available for application? • What does a negative UnappliedBalanceDecimal mean? • What filtering rules determine eligible credit memos? --- Title: Credit Memo Application - Endorsement Transaction Type Rule Metadata: • module: CreditMemoApplications • component: CreditMemoApplication • type: rule • domain: Accounts Receivable • system: Oracle AR Content: Purpose: Determines credit memo application algorithm based on transaction type. Processing Logic: • If TransactionType is "HFA CM Endorse Int" OR "HFA CM Endorse Ext": use ApplyEndorsementEvenly • All other transaction types: use ApplySequentially Key Rules: • Endorsement internal and external credit memos distribute evenly • Standard credit memos apply sequentially • Constants: HfaCmEndorseInt = "HFA CM Endorse Int", HfaCmEndorseExt = "HFA CM Endorse Ext" Example Questions: • How does the system determine credit memo application strategy? • What transaction types trigger even distribution? • How are endorsement credit memos handled differently? --- Title: OracleCreditMemoApplication DTO Metadata: • module: CreditMemoApplications • component: OracleCreditMemoApplication • type: concept • domain: Accounts Receivable • system: Oracle AR Content: Purpose: Data transfer object representing credit memo applications in Oracle AR. Processing Logic: • Core properties: ActionType, ApplicationId, ApplicationDate, ApplicationAmount, ApplicationStatus, AccountingDate • Relationship properties: CreditMemoId, CreditMemoNumber, InvoiceId, InvoiceNumber, InstallmentId, InstallmentNumber • Metadata properties: BusinessUnit, TransactionType, CreditMemoStatus, ReferenceTransactionStatus, CustomerSiteNumber, Comments, IsLatestApplication • Computed property: AppAmount (decimal parsed from ApplicationAmount string) Example Questions: • What properties define a credit memo application? • How is the application amount stored in Oracle integration? • What identifiers link a credit memo application to invoices and installments? --- Title: PreProcessCreditMemoApplicationsDto Metadata: • module: CreditMemoApplications • component: PreProcessCreditMemoApplicationsDto • type: concept • domain: Accounts Receivable • system: Oracle AR Content: Purpose: Input DTO for credit memo application preprocessing Lambda method. Processing Logic: • CreditMemos: IEnumerable collection of credit memos to apply • Installments: IEnumerable collection of target installments • InvoiceId: string identifier for the invoice being applied to • Used as input to Pre() method for automatic credit memo application generation Example Questions: • What input does the credit memo preprocessing method require? • How do I specify credit memos and installments for automatic matching? • What is the structure of the preprocessing request DTO? --- Title: GetCreditMemoApplicationDto Metadata: • module: CreditMemoApplications • component: GetCreditMemoApplicationDto • type: concept • domain: Accounts Receivable • system: Oracle AR Content: Purpose: Query parameters DTO for retrieving credit memo applications. Processing Logic: • ApplicationId: filters by unique application identifier • CustAccountId: filters by customer account identifier • CreditMemoNumber: filters by credit memo number • InvoiceNumber: filters by invoice number • HasSearchCriteriaAvailable: computed property returns true if any parameter is non-empty • At least one parameter required for valid query Example Questions: • What search criteria can I use to find credit memo applications? • How do I query credit memo applications by customer account? • What validation ensures search criteria are provided? --- Title: CreditMemoApplicationOicIntegration - POST Method Metadata: • module: CreditMemoApplications • component: CreditMemoApplicationOicIntegration • type: component • domain: Accounts Receivable • system: Oracle OIC Content: Purpose: Posts credit memo application to Oracle Integration Cloud. Processing Logic: • Endpoint: "/ic/api/integration/v1/flows/rest/CHI_CREDTIMEMO_API/1.0/CreditMemoApplication" • Serializes OracleCreditMemoApplication to JSON using Newtonsoft.Json • Sets Content-Type header to "application/json" • Posts via Flurl PostStringAsync • Deserializes response to OracleCreditMemoApplication • Returns created application with Oracle-assigned values Example Questions: • What Oracle OIC endpoint is used for posting credit memo applications? • How are credit memo applications serialized for Oracle integration? • What is the return value from the Oracle credit memo application API? --- Title: CreditMemoApplicationOicIntegration - GET Method Metadata: • module: CreditMemoApplications • component: CreditMemoApplicationOicIntegration • type: component • domain: Accounts Receivable • system: Oracle OIC Content: Purpose: Retrieves credit memo applications from Oracle Integration Cloud with query filters. Processing Logic: • Validates GetCreditMemoApplicationDto.HasSearchCriteriaAvailable, throws ArgumentException if false • Endpoint: "/ic/api/integration/v1/flows/rest/CHI_CREDTIMEMO_API/1.0/CreditMemoApplication" • Appends query parameters via SetQueryParam for: ApplicationId, CustAccountId, CreditMemoNumber, InvoiceNumber • Parses JSON response, checks for "CreditMemoApplications" wrapper property • If wrapper exists, extracts array from jsonObject["CreditMemoApplications"] • Returns List • Throws exception with FlurlHttpException details on error Example Questions: • How do I retrieve credit memo applications by invoice number? • What validation is performed on credit memo application search criteria? • How does the API handle JSON response parsing for credit memo applications? --- Title: Credit Memo Application - Standard Field Values Metadata: • module: CreditMemoApplications • component: CreditMemoApplication • type: rule • domain: Accounts Receivable • system: Oracle AR Content: Purpose: Defines default values for credit memo application fields. Processing Logic: • ActionType: "Apply" • ApplicationDate: DateOnly.FromDateTime(DateTime.Today) • BusinessUnit: "HFA BU" • ApplicationAmount: decimal amount converted to string • InvoiceId, InstallmentId, CreditMemoId: from input parameters • InstallmentNumber: InstallmentSequence converted to string Key Rules: • ApplicationDate always set to today's date • ActionType always "Apply" for automatic applications • BusinessUnit always "HFA BU" Example Questions: • What are the default values for credit memo application fields? • What ActionType is used for automatic credit memo applications? • How is the application date determined for credit memo applications?