AnchorAnchor
Settings

Contact codes

Generate customer and supplier account codes from the contact name, and fill codes for existing contacts.

Every contact can have an optional account code (for example ACM001). Codes identify customers and suppliers on the contact list, in searches and imports, and on printed documents. See Contacts for how codes behave.

You can always type a code on New Contact or Contact → Details. This page adds codes for you.

Where to manage

Settings → Contact codes (Preferences, under Document numbering). You need permission to manage contacts (manage:contacts) to change the setting or fill codes.

How codes are built

A generated code is the first three letters of the contact name and a three-digit number:

Contact nameCode
Acme TradersACM001
Acme HoldingsACM002
Drakenstein Bottling WorksDRA001
4 Ways MotorsWAY001 (digits and spaces are skipped)
Émile & CoEMI001 (accents are dropped)
JoJOX001 (short names are padded with X)

The number follows the highest existing code with the same three letters, including deleted contacts, so a generated code is never handed out twice. After ACM999 comes ACM1000.

Generate codes for new contacts

Turn on Generate codes for new contacts. From then on, a contact saved without a code gets one. This applies to:

  • the New Contact form (the code field shows Auto),
  • contact CSV imports (rows without a code),
  • the REST API and MCP create_contact,
  • contacts created by the Stripe and store (Shopify / WooCommerce) syncs.

A code you type is always kept. It is off by default. Turning it off does not remove existing codes.

Fill missing codes

Fill missing codes gives every existing contact without a code a generated one, oldest contact first. Contacts that already have a code are not changed, so it is safe to run again. It works whether or not automatic codes are on.

MCP and in-page tools

ActionMCPIn-page (WebMCP)
Read the setting and the count of contacts without a codeget_contact_code_settingsanchor_get_contact_code_settings
Turn automatic codes on or offset_contact_code_auto_generateanchor_set_contact_code_auto_generate (asks you to confirm)
Fill missing codesfill_missing_contact_codesanchor_fill_missing_contact_codes (asks you to confirm)

On this page