Set default state for summary and utility panels

What is it?

The summary tabs panel and utility panel are Constellation’s default way to show additional information pertaining to the case and useful widgets, respectively. These panels can be collapsed and expanded by the user based on their preference.

Default experience

By default, Pega remembers the state the user selected for these panels. Regardless of case context or whether they log out and back in. When the user logs back in, their previous setting will be remembered.

Configuring this experience

There is no App Studio friendly way of configuring this behavior, for example to set the summary panel tab as always collapsed. However, some clients requests this functionality for their applications. So - how can it be done?

When a user clicks on the buttons to expand or callapse these panels, Pega makes a call to the OOTB DX API endpoint /user_settings.

Below is the request that is sent when a user collapses the summary panel tab:

Since this is an OOTB DX API, this means we can find out which Automation that runs when said API is called, as well as the request body we need to send. The automation that runs in /user_settings is pzSetUserSettings. It exposes 1 parameter “content”, wherein you would send the JSON in the format we see in the network trace:

{
  "patchPreference": "string",
  "presentation": {
    "templates": {
      "CaseView": {
        "summaryPanelExpanded": false,
        "utilityPanelExpanded": true
      }
    }
  }
}

The above is also documented OOTB in the Pega API help page:

To make the summary and widget panels collapsed or expanded by default, always, we can call pzSetUserSettings from a post-authentication activity and set its “content” parameter to an escaped version of the JSON request body provided above.

Steps:

  1. Private edit the when rule “@baseclass.IsAPegaDeveloper” and set to true. This is needed to surface the automation we need in the activity.
  2. Create a post-authentication activity
  3. Add a Call-Automation step and select Pega-API-UserSettings | Set user settings
  4. Add the JSON above with your desired state values in the “content” parameter. Make sure it is escaped and has surrounding quotes.
  5. Don’t forget to set the authentication policy result as always in post-authentication activities.

Reference activity:

Done! The next time users log in, the state of their panels will be set to whatever state you set in the JSON “content” parameter.

Use wisely: caution advised

In closing, however, an important point needs to be made: This should not be used lightly. The default behavior where Pega remembers the user’s choice is most often the better UX. It can be confusing for end users if their choice is always reset after logging out and back in again. So - use it with care :slight_smile:

Enjoyed this article?

See suggested articles from our Constellation 101 series and view all our Knowledge Shares from our User Experience Expert Circle.

1 Like

Thanks for the contribution @LantzAndreas - I’ve added it to the Constellation 101 so it can be found with other useful Constellation articles.

You’re right to call out the caution; just because you can, doesn’t mean you should :slight_smile: The downside to this, is you are hardcoding that experience. The system would no longer remember your user preference between logins, it would always be collapsed/expanded.

From a UX perspective it would seem better:

  • Ensure your Change Management / Go Live activities include training on this feature - users can decide on their preferred view of Summary Panel (left) and Utilities (right)

  • Create a simplified view for more occasional users, so they are not overwhelmed by all this detail (that they probably don’t need)

1 Like

Can you please share more details on post-authentication activity? is it OOTB activity or new activity if new activity is there any place to plug-in ?

@VenkateswararaoK Just a normal post-auth activity that you add to the auth service rule. If you already have one defined, you can plug this part in no problem. Or create a new one similar to the one in my screenshot.