# Acumatica

Source: https://docs.autessa.com/docs/tools/acumatica

> Tool types for reading and writing Acumatica ERP entities, working with attachments, and invoking business actions.

# Acumatica

A generic wrapper over Acumatica's contract-based REST API: agents discover what entities and actions your instance exposes, then read, upsert, attach, and act on any of them — sales orders, customers, invoices, or your own customizations — without a per-entity tool.

Every tool on this page requires an Acumatica connector (see
[Connectors](/docs/guide/connectors.md)); pass its ID as `connectorId`.

Unlike most connectors, these tools aren't hard-coded to specific objects.
Acumatica publishes its API as *endpoints* (named contract versions like
`Default` `24.200.001`) containing *entities* (`SalesOrder`, `Customer`,
`Bill`, ...), and every tool takes the same addressing trio: `endpointName`
(defaults to `"Default"`), `endpointVersion`, and `entityName`. The intended
flow is discovery first: `ACUMATICA_GET_ENTITIES` to see what exists,
`ACUMATICA_GET_ENTITY_SCHEMA` to learn an entity's exact field names and
shapes, then the read/write/action tools. Record payloads use Acumatica's
value-wrapper format — `{"OrderType": {"value": "SO"}}` — which the schema
tool's output demonstrates.

## Get entities **TOOL** `ACUMATICA_GET_ENTITIES`

Lists every entity exposed by an endpoint, parsed from the endpoint's
swagger definition. This is the starting point when an agent doesn't yet
know what the instance calls something — run it once, then drill into a
specific entity with the schema tool.

### Example

```json title="Tool config"
{
  "toolType": "ACUMATICA_GET_ENTITIES",
  "connectorId": "V1StGXR8Z5",
  "endpointVersion": "24.200.001"
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required: Reference to the Acumatica connector References a connector by ID.
- `endpointName` (string · optional) — Optional: Endpoint name, defaults to "Default"
- `endpointVersion` (string) — Required: API version (e.g., "24.200.001")

## Get entity schema **TOOL** `ACUMATICA_GET_ENTITY_SCHEMA`

Returns an LLM-friendly template of an entity's fields, built from
Acumatica's ad-hoc schema plus (by default) a sample record for realistic
example values. Deeply nested structures are truncated at `maxDepth` with a
hint telling the agent to re-run with `focusPath` (e.g.
`"Details.Allocations"`) to go deeper. Always consult this before
`ACUMATICA_UPSERT_RECORD` — field names are instance-specific and
case-sensitive.

### Example

```json title="Tool config"
{
  "toolType": "ACUMATICA_GET_ENTITY_SCHEMA",
  "connectorId": "V1StGXR8Z5",
  "entityName": "SalesOrder",
  "endpointVersion": "24.200.001",
  "maxDepth": 3
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required: Reference to the Acumatica connector References a connector by ID.
- `entityName` (string) — Required: Name of the entity (e.g., "SalesOrder", "Customer")
- `endpointName` (string · optional) — Optional: Endpoint name, defaults to "Default"
- `endpointVersion` (string) — Required: API version (e.g., "24.200.001")
- `includeSampleData` (boolean · optional) — Optional: Fetch sample record for examples (default: true)
- `maxDepth` (integer · optional) — Optional: Max nesting depth for schema output (default: 3)
- `focusPath` (string · optional) — Optional: Drill down into nested path (e.g., "Details.Allocations")

## Get records **TOOL** `ACUMATICA_GET_RECORD`

Queries an entity with the standard OData toolkit: `filter` (e.g.
`"CustomerID eq 'CUST001' and Status eq 'Open'"`), `select` to limit fields,
`expand` to include nested detail entities, `orderBy`, and `top`/`skip`
pagination (default 10 records). Errors come back with suggestions that
steer the agent toward the schema tool when a field name is wrong.

### Example

```json title="Tool config"
{
  "toolType": "ACUMATICA_GET_RECORD",
  "connectorId": "V1StGXR8Z5",
  "entityName": "SalesOrder",
  "endpointVersion": "24.200.001",
  "filter": "CustomerID eq '@@{CUSTOMER_ID}' and Status eq 'Open'",
  "select": "OrderNbr,CustomerID,OrderTotal,Status",
  "orderBy": "OrderNbr desc",
  "top": 10
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required: Reference to the Acumatica connector References a connector by ID.
- `entityName` (string) — Required: Name of the entity (e.g., "SalesOrder", "Customer")
- `endpointVersion` (string) — Required: API version (e.g., "24.200.001")
- `endpointName` (string · optional) — Optional: Endpoint name, defaults to "Default"
- `filter` (string · optional) — Optional: OData filter (e.g., "CustomerID eq 'CUST001' and Status eq 'Open'")
- `select` (string · optional) — Optional: Fields to return (e.g., "OrderNbr,CustomerID,OrderTotal")
- `expand` (string · optional) — Optional: Nested entities to expand (e.g., "Details,Payments")
- `orderBy` (string · optional) — Optional: Sort order (e.g., "OrderNbr desc" or "Date asc,CustomerID asc")
- `top` (integer · optional) — Optional: Max records to return (default: 10)
- `skip` (integer · optional) — Optional: Records to skip for pagination

## Upsert a record **TOOL** `ACUMATICA_UPSERT_RECORD`

Creates or updates a record using Acumatica's PUT semantics: if the key
fields in `record` match an existing record it's updated, otherwise a new
one is created. `record` is a JSON string in Acumatica's value-wrapper
format and supports `@@{variable}` replacement inside the string. Get the
field names right with `ACUMATICA_GET_ENTITY_SCHEMA` first — validation
errors return targeted suggestions so the agent can self-correct.

### Example

```json title="Tool config"
{
  "toolType": "ACUMATICA_UPSERT_RECORD",
  "connectorId": "V1StGXR8Z5",
  "entityName": "Customer",
  "endpointVersion": "24.200.001",
  "record": "{\"CustomerID\": {\"value\": \"@@{CUSTOMER_ID}\"}, \"CustomerName\": {\"value\": \"@@{CUSTOMER_NAME}\"}, \"CustomerClass\": {\"value\": \"DEFAULT\"}}"
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required: Reference to the Acumatica connector References a connector by ID.
- `entityName` (string) — Required: Name of the entity (e.g., "SalesOrder", "Customer")
- `endpointVersion` (string) — Required: API version (e.g., "24.200.001")
- `endpointName` (string · optional) — Optional: Endpoint name, defaults to "Default"
- `record` (string) — Required: JSON string of record data (supports @@{var} replacement)

## Get attachments **TOOL** `ACUMATICA_GET_ATTACHMENTS`

Lists the files attached to a specific record. `keyId` is the record's key
values joined with `/` — `"SO/000123"` for a sales order (order type then
number), `"Normal/000029"` for a bill. Returns filenames the agent can pass
to `ACUMATICA_DOWNLOAD_ATTACHMENT`.

### Example

```json title="Tool config"
{
  "toolType": "ACUMATICA_GET_ATTACHMENTS",
  "connectorId": "V1StGXR8Z5",
  "entityName": "SalesOrder",
  "endpointVersion": "24.200.001",
  "keyId": "SO/@@{ORDER_NUMBER}"
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required: Reference to the Acumatica connector References a connector by ID.
- `entityName` (string) — Required: Name of the entity (e.g., "SalesOrder", "PurchaseOrder")
- `endpointName` (string · optional) — Optional: Endpoint name, defaults to "Default"
- `endpointVersion` (string) — Required: API version (e.g., "24.200.001")
- `keyId` (string) — Required: Entity key values (e.g., "SO/000123" or "Normal/000029")

## Download an attachment **TOOL** `ACUMATICA_DOWNLOAD_ATTACHMENT`

Downloads one attachment from a record and extracts its content so the agent
can read it — a PDF invoice or a spec sheet becomes text the model can work
with. `filename` must match the attachment exactly (case-sensitive), so list
attachments first with `ACUMATICA_GET_ATTACHMENTS`.

### Example

```json title="Tool config"
{
  "toolType": "ACUMATICA_DOWNLOAD_ATTACHMENT",
  "connectorId": "V1StGXR8Z5",
  "entityName": "SalesOrder",
  "endpointVersion": "24.200.001",
  "keyId": "SO/@@{ORDER_NUMBER}",
  "filename": "@@{ATTACHMENT_FILENAME}"
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required: Reference to the Acumatica connector References a connector by ID.
- `entityName` (string) — Required: Name of the entity (e.g., "SalesOrder", "PurchaseOrder")
- `endpointName` (string · optional) — Optional: Endpoint name, defaults to "Default"
- `endpointVersion` (string) — Required: API version (e.g., "24.200.001")
- `keyId` (string) — Required: Entity key values (e.g., "SO/000123" or "Normal/000029")
- `filename` (string) — Required: Exact filename to download (case-sensitive)

## Get actions **TOOL** `ACUMATICA_GET_ACTIONS`

Discovers the business actions an endpoint exposes — release, confirm
shipment, email invoice, and so on — parsed from the endpoint's swagger
definition. Filter to one entity with `entityName`, or match action names
with the case-insensitive `filter`. Run this before `ACUMATICA_INVOKE_ACTION`
to get the exact action name and its parameters.

### Example

```json title="Tool config"
{
  "toolType": "ACUMATICA_GET_ACTIONS",
  "connectorId": "V1StGXR8Z5",
  "entityName": "SalesOrder",
  "endpointVersion": "24.200.001"
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required: Reference to the Acumatica connector References a connector by ID.
- `entityName` (string · optional) — Optional: Filter to actions for specific entity only
- `endpointName` (string · optional) — Optional: Endpoint name, defaults to "Default"
- `endpointVersion` (string) — Required: API version (e.g., "24.200.001")
- `filter` (string · optional) — Optional: Filter action names (case-insensitive contains match)

## Invoke an action **TOOL** `ACUMATICA_INVOKE_ACTION`

Executes a business action against a record — the write-side of ERP
workflows, like `ReleaseSalesOrder`. `entity` is a JSON string holding the
record's key fields in value-wrapper format, and `parameters` carries any
action parameters the same way. Long-running actions are polled
automatically for up to 10 seconds; if the action is still in progress the
response returns `status: "PENDING"` with an `operationUrl` for
`ACUMATICA_GET_ACTION_STATUS` to poll later.

### Example

```json title="Tool config"
{
  "toolType": "ACUMATICA_INVOKE_ACTION",
  "connectorId": "V1StGXR8Z5",
  "entityName": "SalesOrder",
  "actionName": "ReleaseSalesOrder",
  "endpointVersion": "24.200.001",
  "entity": "{\"OrderType\": {\"value\": \"SO\"}, \"OrderNbr\": {\"value\": \"@@{ORDER_NUMBER}\"}}"
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required: Reference to the Acumatica connector References a connector by ID.
- `entityName` (string) — Required: Name of the entity (e.g., "SalesOrder")
- `actionName` (string) — Required: Name of the action (e.g., "ReleaseSalesOrder")
- `endpointName` (string · optional) — Optional: Endpoint name, defaults to "Default"
- `endpointVersion` (string) — Required: API version (e.g., "24.200.001")
- `entity` (string) — Required: JSON object with entity key fields in Acumatica format
- `parameters` (string · optional) — Optional: JSON object with action parameters in Acumatica format

## Get action status **TOOL** `ACUMATICA_GET_ACTION_STATUS`

Polls a long-running action that `ACUMATICA_INVOKE_ACTION` left in
`PENDING`, using the `operationUrl` from that response. Reports whether the
operation has completed, is still running, or failed.

### Example

```json title="Tool config"
{
  "toolType": "ACUMATICA_GET_ACTION_STATUS",
  "connectorId": "V1StGXR8Z5",
  "operationUrl": "@@{OPERATION_URL}"
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required: Reference to the Acumatica connector References a connector by ID.
- `operationUrl` (string) — Required: The Location URL from AcumaticaInvokeAction 202 response

## Raw API call **TOOL** `ACUMATICA_RAW_API_CALL`

The escape hatch: calls any Acumatica REST endpoint directly with the
connector's authentication and returns the complete response — status,
headers, and raw body. `path` can be a short form like `"/entity/SalesOrder"`
(completed using `endpointName`/`endpointVersion`) or a full path. Supports
GET, POST, PUT, and DELETE, so reserve it for cases the typed tools don't
cover.

### Example

```json title="Tool config"
{
  "toolType": "ACUMATICA_RAW_API_CALL",
  "connectorId": "V1StGXR8Z5",
  "method": "GET",
  "path": "/entity/SalesOrder",
  "endpointVersion": "24.200.001"
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required: Reference to the Acumatica connector References a connector by ID.
- `method` (string) — Required: HTTP method (GET, POST, PUT, DELETE)
- `path` (string) — Required: API path (e.g., "/entity/SalesOrder" or full path like "/entity/Default/24.200.001/SalesOrder")
- `endpointVersion` (string · optional) — Optional: API version (e.g., "24.200.001") - used to build path if not fully specified
- `endpointName` (string · optional) — Optional: Endpoint name, defaults to "Default"
- `body` (string · optional) — Optional: JSON body for POST/PUT requests

## Related

- [Tools overview](/docs/tools.md)
- [Connectors](/docs/guide/connectors.md)
- [Agentic tools guide](/docs/guide/agentic/tools.md)
- [QuickBooks tools](/docs/tools/quickbooks.md)
- [Zoho CRM tools](/docs/tools/zoho-crm.md)

