Case IQ Knowledge Base

How can we help?

Set the Case Number Format

On the Case Number page, you can define your case number format to identify cases in the application. The default Case IQ case number format is “YYYY-MM-0000”, containing the following components:

  • “YYYY”: the year in which the case was added, e.g. “2022”.
  • “MM”: the month in which the case was added, presented as the two-digit numerical order of the month on the calendar year, e.g. “02” would be February. 
  • “0000”: the sequential case number count that the system generates based on the number of cases added to the application, counting up from 1. Case numbers will not roll over by default.
  • “-”: the separator character between case number components.

You can change the case number format on the Options page under the System tab in Settings in addition to the Case Number page. If you make updates to the case number format on either page, your changes will be reflected on the Case Number page, Options page, and the application. This article will illustrate the steps to updating the case format on the Case Number page. See the Options article for details on using the Options page.

Case Number page in Settings and Case Number options in the Options page.

Update the Case Number Format

You can use the preset options available on the Case Number and Options pages to adjust each case number component. Your format selections will be used consistently for all cases added. Case IQ also supports fully dynamic case number formats that are contextually generated, see the "Create a Dynamic Case Number Format" section of this article. 

The case number format is not hardcoded in the application, so you can adjust it as needed. When you change the case number format, all cases moving forward will be in the new format. Cases added before the format updates will not be changed.

The Case Number page contains the following options. Click the Edit button on the page to update the case number components. 

  • Prefix: enter text you want the system to add to the beginning of each case number. For example, if you type “Incident” in the “Case Number Prefix” field, all cases added following this change will start with “Incident”.
  • Separator: enter the text you want the system to use to separate case number components. For example, if you set a period as the “Case Number Separator” and choose “Incident” as the “Prefix”, your case numbers would be in the following format: “Incident.0000”. Enter up to 3 characters without spaces.
  • Month Format: choose how or if to indicate the month the case was created using one of the following options:
    • None: do not include the month in which the case was created in case numbers.
    • Month Abbreviation: include the three-letter abbreviation of the month the case was added in all capital letters. For example, if a case is added in February, the month abbreviation will be “FEB”.
    • Full Month: include the full month name in which the case was added. For example, cases added in November will contain “November” in the case number.
    • Two-Digit Month: include a two-digit number to indicate the month in which the case was added, presented as the month's numerical order on the calendar year. For example, if the case was added in April, the two-digit month number will be “04”.
  • Year Format: choose how or if to indicate the year in which the case was created using one of the following options:
    • None: do not include the year in which the case was created to case numbers.
    • Two-Digit Year: include the last two digits of the year the case was created. For example, if a case is added in 2021, the two-digit year will be “21”.
    • Four-Digit Year: include all digits of the year the case was created. For example, cases added in 2021 will contain “2021” in the case number.
  • Sequence Period: set when the case number count will roll over or start the sequence again at 1 using one of the following options:
    • None: the count will never reset.
    • Calendar Year: reset the count on January 1 of each year. 
    • Fiscal Year: reset the count on the first day of the fiscal calendar, as set in the application options (see “Fiscal Year Start Month” in the Options article). For example, if the “Fiscal Year Start Month” field is set to April, the case number count will reset to 1 on April 1 of each year.
    • Fiscal Quarter: reset the count on the first day of each fiscal quarter based on the “Fiscal Year Start Month” set in your application (see “Fiscal Year Start Month” in the Options article). For example, if the “Fiscal Year Start Month” field is set to April, the case number count will reset to 1 on April 1, July 1, October 1, and January 1 of each year.

Duplicate Case Numbers

If you set a sequence period, it is recommended to include the year in your case number format to avoid duplicating case numbers when the count resets. However, if the system generates a number for a case that already exists in the application, the system will automatically append another number to the latest case to differentiate it, rather than entirely duplicating the case number. For example, if there are three cases that should be named “MAR-043” based on the case number format settings, the first, second, and third cases will be named “MAR-043”, “MAR-043(1)”, and “MAR-043(2)” respectively.

 
  • Minimum sequence size: choose the digit length of the case number count. Other case number components, such as the prefix, month, or year, will not be counted in the minimum sequence size. If the number of cases in the current case number sequence period is shorter than the digit minimum you set, the system will add zeros to the beginning of the case number count until it is the minimum sequence size. For example, if you set the minimum sequence size as “4”, the first case number count in the sequence will be “0001”. 
  • Use expression?: see details on creating a dynamic case number format using the “Use expression?” field in the next section of this article.

Create a Dynamic Case Number Format

To set up a dynamic case number format, set the "Use expression?" field on the Case Number page or the "caseNumberISELEnabled" row on the Options page as "Yes". You can enter your expression in: (1) the "Expression" field on the Case Number page or (2) the "caseNumberExpression" row on the Options page. An example expression will be in the “Expression” and "caseNumberExpression" fields before you enter anything. See the next section of this article, Dynamic Case Number Expression Example, for an explanation of the example expression.

The Case IQ Expression Language guide covers how to construct your own expressions. You can use any case field name tags that are available on case intake, meaning that the field is displayed on the New Case form, as variables in your expression. You can also refer to any case number component in expressions, so you can pull in the prefix, separator, month format, and more. To refer to case number components in expressions, use either the caseNumber or this object. For example, you would enter the following to refer to the prefix component as a variable in an expression: caseNumber.prefix or this.prefix. A full list of the field name tags you can use for case number components is available in the Case Number Field Name Tags table below.

If you change the value of a case's field that is used in the case number format's expression, the case number will not change. The case number will remain the same value as when the New Case form was submitted. For example, if the case number format is dependent on the "Case Type" field, a case's number will not change if you change the "Case Type" field for the case. 

Dynamic Case Number Expression Example

We have put together an expression for a common dynamic case number format use case, where the case number prefix will change depending on the “Case Type” field. If you would like to use this format in your application, copy the expression text below and paste it into the “expression” field on the Case Number or Options page. This expression will generate case numbers in the following format: 

CASETYPE-MM-YY-000

  • “CASETYPE”: the system will populate this element with one of the following prefixes, based on the case type selection:
    • COMP
    • INV
    • QUERY
    • OTHER
  • “-”: the character you enter in the "Separator" field will be used to separate each case number component.
  • “MM": the month the case is created using the format you select in the “Month Format” field.
  • “YY”: the year the case is created using the format you select in the “Year Format” field.
  • "000": the sequential case number count that the system generates based on the number of cases added to the application, counting up from 1. The length of the sequence will be determined by your selection in the “Minimum sequence size” field.

Enter this expression in the “Expression” field on the Case Number Configuration page:

case.caseType == "Complaint"
	? "COMP"
	: (case.caseType == "Investigation"
		? "INV"
		: (case.caseType == "Query"
			? "QUERY"
			: "OTHER"
		)
	))
	+
	this.separator
	+
	format(now, this.monthFormat)
	+
	this.separator
	+
	format(now, this.yearFormat)
	+
	this.separator
	+
	padStart(this.sequence, 3, "0")

In this example, the “Case Type” picklist contains four options: "Complaint", "Investigation", “Query”, and “Other”. You can change these in the expression to match the “Case Type” values in your application.

Case Number Field Name Tags

Case Number Component Field Name Tag
Prefix prefix
Separator separator
Month format monthFormat
Year format yearFormat
Sequence period sequence
Minimum sequence size sequenceMinSize