Skip to content

feat(oracle-fusion-financials): add Payables Receivables Expenses and GL - #7515

Open
BillLeoutsakosvl346 wants to merge 1 commit into
feat/oracle-fusion-foundationfrom
feat/oracle-fusion-financials
Open

feat(oracle-fusion-financials): add Payables Receivables Expenses and GL#7515
BillLeoutsakosvl346 wants to merge 1 commit into
feat/oracle-fusion-foundationfrom
feat/oracle-fusion-financials

Conversation

@BillLeoutsakosvl346

@BillLeoutsakosvl346 BillLeoutsakosvl346 commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Expand this existing Financials integration in the same stacked PR; base is feat/oracle-fusion-foundation / feat(oracle-fusion): add shared integration foundation #7427.
  • Preserve all 24 read-only Payables tools, their public contracts, paging controls, and invoice selector.
  • Add 84 tools: 46 Receivables, 24 Expenses, and 14 General Ledger, plus eight selectors. Total: 108 tools and nine selectors.
  • Reuse the foundation client, Basic-auth service account, exact-integer serialization, modern self-link validation, estimated-total collection semantics, and cancellation. Reuse NetSuiteIcon directly.
  • No foundation, Procurement, Project Management, auth-enum, selector-type, generator, or general-platform changes. No second Financials implementation, generic REST tool, triggers, connectors, or import framework.

Type of Change

  • Expand an integration

Coverage

Domain Included operations
Payables — 24 retained Existing 12 list/get pairs: invoices, lines, distributions, installments, applied/available prepayments, payments, related invoices, holds, payment process requests, payment terms, and term lines
Receivables — 46 added Invoice list/get/create/update/delete/approve/rework; invoice line and invoice-level distribution list/get/create; installment list/get/update; credit memo list/get/create/update/approve/rework; credit memo line/distribution list/get/create; receipt list/get/create/update/delete/apply; account/site, receipt/credit-memo application, payment-schedule, and adjustment list/get
Expenses — 24 added Report list/get/create/update/submit; line/distribution/itemization list/get/create/update; processing detail/payment/line-error list/get; remove report cash advance
General Ledger — 14 added Ledger list/get; batch list/get/delete; header/line/error/action-log list/get; balance list

Added selectors: Receivables invoices, credit memos, receipts, customer accounts and account sites; expense reports; GL ledgers and journal batches. All use credential-only context, bounded pagination, safe option projection, and detail resolution.

Contracts and exclusions

  • Fixed projections and the list envelope remain { items, count, hasMore, limit, offset, totalResults? }. Default page size 50, maximum 100, default offset 0; no automatic all-page retrieval. Estimated totals do not determine pagination.
  • Preserve opaque keys exactly until URL encoding; derive journal-child and expense keys from validated self links, including framework-v9 context links. Display numbers are not resource keys.
  • Exact numeric body identifiers enter tools as strings and use the foundation serializer without rounding. Amounts remain numeric where documented. GL balances retain documented strings, nulls, #MISSING, and N/A.
  • Typed allowlisted bodies only. Invoice distributions are invoice-level children. Invoice updates permit only documented status, terms, and transaction-date attributes; installment updates permit due date and original amount.
  • Named action results are checked independently of HTTP success. Submission result S succeeds; error-bearing expense submission results are preserved as failures. Cash-advance removal distinguishes Y / N. Successful deletion accepts an empty response.
  • No automatic write retries, credit-memo/expense deletion, arbitrary expense workflow actions, direct journal creation/posting/approval, or bulk-import orchestration.
  • Project-contract invoices and their lifecycle remain Project Management-owned. ReceivablesNumber is not CustomerTransactionId; no automatic duplicate AR creation or ambiguous cross-domain lookup.

Three contract-gated actions are deliberately absent (no placeholder tools):

Excluded action Unresolved Oracle contract
Split Receivables invoice installments String-map schemas conflict with numeric examples and the described response
Apply an expense-report cash advance Numeric result schema conflicts with textual success description
Update GL journal batch Completion/reversal transitions and conflicting ReversalFlag representations remain insufficiently specified

These are Oracle contract gates, not foundation defects. No Oracle tenant was mutated or live-verified.

Official API evidence

Reviewed current 26c endpoint inventories, methods, request/response schemas, selected fields, child hierarchies, query controls, and action results before implementation.

Endpoint-specific contract references

Permissions and setup

  • Use the existing reusable Fusion service account and tenant-side least-privilege grants; no new OAuth capability or deployment environment settings.
  • Oracle documents AR_CREATE_RECEIVABLES_INVOICE_PRIV for invoice GET/POST/PATCH. Do not infer it grants every delete or lifecycle action. See invoice setup.
  • Receipt documentation distinguishes AR_CREATE_RECEIVABLES_RECEIPT_PRIV for POST from AR_MANAGE_RECEIVABLES_RECEIPT_PRIV for GET/DELETE; confirm PATCH/apply authorization separately. See receipt setup.
  • Receivables requires the applicable business-unit, customer, source/type, terms, and accounting setup. Customer-activity resources are not general customer-master CRUD.
  • Expense access to another employee is not implied by access to one's own reports. Creation identities and organization values are explicit, not invented defaults.
  • GL visibility and supported deletion depend on Oracle ledger/data-access-set grants and eligible lifecycle state.

Precedents and scope

Work Existing precedent
List/get declarations Same-path Financials Payables tools
Create/update/delete tools/netsuite/{create_record,update_record,delete_record}.ts; typed nested inputs in tools/sap_s4hana/create_sales_order.ts; normalized deletion in tools/stripe/delete_invoice.ts
Named lifecycle actions tools/stripe/finalize_invoice.ts, tools/sap_concur/submit_expense_report.ts
Block/service account/icon Existing Financials block; blocks/blocks/{netsuite,sap_s4hana,sap_concur}.ts
Product operations/schema/tests lib/internal/sap-s4hana/{operations,schema,execute-tool}.ts and corresponding tests
Selectors lib/selectors/server/providers/netsuite.ts and netsuite.test.ts
Registrations/generated files Existing Financials/NetSuite entries and the existing repository generators

Paths above are relative to apps/sim/. Expansion footprint against the original Financials revision: 84 new action files, 16 modified source files, five generated outputs; no deletes. Existing execute-tool.ts, oauth/types.ts, both selector types files, and original Payables action files remain unchanged.

Testing

Candidate: 20b69c10b6ce499f144979a28bff3d043567e1e5. Foundation: 15294a2b40aaeb176f6ec79599ce790eadd969e9.

GitHub run 34001784692 completed successfully for this exact candidate: Lint and Test (including audits, all workspace type checks and tests), both remaining test shards, and Build App.

No local tests, builds, lint, type checks, or audits were run for this expansion. Only the required repository generators ran locally. Product tests use real foundation protocol/identifier/serialization helpers with network and credential seams mocked.

Coverage includes resource addressing and parent identifiers, restricted write bodies, exact-integer receipt application, opaque expense/journal round trips, business-result failures, no-content deletion, balance missing-value markers, selector pagination/credential binding, and unchanged Payables behavior.

Independent validate-integration review, including validate-selector, memory-load-check, every Financials source/test file, and the complete foundation execution path, converged on this exact candidate with no unresolved substantive Financials findings. The Expense/GL output-metadata argument-order defect was fixed and regenerated; the Receivables nullable-ID concern was closed against Oracle's nonnullable schemas. Greptile review completed on this exact head with 5/5, no actionable new findings, and zero unresolved review threads across all pages. The PR is open and mergeable against its foundation base.

Separately owned findings

  • Foundation PR change requests: None. The previously reported estimated-total defect is fixed in the inherited foundation revision; this expansion uses that correction.
  • Shared credential preparation currently trims clientSecret before minting/persistence (apps/sim/lib/credentials/service-account-secret.ts:304). Fusion's password minter preserves supplied bytes. Oracle's 26c password policy permits spaces. Supporting passwords with meaningful surrounding spaces requires a separate shared-credential correction; no such repair is bundled here.
  • Dependency advisories reported by the existing non-blocking GitHub audit are inherited; no dependencies or lockfiles change.

Checklist

  • Preserved existing Payables tools and selector
  • Added all three expansion phases within the approved tree
  • Added focused product and selector tests
  • Regenerated and inspected affected outputs
  • Independent integration review converged
  • Current-head GitHub validation passed
  • Current-head Greptile 5/5 and all review threads resolved

@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Sep 6, 2026 12:39am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR expands Oracle Fusion Cloud Financials from its existing 24 read-only Payables tools to 108 tools spanning Payables, Receivables, Expenses, and General Ledger, and adds eight new selectors.

  • Adds typed Receivables and Expenses writes, lifecycle actions, and supported deletions.
  • Adds bounded GL ledger, journal, and balance reads plus eligible journal-batch deletion.
  • Preserves exact identifiers, opaque resource keys, cancellation, bounded pagination, and estimated-total semantics.
  • Registers the expanded tool and selector surface across blocks, manifests, documentation, OAuth metadata, deployment configuration, and generated outputs.
  • Adds broad operation, schema, execution, and selector coverage.

Confidence Score: 5/5

The PR appears safe to merge, with no outstanding previous findings or actionable new defects identified.

The estimated-total parser now accepts Oracle’s documented estimate inconsistencies while preserving numeric validation and hasMore-based pagination, and the declaration comments were converted to TSDoc. The expanded operations, schemas, selectors, and registrations are internally consistent and covered by focused tests.

Important Files Changed

Filename Overview
apps/sim/lib/internal/oracle-fusion-financials/operations.ts Defines and routes the expanded Receivables, Expenses, and GL operations with bounded collection handling, typed writes, opaque-key validation, and action-result checks.
apps/sim/lib/internal/oracle-fusion-financials/schema.ts Adds request and response schemas that preserve nullable Oracle values and exact decimal identifiers without unsafe numeric coercion.
apps/sim/tools/oracle_fusion_financials/shared.ts Provides shared inputs and output metadata for the expanded Financials tool family.
apps/sim/lib/selectors/server/providers/oracle-fusion-financials.ts Adds eight credential-bound, bounded selectors with resource-specific IDs and detail resolution.
apps/sim/lib/internal/oracle-fusion/protocol.ts Correctly changes collection totals to estimated metadata while retaining structural and numeric validation.
apps/sim/blocks/blocks/oracle_fusion_financials.ts Exposes the complete 108-tool Financials integration through the block definition.
apps/sim/tools/registry.ts Registers the expanded Oracle Fusion Financials tool set in the application tool registry.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  W[Workflow tool or selector] --> R[Financials registrations]
  R --> E[Oracle Fusion Financials executor]
  E --> O[Typed operation definitions]
  O --> C[Shared Oracle Fusion client]
  C --> A[Oracle Fusion REST API]

  O --> P[Payables: 24 read-only tools]
  O --> AR[Receivables: 46 tools]
  O --> X[Expenses: 24 tools]
  O --> GL[General Ledger: 14 tools]

  S[Eight new selectors] --> E
  C --> V[Schema validation and projection]
  V --> W
Loading

Reviews (3): Last reviewed commit: "feat(oracle-fusion-financials): add Paya..." | Re-trigger Greptile

Comment thread apps/sim/lib/internal/oracle-fusion-financials/operations.ts
Comment thread apps/sim/lib/internal/oracle-fusion-financials/schema.ts Outdated
@BillLeoutsakosvl346
BillLeoutsakosvl346 force-pushed the feat/oracle-fusion-financials branch from 9cab3b1 to 9ba59cc Compare September 5, 2026 05:18
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile

@BillLeoutsakosvl346
BillLeoutsakosvl346 force-pushed the feat/oracle-fusion-financials branch from 00bb6df to 20b69c1 Compare September 6, 2026 00:37
@BillLeoutsakosvl346 BillLeoutsakosvl346 changed the title feat(oracle-fusion-financials): add read-only Payables integration feat(oracle-fusion-financials): add Payables Receivables Expenses and GL Sep 6, 2026
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile Please review the current head 20b69c1 against the foundation base. The same Financials integration now preserves 24 Payables tools and adds 84 Receivables, Expenses, and GL tools plus eight selectors. Current-head GitHub CI is green and independent integration review has converged; the PR description documents contracts, gated exclusions, and scope boundaries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant