Customise ID Format

Overview

IdFormat defines how auto-generated IDs (like complaint numbers) look. This is used by the IDGen service in DIGIT CCRS modules.

ID Format – Config vs Customisation

  • Config: Change prefix, date format, or sequence key in MDMS (no code change, just update and restart IDGen).

  • Customisation: Needed only if ID rules depend on complex logic, external systems, or new ID types not supported by IDGen.

  • When to change: New tenant, unique business prefix, regulatory format needs, or separate sequences for multiple workflows.

Steps

1

Check existing format

  • Use the MDMS Search API Send the below JSON request:

{
  "MdmsCriteria": {
    "tenantId": "pg",
    "moduleDetails": [
      {
        "moduleName": "common-masters",
        "masterDetails": [
          {
            "name": "IdFormat"
          }
        ]
      }
    ]
  }
}

Expected Output – You’ll get the current format:

{
  "format": "PG-PGR-[cy:yyyy-MM-dd]-[SEQ_EG_PGR_ID]",
  "idname": "pgr.servicerequestid"
}
2

Modify format

Edit the format field as needed. Example Custom Format:

{
  "format": "PGSR-[cy:yyMMdd]-[SEQ_EG_PGR_ID]",
  "idname": "pgr.servicerequestid"
}

Meaning of fields:

  • "PGSR" – Custom prefix

  • [cy:yyMMdd] – Current date like 250722

  • [SEQ_EG_PGR_ID] – Auto-incremented ID

⚠️ Don’t change the idname value. Only modify the format.

3

Update in MDMS

  • Use the MDMS Update API

  • Paste your modified JSON from Step 2 into the request body.

  • Submit the API call. ✅ You should receive an acknowledgement response if the call is successful.

4

Restart the IDGen Service

To apply the changes:

  • Run the following if you're using Kubernetes:

kubectl rollout restart deployment idgen

ℹ️ The restart is necessary because IDGen caches the format on startup.

Summary

Step
Action
What to Do

1️⃣

Search IdFormat

Use MDMS Search API to check current format

2️⃣

Modify Format

Change only the format value as needed

3️⃣

Update Format

Use MDMS Update API to save the change

4️⃣

Restart IDGen

Restart service to load the new format

Last updated

Was this helpful?