Discussion

Pegasystems Inc.
JP
Last activity: 19 May 2025 4:17 EDT
Case management Tips: assign same operator to cases originating from same customer
Business requirement:
Main Order, the first order comes from a new customer, should wait for tirage (i.e. an operator is assigned to process the order). Once a Main Order is triaged, all following Orders that come from the same customer should be assigned to the same operator who processed the Main Order.
Design considerations:
Case volume is very high, 5 million cases/year.
Given 10 cases, at least 2 of them are Related Cases originating from the same customer.
Parent (Customer), Child (Order request) case structure is a strait forward solution but consume more cases.
Solution for Triage workflow:
If a new Order comes in,
- Test if it is the Main Order from a new customer.
- if yes, route the case to Triage Work Basket1 (Triage Assign).
- otherwise, get a list of Related Cases originating from the same customer
- Loop over the list of Related Cases and see if there is a case which has been assigned to an operator (Case Owner)
- If Case Owner exists, route the new case to the Case Owner, otherwise route the case to Tirage Work Basket2.
- Operators Get Next Work from Triage Work Basket1.
- On complete of Triage Assign, system automatically resume Triage Flow for Related Cases which are waiting in Tirage Work Basket2.
Below is the image of the above Triage workflow.
Design Details:
Class Name |
Rule Type |
Rule Name/purpose |
Description |
{Case} |
Property |
CustomerID |
Customer ID |
{Case} |
Property |
pyOwnerUserID |
Case owner. This is OOTB property. |
|
Work queue |
TirageWB1 |
Work basket for Triage Assign of brand-new request. |
|
Work queue |
TriageWB2 |
Work basket for Triage Assign of repeating request. |
{Case} |
Flow |
Triage_1 |
Main triage workflow |
{Case} |
Data Transform |
SetupCaseInfo4Triage |
Run the 1st part of the logic described in the Solution section. |
{Case} |
When |
IsMainOrder |
Return true if the case is a Main Order. |
|
Data Page |
D_MySubCasesByCustomer |
A list of Related cases filtered by the same customer id. |
{Case} |
Report Definition |
ListCasesByCustomer |
Source the above data page. |
{Case} |
When |
IsOwnerUserExist |
Return true if the case owner exists. |
{Case} |
Flow Action |
差配_1 (Triage) |
Complete Triage Assign. |
{Case} |
Data Transform |
SetCaseOwnerUserID |
Set Case Owner as the current Operator. Post data transform of Triage flow action. |
{Case} |
Activity |
ReAssignCasesFromSameClient |
Run the 3rd part of the logic described in the Solution section. |
{Case} |
Activity |
ReAssignToCaseOwner |
Reassign the case to the operator specified in CaseOwnerID parameter. |
{Case} |
Activity |
ResumeTriageFlow |
Perform Triage flow action automatically. |
{Case} |
Activity |
AssociateMainOrderCase |
Associate related cases to the main (initial) case. |
{Case} |
SLA |
SLA_TriageAssign |
Define SLA for Triage Assign. |
Implementation points:
CustomerID: must be exposed (i.e. optimized for reporting).
pyOwnerUserID: must be exposed (i.e. optimized for reporting).
Triage_1: “Use business logic” for “Triage Assign” routing, so you don’t have to place 2 Triage assigns in the flow.
SetupCaseInfo4Triage: keep IsMainOrder evaluation result in a property to reduce db access and unnecessary recalculation…keep MainOrderCaseKey in a property for the same reason.
IsMainOrder: use previous evaluation result first (short-circuit)
ListCasesByCustomer: make sure the oldest case comes to the top of the search results.
SetCaseOwnerUserID: do nothing if Case Owner already exist… for Rleated Cases in Triage Work Basket2 will have Case Owner already being set at the moment of Triage flow action automatically performed in back ground by queue processor.
ReAssignCasesFromSameClient: skip the current case (Main Order) and only take care of those Relate Cases which have not been triaged yet.
ReAssignToCaseOwner: Save (And Continue) Related Case before queuing job…
for better performance, use dedicated queue processor instead of Standard QP.
ResumeTriageFlow: open Triage assign in “newAssignPage” before performing flow action.
You can call “Reassign” instead of “peformFlowAction” if you want to stay at the Triage Assign.
Parameters for calling performFlowAction…Check “skipFindAssignment”, “skipLockCheckAndTimings”, “validateActionName”
AssociateMainOrderCase: do not Commit the transaction… let “Triage Flow” take care of the transaction.