Case Item Details

Introduction

The Case Item Details customization allows you to configure which widgets appear on the case details page and how they are arranged. Portal provides built-in widgets for case information, documents, related tasks, histories, and business details, plus the ability to add custom panels at multiple insertion points.

Each CaseItemDetails contains

  • CaseItemSummary 1

  • CaseItemGeneralInformation 2

  • CaseItemDocument 3

  • CaseItemRelatedCases 4

  • CaseItemRelatedTasks 5

  • CaseItemHistories 6

  • CaseItemBusinessDetails

  • Case Details custom panel: caseItemDetailCustomTop, caseItemDetailCustomMiddle, caseItemDetailCustomBottom

case-standard-1

case-standard-2

Important

All visible widgets are configured in variable Portal.CaseDetails

How to Configure Widgets in Case Details

  • Settings of all visible widgets on the Case Details page are saved in the variable Portal.CaseDetails.

  • In the Engine Cockpit, an administrator can configure widgets in the variable Portal.CaseDetails on the Settings page. edit-variable-portal-case-details

  • The variable’s value is a wrapper object: version identifies the format of the JSON collection itself, and items holds the list of case detail layouts. This wrapper-level version is what Portal reads (and migrates) on import - individual layouts do not carry their own version field.

Important

How Portal picks which layout to display - this determines whether a change to this variable has any visible effect at all:

  1. If the current user has ever clicked Edit Layout on this page and saved (or was previously in edit mode when a save was triggered), Portal uses that user’s own saved layout and ignores this variable entirely for that user, indefinitely. The Reset button on this page does not clear this saved layout - it only discards unsaved changes made during the current edit session. There is currently no supported way to clear a user’s saved layout from the UI. If a change to this variable appears to have no effect, check first whether the user you are testing with has ever saved a layout edit on this page.

  2. Otherwise, Portal scans the items list for an entry whose filters match the current case (by categories or states) and uses the first match.

  3. If no entry’s filters match, Portal falls back to the entry whose id is exactly "default-case-detail" (case-sensitive). An entry with any other ``id`` and no matching ``filters`` will never be displayed - this is a common mistake when adapting the examples below.

  4. If no entry has that exact id either, Portal falls back to its own built-in default layout (the 6-widget layout shown below), silently ignoring everything you configured.

  • The default configuration includes six widgets:

    {
      "version": "14.0.0",
      "items": [
       {
          "id": "default-case-detail",
          "widgets": [
             {
                "type": "summary",
                "id": "summary",
                "layout": {
                   "w": 6,
                   "h": 12,
                   "x": 0,
                   "y": 0
                }
             },
             {
                "type": "information",
                "id": "information",
                "layout": {
                   "w": 6,
                   "h": 28,
                   "x": 0,
                   "y": 12
                }
             },
             {
                "type": "document",
                "id": "document",
                "layout": {
                   "w": 6,
                   "h": 40,
                   "x": 6,
                   "y": 0
                }
             },
             {
                "type": "technicalCase",
                "id": "technicalCase",
                "layout": {
                   "w": 12,
                   "h": 30,
                   "x": 0,
                   "y": 40
                }
             },
             {
                "type": "relatedTask",
                "id": "relatedTask",
                "layout": {
                   "w": 12,
                   "h": 30,
                   "x": 0,
                   "y": 70
                }
             },
             {
                "type": "history",
                "id": "history",
                "layout": {
                   "w": 12,
                   "h": 30,
                   "x": 0,
                   "y": 100
                }
             }
          ]
       }
    ]
    }
    
    • The structure of each Case Details layout is saved in variable Portal.CaseDetails:

      id: ID of layout.

      widgets: definition of widgets in layout.

      filters: conditions to determine which cases are eligible to use the layout. There are two types of case filters:

      • categories (case categories)

      • states (case business states).

        Refer to Case business states for available case business states.

    • The structure of each widget inside the case details layout is stored in variable Portal.CaseDetails:

      id: ID of widget.

      type: type of widget, there are 8 types: - summary - information - document - technicalCase - businessDetails - relatedTask - history - custom.

      layout: defines the UI styling of the widget.

      x: column index. HTML DOM Style left is computed as x / 12 * 100%.

      y: row index. HTML DOM Style top is computed as y * 20px.

      w: width in columns. HTML DOM Style width is computed as w / 12 * 100%.

      h: height in rows. HTML DOM Style height is computed as h * 20px.

      The grid is 12 columns wide and one row is 20 pixels high. Each widget is then inset by 10 pixels on every side, so two neighbours end up 20 pixels apart.

      styleClass (optional): add CSS Classes to HTML DOM.

      style (optional): add inline style to HTML DOM.

      data (for custom widget): data for custom widget, refer to Show custom widgets

    Important

    • Do not change type and id of widgets.

    • You can change x, y, w and h to update size and position of widgets.

    • x, y, w and h have to be integers.

    • x + w must not be larger than 12.

    • We support all case business states in filter type states.

    • The built-in widget type businessDetails is not part of the default configuration and will only be displayed if the 🔑ShowCaseDetails permission is granted.

    • The summary widget contains the case actions, ID, state and category. Add it to your layouts when upgrading to 14.0.0.

Show custom widgets

For the custom widget, we have a new node is data inside of case details widget. The structure of data on each custom widget will be:

  • type: type of custom widget panel, there are 3 types: caseItemDetailCustomTop, caseItemDetailCustomMiddle, caseItemDetailCustomBottom.

  • url: URL for external website

  • processPath: the user-friendly request path of the Ivy process which will be displayed in custom widget

  • params: parameters for the Ivy process above, each parameter can be defined as follows:

    • Key name that will be the parameter name for the Ivy process above. Note: don’t use caseId.

    • The key value for the case has to start with case.. Supported are three values: case.id, case.uuid, case.category.

    • Key value for case custom fields: must start with case.customFields., followed by custom field name.

    • Other key values will be treated as a hard coded value.

Tip

To quickly understand how the JSON of custom case details looks like.

  • Refer to variables.Portal.CaseDetails.json file in portal-developer-examples/resources/files project.

  • Copy to the corresponding application folder located in the engine.

    • e.g: <engine>/configuration/applications/<application>.

  • Create some destroyed case or start the process Start Processes/CaseDetailsCustomWidgetExample/CreateEventTest.ivp in portal-developer-examples project.

  • Go to the homepage.

  • And then go to case details to check the new custom layout.

About how to configure Variables, refer to Axon Ivy Variables

Adding New Custom Panels

The following two steps are necessary to add new custom panels:

  1. The Engine Administrator has to configure the variable Portal.CaseDetails on the Cockpit Page to add custom widgets.

    • This is an example Portal.CaseDetails configuration that includes three custom widgets:

      {
        "version": "14.0.0",
        "items": [
         {
            "id": "default-case-detail",
            "widgets": [
               {
                  "type": "summary",
                  "id": "summary",
                  "layout": {
                     "w": 6,
                     "h": 12,
                     "x": 0,
                     "y": 0
                  }
               },
               {
                  "type": "information",
                  "id": "information",
                  "layout": {
                     "w": 6,
                     "h": 28,
                     "x": 0,
                     "y": 12
                  }
               },
               {
                  "type": "document",
                  "id": "document",
                  "layout": {
                     "w": 6,
                     "h": 40,
                     "x": 6,
                     "y": 0
                  }
               },
               {
                  "type": "history",
                  "id": "history",
                  "layout": {
                     "w": 12,
                     "h": 30,
                     "x": 0,
                     "y": 40
                  }
               },
               {
                  "type": "custom",
                  "id": "customTop",
                  "layout": {
                     "x": 0,
                     "y": 70,
                     "w": 12,
                     "h": 30
                  },
                  "data": {
                     "type": "caseItemDetailCustomTop"
                  }
               },
               {
                  "type": "custom",
                  "id": "customMiddle",
                  "layout": {
                     "x": 0,
                     "y": 100,
                     "w": 12,
                     "h": 30
                  },
                  "data": {
                     "type": "caseItemDetailCustomMiddle"
                  }
               },
               {
                  "type": "custom",
                  "id": "customBottom",
                  "layout": {
                     "x": 0,
                     "y": 130,
                     "w": 12,
                     "h": 30
                  },
                  "data": {
                     "type": "caseItemDetailCustomBottom"
                  }
               }
            ]
         }
      ]
      }
      
  2. To customize case details using an IFrame, you have to define one of the following two input parameters in the data node:

    • url if you want to use an external URL.

    • processPath if you want to use an Ivy process start. You may predefine parameters for the process by adding params to the data node.

      Important

      Use only one of processPath or url.

      Here is an example of a customized case details page using an external URL:

      {
        "version": "14.0.0",
        "items": [
         {
            "id": "default-case-detail",
            "widgets": [
               {
               "type": "summary",
               "id": "summary",
               "layout": {
                  "x": 0,
                  "y": 0,
                  "w": 6,
                  "h": 12
               }
               },
               {
               "type": "information",
               "id": "information",
               "layout": {
                  "x": 0,
                  "y": 12,
                  "w": 6,
                  "h": 28
               }
               },
               {
               "type": "custom",
               "id": "customURL",
               "layout": {
                  "x": 6,
                  "y": 0,
                  "w": 6,
                  "h": 40
               },
               "data": {
                  "url": "https://www.lucide.dev/"
               }
               }
            ]
         }
      ]
      }
      

      Result:

      case-customized-iframe-url

      The following example shows a customized case details page using an ivy process start. Please refer to the CaseDetailsCustomWidgetExample process in portal-developer-examples for details.

      {
        "version": "14.0.0",
        "items": [
         {
            "id": "default-case-detail",
            "widgets": [
               {
                  "type": "summary",
                  "id": "summary",
                  "layout": {
                     "x": 0,
                     "y": 0,
                     "w": 6,
                     "h": 12
               }
               },
               {
                  "type": "information",
                  "id": "information",
                  "layout": {
                     "x": 0,
                     "y": 12,
                     "w": 6,
                     "h": 28
               }
               },
               {
                  "type": "history",
                  "id": "history",
                  "layout": {
                     "x": 6,
                     "y": 0,
                     "w": 6,
                     "h": 40
               }
               },
               {
               "type": "custom",
               "id": "customIvyProcess",
               "layout": {
                  "x": 0,
                  "y": 30,
                  "w": 12,
                  "h": 40
               },
               "data": {
                  "processPath": "Start Processes/CaseDetailsCustomWidgetExample/startReview.ivp",
                  "params": {
                     "startedCaseId": "case.id",
                     "startedCaseCategory": "case.category",
                     "investmentId": "1573111",
                     "investmentDescription": "case.customFields.investmentDescription"
                  }
               }
               }
            ]
         }
      ]
      }
      

      Provide case custom fields:

      case-customized-iframe-process-custom-field

      Map parameters to process data:

      case-customized-iframe-process-input-mapping

      Result:

      case-customized-iframe-process