> For the complete documentation index, see [llms.txt](https://kb.logicerp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/setups/setup-accounts/setup-new-account/account-configuration/account-code-formula.md).

# Account Code Formula

YouTube: [How To Generate Account Codes Using Account Code Formula in Logic ERP Software ?](https://www.youtube.com/watch?v=Jd9Vs1CzADM)

## How To Generate Account Codes Using Account Code Formula?

#### In this tutorial, we will explore creating the perfect account code formula in Logic ERP. This feature automates the generation of account codes based on specific rules or criteria.

### Steps to Create an Account Code Formula

* Navigate to the Setup > Setup Accounts and the click on "Setup New Account"
* At the bottom, use the shortcut key **F5** to open the **configuration settings**.
* Locate the option Labeled as:

> "Account Code Formula"

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FPKuKE3kFTf0RiG6gdyBb%2FAccount%20Code%20Formula.png?alt=media&amp;token=f7dd6a44-80d6-4c60-b797-cd510d8439b9" alt=""><figcaption></figcaption></figure>

### **Setup Account Code Formula**:

* Go to the 'Account Code Formula' section.
* The formula automatically generates account codes by combining the customer's mobile number and the highest current account code.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FbgTiVbrrUzzUmf8N4DZs%2FSetup%20Account%20Code.png?alt=media&amp;token=4ee6e892-32ba-49b7-b5a2-f0821f9723bc" alt=""><figcaption></figcaption></figure>

### **Create a Customer Account**:

* Enter the required account details accurately.
* Enter the "Customer's Mobile Number".
* Upon closing the form, the account code will be generated automatically.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FWePDmXc8CjFYPSb1QMKz%2FAccount%20Code%20generated.png?alt=media&amp;token=b7403772-107b-4407-9038-e3d22a9a5c8f" alt=""><figcaption></figcaption></figure>

This method allows easy generation of account codes tailored to your requirements using Logic ERP's account code formula. As new accounts are created, the account code will automatically increment.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/setups/setup-accounts/setup-new-account/account-configuration/account-code-formula.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
