> For the complete documentation index, see [llms.txt](https://docs.agilecase.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.agilecase.com/administrator-documentation/system-settings/case-numbering.md).

# Case Numbering

This lesson will show you how to create your own custom case numbering system in AgileCase.

### Accessing case numbering

<figure><img src="/files/7wZHmyH8wUuo7adXcMGB" alt="" width="178"><figcaption></figcaption></figure>

Like client numbers, which you can read about [here](/administrator-documentation/system-settings/client-numbering.md), your system of case numbering is likely to be unique to your business. AgileCase allows you to keep continuity by letting you edit the way in which case numbers are generated to reflect your business practices.

To access case numbering, click the button on the settings menu under "System Settings".

### The case numbering page

<figure><img src="/files/ZV6Kzcv7gOgNYPhYn8jQ" alt=""><figcaption></figcaption></figure>

The case numbering page is made up of several elements that allow you to customize how unique case numbers are generated.

{% stepper %}
{% step %}

### Example case number

At the top of the page is an example case number that follows the layout you select in the options below. The example number uses the client code "DOEJ001" and the case number "1".
{% endstep %}

{% step %}

### Pattern items

Below the example case number are the pattern items. These provide the layout for your case number and can be rearranged using the arrows below.
{% endstep %}

{% step %}

### Pattern item editor

The pattern item editor allows you to edit the appearance of each pattern item that makes up your case number.
{% endstep %}
{% endstepper %}

### Editing pattern items

<figure><img src="/files/1GIl9vlQKyEzsOjG2PLK" alt=""><figcaption></figcaption></figure>

In this screenshot, you can see that one of the "Client Code" pattern items from above has been edited. The character truncation has been changed from 7 to 9; character truncation governs the amount of characters from the pattern item that are displayed. Since character truncation has been set to 9 but there are only 7 characters in the client code, 2 padding characters have been used.

The padding character has also been changed from "\_" to "0" by simply editing the text in the box. It is also possible to change whether padding characters appear to the left or right of the pattern item and choose between upper and lower case characters.

### Adding new pattern items

<figure><img src="/files/AxBmyFpXXsxoq3UXe5IZ" alt="" width="217"><figcaption></figcaption></figure>

You can add new pattern items to your case number using the "Add Pattern Items" dropdown menu. For this example we will add the last two digits of the year, so we click on "Year (2 digits)".

### Moving items

<figure><img src="/files/CM47Oh2ekcaRpmmtsCWv" alt=""><figcaption></figcaption></figure>

Now that a new pattern item has been added, it will appear in the example case and the pattern items display.

1. Use the arrow buttons to move the selected item and change the order of pattern items in the system.
2. If you want to delete a pattern item, use the red delete button to erase it from the case number.

### Updating existing case numbers

<figure><img src="/files/ZT38eWIMzgOakUNw6hAr" alt=""><figcaption></figcaption></figure>

After you have created a new case number format, all future cases will use it. However, you may wish to update your existing case numbers to follow the new pattern.

1. The lower checkbox changes the format of all cases on the system to follow the custom case number template you have created.
2. The upper checkbox allows you to change the "Next Case starts at" value when ticked. This allows you to choose the case number value that AgileCase will start from. For example, if you have cases numbered 1, 2 and 3 on another system then AgileCase will duplicate these numbers in the first three cases you create. However, if you change the "Next Case starts at" value to "4" then AgileCase will begin with number 4, allowing you to have continuity between the two systems.

### Save your case numbering

<figure><img src="/files/r98MA3phwd2Gf7LYm8Bi" alt="" width="203"><figcaption></figcaption></figure>

Once you have finished editing your custom case numbering, click the "Save changes" button at the bottom of the page to apply the changes that you have made.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.agilecase.com/administrator-documentation/system-settings/case-numbering.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
