AI Agents · Ai

Anthropic Claude + Acumatica Integration

Anthropic Claude + Acumatica Integration is the work that defines the next phase of enterprise software. ERP systems hold the most valuable business data in the company —.

John Kihiu12 min read

Claude's role in an Acumatica integration is as the reasoning and language layer sitting in front of a set of tightly scoped tools — it decides what to look up and how to phrase a summary, but it should never be the thing directly mutating financial data. Anthropic's Messages API with tool use (function calling) is what makes that split practical.

Tool use with the Messages API

Claude's tool-use flow is a loop: you send a message plus a list of available tools, Claude responds with either text or a tool_use block naming a tool and its arguments, you execute that tool server-side against Acumatica's REST API, and you feed the result back as a tool_result block in the next turn. Nothing touches Acumatica except your own code — Claude only ever proposes an action by name and arguments.

PYTHON · TOOL LOOP
from anthropic import Anthropic

client = Anthropic()
tools = [{
    "name": "get_ar_balance",
    "description": "Get a customer's current AR balance from Acumatica.",
    "input_schema": {
        "type": "object",
        "properties": {"customer_id": {"type": "string"}},
        "required": ["customer_id"]
    }
}]

resp = client.messages.create(
    model="claude-sonnet-4-5",
    max_tokens=1024,
    tools=tools,
    messages=[{"role": "user", "content": "What does ACME owe us?"}]
)

for block in resp.content:
    if block.type == "tool_use" and block.name == "get_ar_balance":
        balance = acumatica_client.get_ar_balance(block.input["customer_id"])
        # feed `balance` back as a tool_result on the next turn

Why tool scope matters more than prompt wording

Most reliability problems in these integrations trace back to tools that are too broad, not to prompt phrasing. A tool named update_invoice that accepts an arbitrary JSON patch invites the model to guess at fields it shouldn't touch. A tool named apply_credit_memo_note that only accepts a memo string is safe by construction — there's no field for the model to accidentally overwrite a total or a GL account.

Prompt caching does not reduce the need for guardrails

Anthropic's prompt caching can cut cost and latency substantially when you're re-sending the same system prompt and tool definitions across many calls, which matters for high-volume ERP workflows. But caching is purely a performance optimization — it changes nothing about validation. Every tool result still needs to be checked against business rules before anything is committed.

Human-in-the-loop for anything that moves money

For write operations — releasing a payment, posting a journal entry, approving a credit memo — the pattern that holds up is: Claude proposes the action via a tool call, your code writes it to a pending-approval table instead of executing it, and a human approves or rejects it through a normal UI. The LLM never has a code path that reaches a "commit" button unattended.

Evaluating reliability before trusting it

Before putting an agent in front of real users, build a fixed set of test scenarios — ambiguous customer names, bills that don't exist, malformed dates — and run them against the tool-use loop with assertions on which tool got called and with what arguments. This catches the actual failure mode (wrong tool, malformed argument, hallucinated ID) rather than eyeballing chat transcripts.

Wrapping up

Claude is good at the part LLMs are actually good at: understanding intent and producing language. The Acumatica-specific engineering is in the tool schemas, the read/write split, and the approval queue standing between a tool call and a posted transaction. If you are stuck on something specific, reach out or keep reading through the rest of the Acumatica blog.

John Kihiu
Acumatica ERP Developer · Laravel Engineer

Independent software engineer in Nairobi specialising in Acumatica customisations, Laravel backends, and tax fiscalisation integrations across East and Southern Africa.