Automate Brex Spend Exceptions in NetSuite with AI
Connect Brex and NetSuite around a finance workflow that catches out-of-policy card spend early, explains the exception, and routes a controlled review before it becomes a month-end surprise.

TL;DR: what you'll build. A Brex-NetSuite integration already syncs card expenses into your books. What it does not give you is a place to catch a policy-violating transaction before it posts, explain why it broke policy, and route it to a controller for a decision.
This article shows a controller or corporate-card administrator how to build that missing piece on Major: an exception tracker app, a spend-policy agent, and a workflow that watches Brex transactions and only touches NetSuite's journalentry record after a human approves it.
The finance problem: policy exceptions arrive after the transaction
A controller or corporate card administrator at a mid-market company runs Brex for card spend and NetSuite for the books. Brex already supports a native accounting integration that exports transactions and maps them to NetSuite accounting records, documented in Brex's NetSuite integration setup guide and NetSuite integration product page. That sync should stay exactly as it is.
The gap is earlier in the process. A transaction that breaks a spend policy, say a software subscription that blows through a team's monthly budget, still gets exported and coded like any other transaction.
Nobody looks at it closely until month-end close, when the controller is already under time pressure to close the books. By then the transaction has usually already posted, and fixing it means a correcting entry instead of a clean review.
This is a finance process, so it rolls up to Major's AI agents for finance hub and sits next to the auditable accounting workflows hub for close controls. It is cross-industry: any company issuing Brex cards and closing its books in NetSuite runs into this.
The fix is not a smarter sync. It is a durable queue that watches for the policy break, keeps the evidence, and makes the controller's decision a recorded, auditable step instead of a scramble at close. That is the boundary this article holds to throughout: Major adds the exception workflow, not a replacement accounting sync.
This pattern shows up across finance tool pairs. The same app-agent-workflow split appears in how Major handles expense coding into NetSuite from Ramp, and in order-to-cash sync in NetSuite from Shopify, each with its own exception queue in place of a blind sync.
Systems involved in a Brex-NetSuite exception workflow
Two systems carry the data this workflow needs. Both already exist in most finance stacks; the question is how to read from them safely and how often.
Brex: transactions and budgets
Brex's developer API is a REST API using the OpenAPI specification, authenticated with a bearer user token created in the Brex dashboard under Settings > Developer, per the quickstart guide. The token is scoped to specific read or write permissions when it's created, so a read-only exception workflow only needs read scopes on the relevant resources.
The Transactions API exposes card and cash transaction endpoints, including GET /v2/transactions/card/primary for the primary card account and GET /v2/transactions/cash/{id} for cash accounts, plus matching account endpoints under GET /v2/accounts/card and GET /v2/accounts/cash.
The Budgets API exposes GET /v2/budgets and GET /v2/budgets/{id} for budget objects, and GET /v2/spend_limits and GET /v2/spend_limits/{id} for the limit objects a budget enforces. These are the two object groups a policy check needs: the transaction amount and category, and the budget's configured limit.
Brex's Webhooks API supports webhook subscriptions (POST /v1/webhooks) and documents specific event types such as accountingRecordReadyForExport, expensePaymentUpdated, and transferProcessed. A dedicated "new transaction posted" event is not among the documented webhook events as of this writing, so a short-interval poll against the Transactions endpoints, with an overlap lookback window, is the more defensible trigger until a matching event is confirmed for your account.
The honest gotcha: Brex's rate limits guide documents up to 1,000 requests per 60 seconds per Client ID and Brex account, plus separate caps on transfers, wires, and card creation. That is generous for a polling job, but it means a workflow should still back off on a 429 rather than retry immediately.
NetSuite: the journalentry record
NetSuite's SuiteTalk REST Web Services expose standard and custom records over REST, with CRUD operations, record metadata, record filtering, and SuiteQL query support. Authentication uses OAuth 2.0 or token-based authentication (TBA), configured per the setup guide linked from the REST Web Services documentation.
The record this workflow writes to is the Journal Entry record, record ID journalentry. It is not a subrecord itself, but it carries subrecords: journalentryline for the individual debit and credit lines, and accountingbookdetail for accounts with Multi-Book Accounting enabled.
The documented limitation worth knowing: tax-related fields are not supported when creating a journal entry through REST, and read-only sublists like system notes and GL impact are not available through the REST record. NetSuite does not natively document webhooks for outbound events; a RESTlet or a SuiteScript Workflow Action script is the documented way to get event-driven behavior out of NetSuite itself, which is one more reason the trigger side of this workflow sits on the Brex side, not the NetSuite side.
Regulatory note for public companies
If your company is public, Sarbanes-Oxley Section 404 requires management to assess internal controls over financial reporting. A card-spend exception process that touches journal entries needs an audit trail of who flagged the exception, who approved it, and when the entry was created, plus segregation of duties between the person who can approve an exception and the person (or agent) that drafted it. This is a scoped consideration for public companies and companies preparing for an audit; it is not a blanket requirement for every reader.
The architecture: app, agent and workflow
Three pieces do different jobs here, and keeping them separate is what makes the system auditable instead of a black box.
The workflow is deterministic. It runs on a schedule (or a webhook, once a matching Brex event is confirmed for your account), fetches new transactions, checks them against a budget snapshot, and either closes the loop automatically or opens an exception record. It never writes to NetSuite without a stored approval.
The agent only runs when the deterministic check cannot resolve the case on its own, for example a transaction tagged to an ambiguous category or a merchant the policy doesn't explicitly cover. It reads the transaction, the relevant budget, and the policy text, then drafts a short explanation and a confidence score for the controller. It never decides to post or withhold the journal entry itself.
The app is the system of record for the whole process. It holds the transaction, the policy snapshot at the time of the check, the exception reason, the evidence reference, the reviewer, the decision, and the resulting NetSuite reference. The app is also the controller's UI: a queue they open, read, and act on.

Brex spend exception architecture on Major
This is the same split Major uses everywhere: push the repeatable comparison into code that runs the same way every time, and reserve the model for the part that genuinely needs judgment. A webhook or poll is like a doorbell: it rings the workflow when a transaction shows up, so nobody has to keep refreshing a Brex dashboard to notice.
What the APIs support, and what must be verified
Treat this as a checklist before you wire anything up, since API availability and permissions vary by account.
- Brex token scopes. A read-only exception workflow needs read access to Transactions, Budgets, and spend_limits; confirm which scopes your Brex plan exposes in the dashboard before building.
- Brex webhook coverage. The documented events cover accounting export readiness and expense payment updates, not a generic "new transaction" event; verify current event coverage against the Webhooks API reference before relying on a webhook as the sole trigger.
- NetSuite REST Web Services enablement. The REST Web Services feature must be enabled on the NetSuite account, and the integration role needs permission on the journalentry record; this is configured per-account and is not guaranteed by default.
- NetSuite journalentry fields. Required fields, account segments, subsidiaries, and custom fields vary by account; use the account's own REST API Browser or metadata catalog to confirm the exact fields before posting, rather than assuming the fields in this article's example apply to every NetSuite configuration.
- No documented public rate limit for NetSuite REST. Concurrency limits vary by account tier; build in backoff regardless.
- Brex rate limits. Up to 1,000 requests per 60 seconds per Client ID and Brex account, per the rate limits guide.
None of this blocks the build. It does mean the first step in the walkthrough below is confirming these specifics in your own accounts, not assuming the defaults from this article.
Build a Brex-NetSuite exception app on Major
Here is the concrete build, in the order you'd actually do it. IT connects the systems once; everyone who builds on top reuses those same governed credentials.
- Connect the Brex and NetSuite connectors in Major's credential store. An admin creates a scoped Brex user token (read-only on Transactions, Budgets, and spend_limits) and a NetSuite integration role with REST Web Services access, then adds both to Major's central credential proxy. You should see both connectors listed as available resources, with no token or secret visible to the app, agent, or workflow builder.
- Build the exception tracker app. Ask Major to create an app with a managed database holding a transactions table (
brex_transaction_id, merchant, amount, currency, date, entity/subsidiary), a policy snapshot table (budget ID, limit, category rule, rule version), and an exceptions table (reason, evidence reference, confidence, reviewer, decision,netsuite_journal_entry_id, status). You should see a queue view listing open exceptions with their status and a detail view per transaction showing the policy snapshot and agent explanation.
Example prompt for the app:
"Build an app called Spend Exception Tracker. It has three tables: transactions (Brex transaction ID, merchant, amount, currency, date, subsidiary), policysnapshots (budget ID, spend limit, category, rule version, capturedat), and exceptions (transaction ID, reason, evidence link, confidence score, reviewer, decision, NetSuite journal entry ID, status). Add a queue screen listing exceptions by status, and a detail screen showing the transaction, its policy snapshot, and the agent's draft explanation, with approve and reject actions for the controller."
- Add the agent that uses the app. Give it instructions to read a flagged transaction and its policy snapshot from the app's endpoints, compare the amount against the stored spend limit, and only draft an explanation when the deterministic comparison doesn't clearly resolve the case (ambiguous category, a new merchant, a split transaction). The agent writes its draft reason and confidence back to the exceptions table; it never calls NetSuite directly.
Example prompt for the agent:
"You are the spend policy agent for the Spend Exception Tracker app. When called with a transaction ID, fetch the transaction and its policy snapshot from the app. If the amount is under the spend limit and the category matches policy, mark it cleared. If it's over the limit or the category is ambiguous, write a two-sentence explanation of why it's flagged and a confidence score from 0 to 1. Never change the decision or reviewer fields, and never call NetSuite."
- Set the workflow trigger. Configure a schedule (for example every 15 minutes) that calls the Brex Transactions endpoint with a one- to two-day lookback window, checks each transaction's Brex transaction ID against the app's transactions table before processing, and runs the deterministic budget comparison before ever calling the agent. You should see new transactions appear in the app's table within one polling interval of posting in Brex.
- Test the workflow end to end in a sandbox. Run a batch of test transactions through the schedule, confirm clean transactions clear automatically, confirm a transaction over a test budget's spend limit creates an exception record, and confirm the agent's draft explanation appears in the exception detail view without posting anything to NetSuite. You should see the exception queue populate correctly and NetSuite remain untouched until a controller acts.
- Roll out with permissions. Scope the controller role to approve or reject exceptions in the app, scope the NetSuite write action to only fire after an "approved" decision is recorded, and restrict who can edit the policy snapshot table. You should see that only the controller role can trigger a NetSuite write, and every write is tied to a specific reviewer and timestamp in the app's audit log.
Only after a controller clicks approve does the workflow call NetSuite's record endpoint to create the journalentry, using the subsidiary, account, and line details confirmed against your account's metadata catalog. If the controller rejects or holds the exception, the workflow writes that status to the app and leaves NetSuite untouched.
Governance and IT control
Every connector credential, for both Brex and NetSuite, lives in Major's central credential proxy, never in the app's code or the agent's prompt. IT governs both connections: scopes, rotation, and revocation happen in one place, and every app, agent, or workflow that uses Brex or NetSuite data goes through the same governed connection.
Access to the exception tracker app is role-based. A controller can approve or reject; most finance staff can view the queue but not act on it; only an admin role can edit the policy snapshot table that drives the automated check.
Every action in the app is logged: who viewed a transaction, who the agent drafted an explanation for, who approved or rejected, and the timestamp of the resulting NetSuite write (or the decision not to write). This is the audit trail Section 404 asks for if your company is public, and it is useful evidence for any auditor even if you're not.
SSO governs who can log into the app at all, so the exception queue is not a spreadsheet anyone with a link can open. The managed database and storage behind the app are Major's, not a shared drive, so the evidence attached to an exception (a receipt, a policy excerpt) stays inside the same governed system as the record itself. This kind of app, agent, and workflow split, with credentials centralized and access role-gated, is what a governed software factory produces: business teams get a working tool fast, and IT never loses visibility into what it touches.
Failure handling and edge cases

Exception data flow and approval path
A few failure modes are worth planning for before go-live, since Brex and NetSuite both operate independently of Major and can be slow, duplicate, or briefly unavailable.
- Duplicate events. If a poll overlaps a previous run, or a webhook retries, the workflow checks the Brex transaction ID against the app's transactions table before creating a new record, so the same transaction never gets two exception entries.
- Rate limit backoff. On a 429 from Brex, the workflow waits and retries with exponential backoff rather than hammering the endpoint again immediately, consistent with Brex's own guidance.
- Partial or stale budget data. If a Budgets API call fails or returns a stale limit, the workflow flags the transaction as an exception requiring manual review rather than guessing at a limit; a missing policy snapshot is itself a reason to escalate to a person.
- Late-arriving transactions. Card transactions can lag before they're available through the Transactions endpoints, so the lookback window should overlap by at least a day rather than relying on a transaction appearing the same day it's authorized.
- What the agent must never do. It never changes the reviewer or decision fields, never calls NetSuite, and never auto-approves its own draft. If its confidence is low, the case still goes to a person; the agent's job is to make that person's review faster, not to replace it.
- NetSuite write failures. If the journal entry creation call fails (a missing required field, a permission error), the workflow records the failure on the exception record and keeps its status at "approved, posting failed" rather than silently retrying into a duplicate entry.
The fallback in every one of these cases is the same: stop, record what happened, and surface it to the controller. Nothing in this workflow is designed to resolve an ambiguous state on its own.
A worked example with numbers
For example, say a 60-person company runs roughly 400 Brex card transactions a month across its teams, and the controller has configured one budget per department with a monthly spend limit per category.
One afternoon, the workflow's 15-minute poll picks up a new transaction: a $680 charge from a software vendor, coded to the marketing team's tools budget. The policy snapshot for that budget shows a $500 monthly limit for that category, already at $420 spent before this charge.
The deterministic check in the workflow runs first: $680 plus $420 already spent is well over the $500 limit, so this is clearly over budget, not ambiguous. It does not need the agent's judgment to know that; it writes an exception record directly with reason "exceeds monthly tools budget" and confidence is not even needed here because the rule is unambiguous.
Now say a second transaction that same week is a $310 charge from a merchant category the policy doesn't explicitly list, tagged as "software" but from a vendor the policy table has never seen before. This is the ambiguous case: the deterministic check can't tell if it belongs under tools, professional services, or something else.
This is where the agent runs. It reads the transaction, the department's policy snapshot, and drafts: "Merchant not in the policy's software vendor list; amount is under the department's overall monthly limit but outside the named category. Recommend reviewing vendor classification." It assigns a confidence of 0.4, low enough that the controller should look closely.
The controller opens the queue, sees both exceptions, approves the first one with a note that it needs manager sign-off for an over-budget purchase, and asks a follow-up question on the second before deciding. Out of this week's roughly 100 transactions, 2 become exceptions and 98 clear automatically; of those 2, one resolves from the deterministic rule alone and one needed the agent's explanation to move the controller's review along faster.
This is an illustrative example to show how the deterministic check, the agent, and the controller divide the work; it is not a measured result from any customer.
What to measure
Once this is running, a controller should track a handful of numbers that map directly to the problem this solves:
- Exceptions caught before posting, as a share of total transactions, so you know the workflow is actually finding policy breaks instead of missing them.
- Time from transaction to resolution, from when an exception is created to when a controller approves, rejects, or holds it, since the whole point is catching this before month-end instead of after.
- Agent-assisted vs. deterministic-only resolutions, to see how much of the queue genuinely needs judgment versus a clear rule.
- NetSuite posting failures, so a pattern of failed journal entry writes (a missing field, a permission gap) gets fixed at the source instead of piling up as rejected postings.
- Manual touches per exception, to see whether the agent's draft explanation is actually reducing back-and-forth or just adding a step.
None of these are promised outcomes; they are the metrics a controller already tracks informally and can now see in one place.
Frequently asked questions
How do I integrate Brex with NetSuite?
Brex's native accounting integration, documented in its NetSuite setup guide, handles exporting coded transactions into NetSuite accounting records through account settings and mappings you configure in Brex. A separate exception-management workflow, like the one in this article, is an addition for catching policy violations before they post, not a replacement for that native sync.
Can Brex transactions sync to NetSuite as journal entries?
Brex documents supported export formats and mapping options for sending transaction data into NetSuite in its support documentation; the exact form (journal entries, bills, or another record type) depends on how your account is configured. Not every business uses the same export mapping, so check your own account's settings before assuming a specific record type.
How can a finance team review Brex policy violations before close?
Build an app-backed exception queue that stores each flagged transaction with its policy context, lets an agent draft an explanation for ambiguous cases, and requires a controller's explicit decision before any accounting change happens. This turns a month-end scramble into a rolling review that happens as transactions post.
Can an AI agent post journal entries in NetSuite automatically?
In this design, no. The agent only drafts an explanation and a confidence score; a controller approval is required before the workflow calls NetSuite's journalentry record endpoint, and the exact fields and permissions needed depend on your NetSuite account's configuration and role setup.
What data should a Brex-NetSuite exception tracker store?
At minimum: the Brex transaction ID, merchant, amount, date, and subsidiary; the policy or budget snapshot that produced the exception; the reason and any evidence reference; the agent's confidence score where applicable; the reviewer and their decision; and the resulting NetSuite journal entry reference and status. Avoid storing more sensitive cardholder data than the workflow actually needs.
Before you go live
Run through this list with the controller and whoever owns the Brex and NetSuite connections before the workflow goes live, so nothing is left assumed.
- [ ] Brex user token scoped to read-only access on Transactions, Budgets, and spend_limits, stored in Major's credential proxy
- [ ] NetSuite integration role has REST Web Services enabled with journalentry permissions, confirmed against your account's metadata catalog
- [ ] Polling schedule and lookback window tested against a sample of real transactions in a sandbox
- [ ] Idempotency check confirmed: replaying the same transaction ID does not create a duplicate exception
- [ ] Controller role is the only role that can trigger a NetSuite write
- [ ] Rate-limit backoff tested against a simulated 429 response
- [ ] Audit log confirmed to capture viewer, reviewer, decision, and resulting NetSuite reference for every exception
- [ ] A named owner (the controller or accounting manager) signed off on the policy snapshot rules before go-live
More use cases by tool: More NetSuite use cases.
More finance AI automation use cases
- AI agents for finance: every use case by tool
- Automate Shopify NetSuite order-to-cash sync with AI exception handling
- Automate Ramp expense coding sync to NetSuite with AI review
Start building on Major
Build a durable Brex exception queue that lets a finance agent investigate policy context while controllers retain approval over NetSuite changes.
Related articles
- Apollo.io Salesforce Integration for Lead Routing
- Automate Jira-Intercom Bug Escalation With AI
- Automate Greenhouse-to-Workday New-Hire Handoffs
About the author
Ritvij Gautam is Head of Growth at Major.
Last reviewed November 20, 2026 by Ritvij Gautam.
Frequently asked questions
- How do I integrate Brex with NetSuite?
- Brex's native accounting integration, documented in its NetSuite setup guide, handles exporting coded transactions into NetSuite accounting records through account settings and mappings you configure in Brex. A separate exception-management workflow is an addition for catching policy violations before they post, not a replacement for that native sync.
- Can Brex transactions sync to NetSuite as journal entries?
- Brex documents supported export formats and mapping options for sending transaction data into NetSuite; the exact form (journal entries, bills, or another record type) depends on how your account is configured. Not every business uses the same export mapping, so check your own account's settings first.
- How can a finance team review Brex policy violations before close?
- Build an app-backed exception queue that stores each flagged transaction with its policy context, lets an agent draft an explanation for ambiguous cases, and requires a controller's explicit decision before any accounting change happens. This turns a month-end scramble into a rolling review.
- Can an AI agent post journal entries in NetSuite automatically?
- In this design, no. The agent only drafts an explanation and a confidence score; a controller approval is required before the workflow calls NetSuite's journalentry record endpoint, and the exact fields and permissions needed depend on your NetSuite account's configuration and role setup.
- What data should a Brex-NetSuite exception tracker store?
- At minimum: the Brex transaction ID, merchant, amount, date, and subsidiary; the policy or budget snapshot that produced the exception; the reason and evidence reference; the agent's confidence score; the reviewer and decision; and the resulting NetSuite journal entry reference and status.