Case Type States Field Type

Description:
The case_type_states field type is used to capture case state information from predefined state options. It allows users to select the current state of a case from a list of available states defined for the case type. This field type ensures consistent state management and workflow tracking within your application.

Elasticsearch Mapping: keyword (indexed)


YAML Definition

- name: status
  type: case_type_states
  display_name: "Case Status"
  guidance: "Select the current status of this case."
  required: true
  readonly: false
  hidden: false
  default_value: ""

Attributes

  • name (string): Required.
    The unique identifier for the field.

  • type (string): Required.
    Must be set to case_type_states for case type states fields.

  • display_name (string): Optional.
    The label displayed in the user interface. If not provided, a formatted version of name is used.

  • guidance (string): Optional.
    Help text or instructions for the field, assisting users in understanding what state to select.

  • required (boolean): Optional.
    If true, a state must be selected before submission. Default: false.

  • readonly (boolean): Optional.
    If true, the field is read-only and cannot be edited by the user. Default: false.

  • hidden (boolean): Optional.
    If true, the field is hidden from the user interface. Default: false.

  • default_value (string): Optional.
    The default state value displayed when the form is first loaded.


Examples

Basic Case State Field:

- name: status
  type: case_type_states
  display_name: "Case Status"
  guidance: "Select the current status of this case"
  required: true
  default_value: "Open"

Readonly Case State Field:

- name: current_state
  type: case_type_states
  display_name: "Current State"
  readonly: true
  default_value: "In Progress"

Optional Case State Field:

- name: workflow_status
  type: case_type_states
  display_name: "Workflow Status"
  guidance: "Optional: Update the workflow status"
  required: false
  default_value: ""

Usage Notes

  • State Options:
    • Available states are defined at the case type level.
    • States are typically configured in the case type definition.
    • Common states include: “Open”, “In Progress”, “Pending”, “Resolved”, “Closed”.
  • Default Values:
    • Use default_value to set the initial state when creating new cases.
    • Common defaults include “Open” for new cases or “Draft” for work-in-progress.
  • Required Fields:
    • Set required: true for essential state tracking.
    • Ensures that all cases have a defined state.
  • Readonly Fields:
    • Use readonly for system-managed states.
    • Common for states that are automatically set by workflows or processes.
  • State Transitions:
    • State changes may be controlled by workflow rules.
    • Some states may only be accessible from certain previous states.
    • Consider business logic for state transitions.
  • Use Cases:
    • Case Management: Tracking the progress of cases through workflows.
    • Support Tickets: Status tracking for customer support requests.
    • Project Management: Phase tracking for project milestones.
    • Approval Processes: Status tracking for approval workflows.
    • Incident Management: Status tracking for incident resolution.
  • Workflow Integration:
    • Case type states are often integrated with workflow engines.
    • State changes can trigger automated actions or notifications.
    • Consider the relationship between states and business processes.
  • Data Consistency:
    • State values are standardized across the case type.
    • Ensures consistent reporting and filtering.
    • Supports audit trails and history tracking.
  • User Experience:
    • Provide clear guidance on what each state represents.
    • Consider using color coding or icons for different states.
    • Ensure that state options are meaningful to users.
  • Reporting and Analytics:
    • State fields are commonly used for reporting and analytics.
    • Support filtering and grouping by state.
    • Enable tracking of case progression and bottlenecks.

By incorporating the case_type_states field type into your schema, you ensure consistent and reliable state management for cases, which is essential for workflow tracking and process management within your application.


Copyright © 2025 Caseblocks Limited.