Free cookie consent management tool by TermsFeed

Setting Up Case Document Summary Module

On This Page

Introduction

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:

  1. Update the CMGT_Document_Create process model.
  2. Update the Submit Case process model.
  3. Update the CMGT_Task_Complete process model.
  4. Update the CMGT_Document_Delete process model.
  5. Update the CMGT_Case_RecordView_Documents interface.

Note:  These setup steps apply to Case Management Studio v1.7 and later. If you are setting up this module with Case Management Studio v1.6 or earlier, see Setting Up Case Document Summary Module.

Step 1: Update the CMGT_Document_Create process model

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:

  1. Log in to the target environment.
  2. Navigate to the Appian Designer.
  3. Navigate to the Case Management Studio Base application.
  4. Search for and open the CMGT_Document_Create process model.
    1. Add a subprocess node after the Track Metrics + Parse Docs node and name it Summarize with AI.

      cms_update_cmgt_document_create_process_model_01

      • Note: The incoming path should be chained, but the outgoing path should not be chained.
    2. In the new subprocess node, go to Properties.
      1. Navigate to the Setup tab:
        1. In the process model picker, select CMGT_DOC_AI_CaseDocumentSummary_Update.
        2. For the How Should this Process Run? option, select Synchronously.

          cms_update_cmgt_document_create_process_model_02

        3. In the document parameter, pass the pv!documents[tp!instanceindex].
    3. In the new subprocess node, go to Properties > Other and select the following settings:

      cms_case_doc_summary_other_tab_step_1

    4. Select the Automatically run multiple instances of this node checkbox.
    5. Select Run one instance for each item in and Documents in the dropdown.
      1. Select Spawn all.
    6. Select Run all instances at the same time.
      1. Select All instances are done to move on when done.
    7. Click OK.
  5. From the File menu, click Save & Publish, then Exit.

Step 2: Update the Submit Case process model

Next, you need to update the CMGT_SUB_SubmitCase_ParallelProcesses process model to generate a summary for a document added during case creation.

  1. Login to the target environment.
  2. Navigate to the Appian Designer.
  3. Navigate to the Case Management Studio Base application.
  4. Search for and open the CMGT_SUB_SubmitCase_ParallelProcesses process model
  5. After the Store Documents node, add a subprocess node and name it Summarize Docs with AI.

    cms_update_the_submit_case_process_model

  6. In the new subprocess node, go to Properties.
  7. Navigate to the Setup tab and select the following settings:

    cms_case_doc_summary_setup_tab_step_2.png

    • In the Subprocess Setup section:
      • Select Asynchronously.
    • In the Run this process model section:
      • Select CMGT_DOC_AI_CaseDocumentSummary_Update as the process to run.
    • 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
      
        =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,
        local!documents[tp!instanceindex]
        )
        )
      
      • Note: You can ignore the documentId variable.
  8. In the Properties of the new subprocess node, navigate to the Other tab and select the following settings:

    cms_case_doc_summary_other_tab_step_2

    • Select the Automatically run multiple instances of this node checkbox.
    • Select Run this many and click the adjacent icon link to open the Expression Editor.
    • 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)
        )
      
      • Select All instances are done to move on when done.
  9. Click OK.
  10. From the File menu, click Save & Publish, then Exit.

Step 3: Update the CMGT_Task_Complete process model

For this step, you must update the CMGT_Task_Complete process model to generate a summary for a document uploaded to a task.

  1. Login to the target environment.
  2. Navigate to the Appian Designer.
  3. Navigate to the Case Management Studio Base application.
  4. Search for and open the CMGT_Task_Complete process model.
  5. After the Join Flows node, add a subprocess node and name it Summarize Docs with AI.

    cms_cmgt_task_complete_ai_summarize_docs

    • Note: The incoming path should be chained, but the outgoing path should not be chained.
  6. In the new subprocess node, go to Properties.
  7. Navigate to the Setup tab and select the following settings:

    cms_case_doc_summary_setup_tab_step_3.png

    • In the Subprocess Setup section:
      • Select Asynchronously.
      • Select CMGT_DOC_AI_CaseDocumentSummary_Update as the process to run.
    • 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
      
      = a!map(
      document: a!flatten(
      pv!tasks['recordType!{ee5aa46d-0228-430f-a794-1134a11fbcc0}CMGT_Task.relationships.{bf3a1217-449b-4c06-919b-17b69b7be94d}documents']
      )[tp!instanceindex]
      )
      

      cms_update_cmgt_document_create_process_model_03

      • Note: You can ignore the documentId variable.
  8. In the Properties of the new subprocess node, navigate to the Other tab and select the following settings:

    cms_configure_ai_summarize_doc_subprocess

    • Select the Automatically run multiple instances of this node checkbox.
    • Select Run this many and click the adjacent icon link to open the Expression Editor.
    • 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']
      )
      )
      
  9. Select All instances are done to move on when done.
  10. Click OK.
  11. From the File menu, click Save & Publish, then Exit.

Step 4: Update the CMGT_Document_Delete process model

For this step, you need to update the process model to automatically delete the document summary associated with a deleted document.

  1. Login to the target environment.
  2. Navigate to the Appian Designer.
  3. Navigate to the Case Management Studio Base application.
  4. Search for and open the CMGT_Document_Delete process model.
  5. After the Set Inactive node and before the XOR node, add a Delete Records node.
    • Note: Make sure the incoming path and outgoing path are chained.

    cms_add_a_delete_record_node

  6. In the new node, go to Properties.
    1. Navigate to the Data tab, and select the Records node input.
      1. In the Field Properties box, click into the Expression Editor, and using CMGT_DOC_AI_QR_GetDocumentSummary, query the summary of the documents that are being deleted by passing in the pv documents documentId, as shown:

        cms_update_cmgt_document_delete_process_model

        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"
        )
        
      • Note: The code snippet uses CMGT_DOC_AI_QR_GetDocumentSummary to query for the document summaries of the documents that are being deleted.
      1. Click OK.
  7. From the File menu, click Save & Publish, then Exit.

Step 5: Update the CMGT_Case_RecordView_Documents interface

Finally, you need to update the CMGT_Case_RecordView_Documents interface to display document summaries on the Document tab.

  1. Login to the target environment.
  2. Navigate to the Appian Designer.
  3. Navigate to the Case Management Studio Base application.
  4. Search for and open the CMGT_Case_RecordView_Documents interface.
  5. In expression mode, find the section layout that contains CMGT_UTIL_DocumentViewer.
  6. In the contents of the section layout, paste the following code snippet directly above CMGT_UTIL_DocumentViewer as shown.

    cms_view_ai_generated_doc_summary

    1
    2
    3
    4
    
       rule!CMGT_DOC_AI_CaseDocumentsSummary_Display(
       brandingMap: local!brandingMap,
       selectedDocument: local!selectedDocument
       ),
    
  7. Click SAVE.

Next step

Now that you have set up the Case Document Summary module, you can leverage AI to generate a summary of PDF documents uploaded to your cases.

Feedback