Major

Automate Ramp-to-NetSuite Expense Coding with AI Review

Turn uncoded Ramp transactions into reviewable NetSuite-ready expense coding. See how a controller-led workflow can use AI for judgment while keeping posting decisions auditable.

Ritvij GautamUpdated
Finance team reviewing an expense spreadsheet at a desk for Ramp to NetSuite coding review

TL;DR: what you'll build. The native Ramp NetSuite integration moves card transactions into the ledger, but it does not decide how to code an ambiguous or uncoded transaction. The controller or accounting manager makes that call during month-end close. This guide builds a governed review queue on Major: an agent proposes the GL account and class, a deterministic app enforces the rules, and a person approves anything uncertain before the existing sync carries it into NetSuite.

Why expense coding still needs a person

Ramp already syncs card transactions and accounting data into NetSuite. It does not decide which GL account and class an uncoded transaction belongs to, which gets hard when the merchant name is ambiguous or a cost center split isn't obvious.

Today the controller or accounting manager opens Ramp, scans uncoded transactions one by one, guesses or asks the requester, and keys in the coding before the sync can carry it forward.

On a team closing books on a five-day calendar, that queue backs up fastest in the final 48 hours.

Where AI fits, and where it doesn't

This is a workflow automation problem for AI agents for finance, and specifically for AI agents for accounting teams. Nothing reviews the judgment calls before they land in the ledger.

Major does not replace the sync. It adds that review, with rules that must never be skipped enforced by a deterministic app.

What breaks in the current Ramp NetSuite integration workflow

Ramp's NetSuite integration is a vetted "Built for NetSuite" partner connection. Ramp's own NetSuite overview documents bi-directional syncing of accounting fields, transactions, reimbursements, payments, purchase orders, vendor bills and credits.

It also documents multi-entity support across NetSuite subsidiaries. That part works as advertised.

The gap sits upstream of the sync

A transaction with no accounting coding selected, or a coding that looks wrong given the merchant and memo, doesn't resolve itself.

Someone has to recognize the pattern and make the call: a recurring SaaS vendor, a travel expense that should split across two departments, or a one-off purchase that needs a different account than usual.

That is exactly the kind of judgment Major's agent layer is built for. It is also exactly the kind of decision that should never be made silently by a model with no review path.

The systems involved

Ramp

Ramp's Developer API v1 authenticates with OAuth 2.0 client credentials. Your app logs in as itself, using an ID and secret, rather than on behalf of a specific user.

The setup works like this:

  • Create an app in the Ramp Developer Portal.
  • Request a token from /developer/v1/token with a base64-encoded clientid:clientsecret pair.
  • Scope it to what you need, such as transactions:read, accounting:write and so on.

Tokens expire after 10 days, and client-credentials grants do not return a refresh token, so the workflow re-requests a token on expiry.

Ramp separates sandbox from production:

  • Sandbox → https://demo-api.ramp.com
  • Production → https://api.ramp.com

The Ramp objects you'll use

The relevant objects are transactions; accounting, which covers accounts, entities, fields and options, tax codes, vendors and sync status; and the accounting codings endpoint.

That last one is the gotcha. POST /developer/v1/accounting/codings is documented as beta, and today it only supports object_type: "TRANSACTION".

The request body takes two things:

  • The object_id, which is the transaction UUID.
  • One or more accounting coding selections. Each selection is an accounting field ID and an accounting field option ID, pulled from the business's own custom field setup in Ramp.

Ramp's docs don't publish a rate limit for this endpoint, so plan for conservative polling and backoff.

Ramp supports webhooks, messages Ramp pushes to you when something happens, for transaction, card and bill events, per its developer guides. They become a candidate trigger once a specific "transaction coded or ready to sync" event is confirmed for your tenant.

NetSuite

Oracle's SuiteTalk REST Web Services exposes standard and custom records, including the journal entry record. It supports CRUD operations, sublists, a metadata catalog and SuiteQL for querying.

Auth is OAuth 2.0 or token-based authentication (TBA), configured per the REST Web Services setup guide.

NetSuite doesn't natively document webhooks; event-driven integration runs through SuiteScript or Workflow Action scripts instead. Public rate limits aren't documented either, and concurrency depends on account tier.

Why this build doesn't write journal entries

This build does not post directly to the journal entry record. Ramp's configured sync already owns that path for card transactions, and a second entry risks a duplicate.

Direct NetSuite writes stay optional and tenant-validated, reserved for cases the native sync doesn't cover.

Regulatory context

Finance teams closing books under Sarbanes-Oxley Section 404 need documented internal controls over financial reporting:

  • An audit trail of who changed what coding and when.
  • Segregation of duties between whoever proposes a coding and whoever approves it.
  • Evidence retention for the external auditor.

SOX 404 doesn't mandate a specific tool. It does mean the queue must keep a durable record of every suggestion, approval and override, held in a database-backed app rather than a chat transcript that disappears.

Split the build: app, agent, workflow

Keeping three explicit layers keeps the AI out of the general ledger when it shouldn't be there.

The workflow

The workflow is deterministic and scheduled, meaning it gives the same result every time for the same input. It does four things:

  • Polls Ramp for transactions eligible for coding: uncoded, or coded with a flag indicating low confidence.
  • Pulls the transaction and its accounting context.
  • Runs validation: a duplicate check, an active account and class check, and an open-period check.
  • Routes the result either toward auto-queueing for sync or toward a controller approval step.

None of this requires a model.

The agent

The agent only runs when a transaction clears validation and still needs a coding decision. It works from the merchant, memo, amount, department and the business's approved chart-of-accounts mapping.

It proposes an account and class, states its confidence, writes a short rationale and hands its suggestion back to the app.

The app

The app is the controller's workspace and the system of record for this process. It holds the transaction queue, the mapping reference tables, the audit history of every suggestion and decision, and the controller's UI, which makes the process inspectable after the fact.

The flow end to end

  1. Ingest the eligible transaction.
  2. Enrich it with merchant and mapping context.
  3. Have the agent recommend a coding.
  4. Apply deterministic confidence and policy thresholds, and route to the controller when thresholds aren't met.
  5. Only then write the approved coding back to Ramp so the existing sync carries it into NetSuite.

Each of those five steps has its own failure and duplicate-handling gate, covered below.

Why the state lives in an app

The transaction history, mapping decisions and approval trail must persist across close cycles, the same reasoning behind durable state for AI agents.

A comparable pattern shows up in a governed finance data workflow and in NetSuite integration for manufacturing handoffs, where the same split keeps a system of record intact while a model handles only the judgment calls.

Build the Ramp NetSuite integration coding workflow on Major

  1. Connect Ramp as a custom API connector, since Ramp has no prebuilt Major connector today: use the sandbox base URL for a sandbox app during build-out and the production base URL later, and store the client ID and secret in Major's credential proxy, scoped to transactions:read and accounting:write only, while Major's platform handles token refresh given the 10-day expiry. You should see the Ramp connector authenticate against the sandbox and return transaction data with only those two scopes.
  2. Connect NetSuite as a second custom API connector with OAuth 2.0 or TBA per Oracle's SuiteTalk setup guide, scoped read-only for checking account and class validity and sync status unless a validated direct-write case is confirmed for your tenant. You should see the NetSuite connector return account and class records with no permission to create journal entries.
  3. Build three tables: a coding queue (transaction ID, Ramp object reference, entity or subsidiary, merchant, memo, amount, proposed account, proposed class, confidence score, rationale text, status of pending, auto-queued, needs review, approved, synced or rejected, approver, sync reference and timestamps), a mappings table of approved account and class combinations by department and vendor pattern that the agent reads instead of guessing cold, and an audit log recording every state transition. You should see all three tables in the managed database, with status limited to the six allowed values.
  4. Build the app from the app prompt below, so controllers can approve, edit or reject proposed codings with every action logged and a filtered exceptions view. You should see a Ramp Coding Review app showing queue rows with merchant, memo, amount, proposed coding, confidence and rationale.
  5. Add the agent from the agent prompt below, giving it the transaction fields and the approved mapping table. You should see a proposed account and class, a confidence score and a rationale for each test transaction, and a clear "no confident match" for ambiguous ones.
  6. Set the trigger as a configurable hourly or daily poll against Ramp for uncoded or sync-pending transactions, since a native webhook for this exact "ready to code" condition isn't confirmed as generally available; use verified transaction-event webhooks instead if your tenant exposes them. You should see eligible transactions appear in the coding queue after each poll, with already-synced ones skipped.
  7. Route anything below your confidence threshold, touching a new vendor, or affecting a closed or soon-to-close period to the controller queue, with an optional Slack alert if Slack is already connected; nothing posts until approval. You should see low-confidence and new-vendor rows land in "needs review" instead of "auto-queued."
  8. Write back approved codings: after confirming the request shape against current Ramp docs given its beta status, the workflow calls the accounting codings endpoint with the transaction's object ID, the transaction object type and the chosen accounting field ID and field option ID pairs, then Ramp's existing NetSuite sync carries it forward while the app records the sync reference and marks the row complete. You should see the coding on the transaction in Ramp, the row marked "synced" with a sync reference, and the transaction arrive in NetSuite through the native sync.
  9. Test in the sandbox with the edge cases below: a duplicate transaction ID, an inactive account or class, a closed-period date, an ambiguous memo, a new vendor and a cross-subsidiary or cross-currency transaction. You should see each case skip, block or route to review as designed, with an audit log entry and nothing pushed through without approval.
  10. Turn on SSO and role-based access so only finance roles see the coding queue and only authorized approvers can approve, then switch the Ramp connector to the production base URL. You should see non-finance users blocked, approval buttons visible only to approvers, and live transactions flowing into the queue.

App prompt:

Build a controller-facing app called Ramp Coding Review. It shows a queue of uncoded or low-confidence Ramp transactions with merchant, memo, amount, proposed account and class, confidence, and rationale. Controllers can approve, edit, or reject a proposed coding. Every action writes to an audit log with user, timestamp, and prior/new value. Add a filtered view for transactions flagged as exceptions (duplicate ID, inactive account, closed period).

Agent prompt:

Given a Ramp transaction's merchant, memo, amount, department, and our approved account/class mapping table, propose the most likely GL account and class. Return a confidence score from 0 to 1 and a one-sentence rationale referencing what in the transaction drove the suggestion. If no mapping pattern matches with reasonable confidence, say so explicitly rather than guessing.

Why write back to Ramp instead of NetSuite

Ramp's sync is the only door into the ledger for card transactions. You hand the approved coding to the doorkeeper rather than climbing in a window, which is how duplicates happen.

You can start building this on Major directly from the app builder and wire the connectors as you go.

Governance and IT control

Access and audit

Every proposal, edit, approval and rejection writes to the audit log automatically. That log is the kind of evidence a SOX 404 review or an external auditor will ask for.

Credentials, data and releases

Credentials for both Ramp and NetSuite live in Major's credential proxy, scoped to the minimum actions each integration needs and never embedded in agent prompts or application code.

The managed database holding the queue and mapping tables is backed up and versioned like any other Major-deployed app. Changes to the app or agent deploy through the same versioned release path as the rest of the platform.

A separate gate for direct NetSuite writes

Direct NetSuite writes, if ever enabled, need their own explicit approval gate, separate from the Ramp coding approval, since they touch the ledger through a different path than the native sync.

Failure handling and edge cases

  • Duplicate transaction IDs. If a transaction already has a sync reference or an existing coding, the workflow skips it rather than re-coding, and logs the skip.
  • Inactive or missing accounts or classes. If the agent's suggestion or the controller's selection references an account or class that's inactive in NetSuite, the app blocks the write and flags the row as an exception.
  • Closed accounting periods. A transaction dated into a closed period routes to the controller with a period-closed flag and never auto-queues for sync, regardless of confidence.
  • Ambiguous memos and new vendors. When the agent can't match a mapping pattern with reasonable confidence, it says so, and the transaction routes to review by default.
  • Multi-entity and currency mismatches. Cross-subsidiary or cross-currency transactions route to review. Don't let the agent infer an entity assignment it wasn't given evidence for.
  • API errors and rate limits. The workflow should back off on repeated errors rather than retry aggressively, and alert if a poll cycle fails outright rather than silently skipping it.

What the agent must never do

  • It never writes directly to Ramp or NetSuite.
  • It never auto-approves its own suggestion.
  • It never posts to a closed period.

Every one of those actions requires the deterministic validation layer or a person.

The fallback is always the same

When any case trips, queue the transaction for the controller with enough context to resolve it in one look, rather than stalling silently or pushing a bad entry through.

What to measure

  • Exception rate: the share of transactions routed to controller review versus auto-queued for sync.
  • Queue aging: how long a transaction sits uncoded, especially in the days before close.
  • Recode or reversal rate: how often an approved coding gets corrected, which shows whether the mapping table needs updating.
  • Sync failures: transactions that fail to sync from Ramp to NetSuite after coding, which may point to a connector or permissions issue.
  • Manual touches per transaction: how often a person interacts with a transaction before it resolves, a proxy for how much the mapping table and agent context reduce rework.

Treat the first few close cycles on your own data as the baseline, not a result to publish.

Before you go live

  • [ ] Confirm the accounting codings endpoint's request shape against current Ramp docs, since it is still beta and only supports transactions.
  • [ ] Verify Ramp credentials sit in Major's credential proxy with only the transactions read and accounting write scopes, and that token re-requests work after the 10-day expiry.
  • [ ] Confirm the NetSuite connector is read-only unless a validated direct-write case has its own approval gate.
  • [ ] Load the mappings table with approved account and class combinations by department and vendor pattern.
  • [ ] Set your confidence threshold and check that new vendors, closed periods and cross-subsidiary or cross-currency transactions route to review.
  • [ ] Run the duplicate, inactive account and closed-period cases in the sandbox and check each one writes to the audit log.
  • [ ] Restrict the app with SSO and role-based access so only authorized approvers can approve.
  • [ ] Turn on alerts for failed poll cycles so a missed run never goes unnoticed during close.

Start building on Major

Build a Ramp coding-review app that holds transaction state, routes uncertain expense mappings to a controller, and tracks the approved sync into NetSuite.

Related articles

About the author

Ritvij Gautam is Head of Growth at Major.

Last reviewed November 7, 2026 by Ritvij Gautam.

Frequently asked questions

How does Ramp integrate with NetSuite?
Ramp's native NetSuite integration is a vetted Built for NetSuite partner connection that bi-directionally syncs accounting fields, transactions, reimbursements, payments, purchase orders, vendor bills, and credits across NetSuite subsidiaries. A Major-built AI review layer sits upstream of that sync, proposing and routing coding decisions for uncoded transactions before they're ready to sync, without replacing Ramp's configured integration.
Can AI automatically code Ramp expenses for NetSuite?
An AI agent can recommend a GL account and class from a transaction's merchant, memo, amount, and an approved mapping table, along with a confidence score and rationale. It should not post that coding on its own. High-confidence matches can auto-queue for sync; anything uncertain, touching a new vendor, or affecting a closed period should route to a controller for approval first.
What Ramp API data is relevant to expense coding?
The relevant objects are Transactions and Accounting (accounts, entities, fields and options, tax codes, vendors, sync status). The `POST /developer/v1/accounting/codings` endpoint writes coding selections back to Ramp, but it's documented as beta and today only supports `object_type: "TRANSACTION"`. Verify current Ramp docs before relying on it in production.
How should a Ramp-to-NetSuite workflow handle uncertain expense codes?
Keep a durable exception queue in an app rather than a one-off chat session. When an agent's confidence falls below a threshold, or the transaction touches a new vendor, a closed period, or multiple entities, route it to a controller with the transaction's rationale attached. Nothing should post to Ramp or sync to NetSuite until that approval happens.
Does Ramp's NetSuite integration sync to journal entries?
Ramp's native sync handles card transactions, reimbursements, bills, and related records through its configured accounting treatment, not through a direct write to NetSuite's `journalEntry` record type for standard card transactions. Confirm your own NetSuite accounting setup before assuming any specific record type is the correct target, and avoid creating a duplicate entry alongside Ramp's sync.