You can align the document numbering within CakeHR according to the numbering pattern set in your organisation by using  Document IDs. This feature allows to add custom ID patterns for every Document template you have in the system. The ID for a given template will be generated automatically & you can insert it into a document using a placeholder. 

Read below to see how it works.

ℹ️To set this feature up you will require a user with Administrator-level access

Creating Document ID patterns & allocating them to Document templates

Let's head to Settings --> Employee data --> Document templates. We'll start by creating a new ID pattern by clicking "New document ID":

Clicking will open a modal window. Here you can set up a Document ID pattern which will be further applied to a document generated via specified Document Template.

The modal lets you to set up a new Document ID using the following fields: 

  • Document template - a document template which will use the pattern you are creating. If you don't have a document template yet, you can add it later
  • Pattern - the template which will be used to generate a factual ID in the document. To find out more about the possibilities of this field please read the section below
  • Start incrementing from - the value of numerical part which will be contained in your Document ID. This is handy if you already have some documents of a certain kind in place & you need to continue the serialisation starting a certain number

Configuring a pattern

Here's how you can configure your Pattern template.

The Pattern field allows you to configure how your Document ID will look every time you generate a new Document from Document template. The key specialty of Pattern is the {#} placeholder. When added, it will convert into a numerical value which will get incremented each time you create a document from the linked Document template. 

Besides the placeholder, you can use letters & special characters to create informative patterns that later will be applied to your documents as Document IDs. Use the {#} placeholder to specify the location of numerical part in the ID. Here how it may look:

Examples:

  • If incrementing from 1, this pattern will generate the next document ID of ABC-EMP-1;
  • If incrementing from 124, this pattern will generate thr next document ID of ABC-EMP-125.

Can I add letters & special characters after the {#} placeholder?Yes. Just enter ABC-EMP-{#}-COOL to add COOL to your Document ID. :)

When done setting up your Pattern, remember to link it to a Document Template. Let's now try it out.

Adding Document ID to a document

Now, when you have your Document ID pattern in place, let's insert it into a document to get our paperwork serialised.
To do that we need to paste a placeholder {document_id} in your Document Template, like this:


Remember to upload & save the Document template.
When generating a document from this Document template, the {document_id} placeholder will be replaced by a Document ID linked to the Document Template, according to specified pattern. Here is the example of the generated document with a custom Document ID:


We sincerely hope that this article was helpful to you!

If you have any suggestions or questions remaining, please reach out to us via support widget.

Did this answer your question?