Conversation

Visualizing data from class group
Enjoyed this article? See more similar articles in Constellation 101 series.
In Pega, a Class Group serves as a mechanism to organize related work classes (case types) so they can share a common database table. By designating a parent class as a class group (e.g., MyApp-Work), multiple child classes (e.g., MyApp-Work-Claim, MyApp-Work-Request) can be associated with it, allowing all instances of these classes to be stored in the same table, such as pc_myapp_work.
This setup promotes efficient data management, simplifies reporting, and facilitates rule reuse through inheritance. Classes that "belong to a class group" inherit properties and behaviors from the parent class, streamlining application development and maintenance.
In Pega, a Class Group serves as a mechanism to organize related work classes (case types) so they can share a common database table. By designating a parent class as a class group (e.g., MyApp-Work), multiple child classes (e.g., MyApp-Work-Claim, MyApp-Work-Request) can be associated with it, allowing all instances of these classes to be stored in the same table, such as pc_myapp_work.
This setup promotes efficient data management, simplifies reporting, and facilitates rule reuse through inheritance. Classes that "belong to a class group" inherit properties and behaviors from the parent class, streamlining application development and maintenance.
Business use cases:
- Insurance Company – Unified Claims Handling - An insurance firm processes Auto, Home, and Health claims, each with different workflows but shared reporting and audit requirements.
- Customer Service Operations - A bank handles various customer support requests: lost cards, dispute transactions, address changes.
- Healthcare Provider – Patient Interaction System - A healthcare network wants to manage different types of patient cases: appointments, lab test results, and feedback.
- Government Agency – Permit and License Management - A local government wants to digitize and streamline permit applications (building, business, signage).
Benefits of Class group
- All cases are stored in a single table for easy reporting.
- Shared rules like validations, SLAs, and service level escalations are reused across case types.
- Simplifies approval routing through shared logic.
- Shared audit trail and citizen communication process.
Problem Statement:
In a customer service application:
- The manager should be able to see all the intents (cases) on a landing page.
- During a follow-up case processing, the agent should review all previous interactions (cases) with the customer and determine for which interactions the follow-up is scheduled.
Note: Cases are referred as Intents in customer service applications. Same terminology will be used throughout this document.
Data model setup
(Class structure in the sample app used in this document)
All the interaction cases in a customer service application are stored in the class group, by default. In case you are using a different strategic application or core Pega platform, you need to ensure all the relevant case types are part of the class group.
Solution
A – Configuring a ready only list
- Configure a Data page on the class group – D_GetAllIntents which is sourced from a Report Definition with “Report on descendant class instances” enabled. Ensure to fetch all the relevant columns.
2. Now add a new landing page in the channel sourced from this DPage.
We can enable case link using the Case ID property.
3. You can now add this Landing Page to the menu and preview it.
4. Similarly, you can use a list view to configure a read only list of intents during case processing.
Note: You cannot use a case reference property in this case, as that will only allow us to list a specific case type.
B – Configuring a multi select list
- We need to create a bridge data object which will not store any information. It will just help us in displaying the data properly. For this example- we will create a data object namely – WorkPool.
- Add the fields inside the Class group data object based on what you would want to show on the multi select view.
3. Configure the D_WorkPoolList to fetch all the cases from the class group via a DT. You can reuse the Data Page we created for scenario A. Now map these fields to the relevant fields in the data object.
4. Similarly configure the D_WorkPool to fetch a single case record based on the custom key which will be CaseID in this case.
Ensure the alternate key storage option is configured properly for the data page.
Note: To fetch a single case record, you can either parametrize D_GetAllIntents or create a new lookup data page.
5. Once the DPages are configured, create a data reference field in the follow up case on WorkPool data object. Add the field to your view and you will be able to view the multi select list.
Note: Mark CaseID property (in @baseclass) as relevant, to add it to the view.
6. If required, you can also copy this reference data on your case and show them in the case details section.
Enabling link on Case ID
Since the source class is still a data reference and not case reference, you cannot directly use the case id as url as we did in scenario A.
To enable the case url
1. add a url field in the data object.
2. While mapping the records, we need to create the url based on pzinskey and for label we can use case ID.
Sample URL - https://labinstance/prweb/app/my-bank-cs/cases/O1CMZU-MYBANKCS-WORK-GRP1%20S-13009?portal=InteractionPortal
Note: In non-customer service applications, the portal will WebPortal. To get the correct link, open any case type and check the link formed by the browser.
Ensure the URL mapping is done in both List and lookup DPage
3. Now add the property in the view as shown below:
4. You can now open the case from the list view.
Note: Marking any field in the list as “Linked to Object” will enable the preview functionality as well. But keep in mind that the object is the data class here not the case.
Summary
In summary, class group data can be visualized in multiple ways tailored to your specific requirements. This flexibility enables you to fully leverage the advantages that class groups offer.