> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dualentry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Accounting Intelligence: Record Identifiers

> How Accounting Intelligence and MCP resolve the identifier you see on a record, how citations become links, and when an identifier stays plain text.

Accounting Intelligence and the DualEntry MCP server find a record by the identifier shown on that record's page. When the record has a [record code](https://docs.dualentry.com/accountants/platform-configuration/organization-settings/record-numbering-reference.md), that code is the identifier they use. Paste the value from the page header or the **Record code** column, and the assistant opens that record.

## The identifier on the page

The identifier Accounting Intelligence uses is the same string DualEntry shows you, not an internal database ID. It is also not the value in a list's numbered column, such as **Journal Entry #** or **Invoice #**, which shows the internal ID padded to six digits (`JE-000042`).

A record code is the readable identifier DualEntry assigns when a record posts, such as `JE-0042`, `IN-0042`, or `ACME-JE-0007` when companies keep their own sequences. Drafts show a placeholder such as `DRAFT-JE-935` until they post. Records created before record codes were turned on, and records brought in by a migration import, keep the permanent codes described in the [Record Numbering Reference](https://docs.dualentry.com/accountants/platform-configuration/organization-settings/record-numbering-reference.md).

Customers and vendors also have record codes (`CU-0042`, `VN-0042`), shown in the **Record code** column of the customer and vendor lists. Their page header shows the name instead. Chart of accounts rows have no record code: use the account number.

Copy the identifier from the page you are looking at. Do not build one from a database ID, and do not assume the digits in a code are the record's internal ID. A code and an internal ID can both be valid and point at different records.

Examples of questions that resolve correctly when you paste the on-page identifier:

* "Show me the lines on journal entry `JE-0042`."
* "Where did bill `BI-1187` come from?"
* "Compare invoice `IN-0042` to the source charge."
* "Open customer `CU-0042` and list open invoices."

## How a named record is resolved

When you name a record, Accounting Intelligence and MCP look it up by the identifier you typed. A matching record code wins. There is no fallback from a code to an internal ID, because those two values can identify different records.

What happens for each kind of identifier you can type:

| What you type | What opens |
| - | - |
| A record code, including a company-prefixed, draft, or migration code (`JE-0042`, `ACME-IN-0007`, `DRAFT-JE-935`, `MIGR-IN-51234`) | The record that holds that code |
| The identifier copied from the page header or **Record code** column | The record on that page |
| Bare digits (`123`) | The record whose internal ID is 123, which can be a different record from the one whose code ends in 123 |
| An account number | The account with that number. Accounts have no record code. |
| A bare number after "contract" or "fixed asset" (`contract 123`) | The contract or fixed asset whose own number is 123. If the page header shows a different identifier, paste that header value instead. |

If two records share a code, Accounting Intelligence reports the ambiguity and asks which one you mean. It does not pick one silently, and the DualEntry MCP server's `get_record_by_number` tool returns an error that names the code rather than failing the whole turn.

The same lookup applies when you ask Accounting Intelligence to list or filter records, to show a record's integration origin, or to compare a DualEntry record to the source system. Those questions accept the on-page identifier. Results that include a record code show that code, matching the rest of the app.

## The record already on the page

When you open Accounting Intelligence from a record, customer, or vendor page, that record is already in scope. You do not have to name it.

The assistant uses the identifier the page header shows, so a first message such as "change this memo to Q3 accrual" edits the open record instead of asking which one you mean. The same applies to questions ("what's the remaining balance?") and to integration questions about the record in front of you.

This holds on the first message of a conversation, not only after you have already discussed the record. It also holds on amortization schedule pages, which identify the schedule you have open.

Contract, fixed asset, and currency revaluation process pages do not pass the open record to Accounting Intelligence. On those pages, paste the identifier from the page header.

If you name a different record in the same conversation, Accounting Intelligence follows the named identifier. The open record is the default only when you refer to "this" record.

## Citations in answers

When Accounting Intelligence names a record it retrieved, the identifier becomes a link to that record. Choosing the link opens the record in DualEntry.

A record is eligible for a citation link when Accounting Intelligence retrieved it while answering that message, through a lookup or a query. A query result row counts when the identifier it shows matches exactly one record, so a list of journal entries produced from a filter is clickable the same way a single-record lookup is.

An identifier stays as plain text when Accounting Intelligence did not retrieve the record while answering that message, or when the value in a query result belongs to more than one record. A code you typed that the assistant did not look up does not become a link. A missing link is not proof that the identifier is wrong. Ask Accounting Intelligence to open the record if you need the link.

## MCP, CLI, and the public API

The DualEntry MCP server uses the same identifier rules as Accounting Intelligence inside the app. Paste a record code into a prompt and the assistant can find the record.

MCP tools that accept or return identifiers:

| Tool | How identifiers work |
| - | - |
| `get_record_by_number` | Accepts a record code such as `JE-0042`. Do not pass the `record_number` from a `save_record` response: bare digits are treated as an internal ID and can open a different record. |
| `search_records` | Accepts a `code` argument. Each result's `reference` field holds the record code DualEntry shows on the page, when the record has one. Use `transaction_id` from the result when you call `get_record_detail`, `get_record_history`, or `get_related_records`. |
| `save_record` | Returns `record_id` and `record_number`. Neither value is the record code, and `get_record_detail` does not return the code either. Find the record with `search_records` and read the code from the result's `reference` field. |

See [MCP Server: Tools, Permissions, and Troubleshooting](https://docs.dualentry.com/accountants/ai-automation/mcp/mcp-integration.md) for the full tool catalog. For a posting walkthrough that finds the code after a save, see [How to Post a Period-End Accrual from Claude](https://docs.dualentry.com/accountants/ai-automation/mcp/post-a-period-end-accrual-from-claude.md).

The public API returns the same code on records that have one, in the `code` field, and list endpoints accept a `code` filter. See the [API reference](https://docs.dualentry.com/developers/api/resources-v2/index.md).

The DualEntry CLI does not look records up by record code, and its table output does not show one. `get`, `get-number`, and `get-id` drop a known prefix and use the digits, so `JE-0042` is read as record number or internal ID 42, which can be a different record. To find a record by its code, use Accounting Intelligence, MCP, or the public API `code` filter. See the [CLI Reference](https://docs.dualentry.com/developers/guides/cli/reference.md).

## Known limits

These limits apply wherever Accounting Intelligence or MCP resolves a record identifier. They do not change the rule to paste the identifier shown on the page; they describe the cases where that identifier is missing, ambiguous, or not accepted.

* **Accounts have no record code.** Use the account number. Asking for an account by a transaction-style code does not find it.
* **A code and an internal ID can name different records.** DualEntry does not fall back from a code lookup to an ID lookup. If a code is not found, the assistant reports that rather than opening the record whose ID happens to match the digits.
* **Bare digits are an internal ID.** Passing `830` to `get_record_by_number`, or asking for "journal entry 830", looks up the record with that internal ID, not record number 830 and not the record whose code ends in 830.
* **Two records can share a code.** The assistant asks which one you mean. `get_record_by_number` returns an error that names the code.
* **Drafts use the draft placeholder until they post.** Look up `DRAFT-JE-935`, not a code the draft does not have yet.
* **Citation links require a retrieved record.** A correct code that the assistant did not look up while answering, or a query value that more than one record shares, stays as text.
* **The CLI has no code lookup.** Use Accounting Intelligence, MCP, or the public API `code` filter.

## Related reading

* [How Accounting Intelligence Works](https://docs.dualentry.com/accountants/ai-automation/accounting-intelligence/ai-accounting-intelligence.md)
* [Record Numbering Reference](https://docs.dualentry.com/accountants/platform-configuration/organization-settings/record-numbering-reference.md)
* [How to Set Up Record Numbering](https://docs.dualentry.com/accountants/platform-configuration/organization-settings/record-numbering.md)
* [MCP Server: Tools, Permissions, and Troubleshooting](https://docs.dualentry.com/accountants/ai-automation/mcp/mcp-integration.md)
* [How to Post a Period-End Accrual from Claude](https://docs.dualentry.com/accountants/ai-automation/mcp/post-a-period-end-accrual-from-claude.md)
* [CLI Reference](https://docs.dualentry.com/developers/guides/cli/reference.md)
* [Journal entries](https://docs.dualentry.com/accountants/core-financials/general-ledger/journal-entries.md)
* [Global Search Reference](https://docs.dualentry.com/accountants/ai-automation/spotlight-search.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.