After installing the Case Document Summary module, you need to set it up before using it with the Case Management Studio Base application. This guide walks you through the setup steps, which include:
To set up the Case Document Summary module with Case Management Studio you need to first update the process model to automate the creation of a document summary when a document is uploaded to a case.
To update the process model:
Summarize with AI
.
Navigate to the Setup tab and select the following settings:
In the Input Variables section, click the Expression Editor for the document variable and paste the following code snippet.
1
pv!documents[tp!instanceindex]
In the new subprocess node, go to Properties > Other and select the following settings:
Select All instances are done to move on when done.
Next, you need to update the Submit Case process model to generate a summary for a document added during case creation.
Summarize Docs with AI
.Navigate to the Setup tab and select the following settings:
In the Input Variables section, click into the Expression Editor for the document variable and paste the following code snippet:
1
2
3
4
5
6
7
8
9
a!localVariables(
local!documents: pv!case['recordType!{d81cdd0e-c54d-4b8e-beec-b7ae37fefe7f}CMGT_Case.relationships.{341720e1-0b79-4f0c-ac48-789ee3fbeae3}documents'],
if(
a!isNullOrEmpty(local!documents),
local!documents,
/*can't index if the documents is null*/
local!documents[tp!instanceindex]
)
)
In the Properties of the new subprocess node, navigate to the Other tab and select the following settings:
Paste the following code snippet:
1
2
3
4
5
6
a!localVariables(
local!count: count(
pv!case['recordType!{d81cdd0e-c54d-4b8e-beec-b7ae37fefe7f}CMGT_Case.relationships.{341720e1-0b79-4f0c-ac48-789ee3fbeae3}documents']
),
/*the model errors out if the count is zero*/if(tointeger(local!count) = 0, 1, local!count)
)
For this step, you must update the CMGT_Task_Complete process model to generate a summary for a document uploaded to a task.
Summarize Docs with AI
.
Navigate to the Setup tab and select the following settings:
In the Input Variables section, click into the Expression Editor for the document variable and paste the following code snippet:
1
2
a!flatten( pv!tasks['recordType!{ee5aa46d-0228-430f-a794-1134a11fbcc0}CMGT_Task.relationships.{bf3a1217-449b-4c06-919b-17b69b7be94d}documents']
)[tp!instanceindex]
In the Properties of the new subprocess node, navigate to the Other tab and select the following settings:
Paste the following code snippet:
1
2
3
4
5
count(
a!flatten(
pv!tasks['recordType!{ee5aa46d-0228-430f-a794-1134a11fbcc0}CMGT_Task.relationships.{bf3a1217-449b-4c06-919b-17b69b7be94d}documents']
)
)
For this step, you need to update the process model to automatically delete the document summary associated with a deleted document.
In the Field Properties box, click into the Expression Editor for the value, and paste the following code snippet.
1
2
3
4
rule!CMGT_DOC_AI_QR_GetDocumentSummary(
documentId: pv!documents['recordType!{4fcbf8d2-f6f9-4a38-bbf1-d2722635282a}CMGT_Document.fields.{11173308-3bb1-43ad-b63a-4ff680227037}documentId'],
returnType: "SINGLE_OBJECT"
)
Finally, you need to update the CMGT_Case_RecordView_Documents interface to display document summaries on the Document tab.
In the contents of the section layout, paste the following code snippet directly above CMGT_UTIL_DocumentViewer as shown.
1
2
3
4
rule!CMGT_DOC_AI_CaseDocumentsSummary_Display(
brandingMap: local!brandingMap,
selectedDocument: local!selectedDocument
),
Setting Up Case Document Summary Module