Free cookie consent management tool by TermsFeed

Set Up Case Creation via Email Module

On This Page

Introduction

After installing the Case Creation via Email 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, including:

Step 1: Set up the email poller

The Case Creation via Email module needs to connect to a Microsoft email account in order to pull in incoming emails to the triage experience. Follow the steps below for each desired environment (Dev, Test, Production, etc.) to create a new Microsoft email account and share its credentials with Appian.

Create an account

To create an inbox for inbound email polling:

  1. Navigate to Microsoft Azure and create a new account in Azure AD with the desired username that matches the desired email address.
    • Note: A global admin may be required to do this.
  2. Navigate back to Microsoft Azure and log in with your new account.
  3. In the Search field, enter App Registrations and follow the instructions to create a new registration.
  4. Once the application is created, navigate to the API permissions page.
    1. Select + Add a permission.
      1. Select Microsoft Graph.
      2. Select Application Permissions.
      3. Select Mail.ReadWrite.
    2. Add permission.
  5. Navigate back to the API permissions page.
    1. Select Grant Admin Consent for Appian.
      • Note: A global admin may be required to do this.
  6. Navigate to the Certificates & Secrets page.
    1. Select + New Client Secret.
      1. Add a description and select an expiration.
      2. Save the Value for your records.
        • Note: This value will be input as secret in Appian Third-Party Credentials.

Appian polling configurations

  1. Log in to the desired Appian environment.
  2. Navigate to the Admin Console.
    1. Click IMPORT > UPLOAD and choose the CaseCreationViaEmailv2.1.0-AdminConsole.zip file that was downloaded in step 1 of the Case Creation via Email Installation Guide.
    2. Select Include related import customization file.
    3. Click UPLOAD.
    4. Select the CaseCreationViaEmailv2.1.0-AdminConsole.properties file that was downloaded in step 1 of the Case Creation via Email Installation Guide.

      cms_import_settings

    5. Click INSPECT to ensure that there will be no complications on import.
    6. Click IMPORT and review the import results to ensure there are no errors.
  3. Navigate to Third-Party Credentials in the Admin Console and verify the item labeled cmgt-mail-poller-msgraph exists.
    1. Click cmgt-mail-poller-msgraph and provide the Azure secret, tenet, and applicationID configured when enabling a polling inbox.
      • Note: Do not modify customMailPollerTableName and customMailPollerDocTableName unless you intend to modify the Appian Poller table names (not recommended).
    2. Click SAVE.
  4. Navigate to Appian Designer and use the global search to find and open the CMGT_EML_TRI_MAILBOX_EMAIL_ADDRESS constant.
    1. Update this constant to match the full email address that will be polled (i.e., test@microsoft.com).

      cms_constant_properties

    2. Click SAVE.

  5. Navigate back to Appian Designer and use global search to find and open the CMGT_EML_TRI_ENABLE_MAIL_POLLER constant.
    1. Set the Value to True if not set already.
      • Note: Use this constant when you want to turn poller operations on or off.

      cms_poller_value_true

For additional support on the Microsoft Email Poller, visit the MSGraph Email Poller on Appian Community.

Step 2: Surface the Triage Emails page

After setting up the email poller, you need to surface the Triage Emails page in Case Management Studio. This will allow case managers to see incoming emails and triage them accordingly. The Triage Emails page can be accessed in one of two ways:

  1. As a page within a page group on the Workspace site.
  2. As a standalone site.

Both options restrict the Triage Emails page to case managers by default. For the standalone site option, no additional setup steps are required. If you choose this option, you can move on to step 3. If you choose option 1, follow the steps below:

  1. Login to the target environment.
  2. Navigate to the Appian Designer.
  3. Navigate to CMGT Case Management Studio Base application.
  4. Search for and open the CMGT_WorkspaceSite site object.
    1. In the Pages section, click Add Page Group.
      1. In the Title field, select Expression.
      2. Copy and paste the following code snippet into the expression editor.

        1
        
        'translation!{765a2893-6d2c-4330-8d7a-ac85f4a6f417}CMGT_BaseTranslations.{c750f1f2-e7b8-4b75-b1b3-017fc218be26}Cases'
        
      3. In the Web Address Identifier field, enter cases-group.
      4. In the Icon field, select the Table icon.
      5. In the Visibility field, select Always show.

        cms_workspace_add_page_group

      6. Click ADD.
    2. In the newly created Cases page group, click the Add Page link to add the Cases page.
      1. In the Title field, select Expression.
      2. Copy and paste the following code snippet into the expression editor.

        1
        
        'translation!{765a2893-6d2c-4330-8d7a-ac85f4a6f417}CMGT_BaseTranslations.{c750f1f2-e7b8-4b75-b1b3-017fc218be26}Cases'
        

        cms_add_page

      3. In the Web Address Identifier field, enter cases.
      4. In the Interface Content field, call the CMGT_SitePage_Cases interface.
      5. In the Width field, select Full.
      6. In the Visibility field, select Always show.
      7. Click ADD.
    3. In the newly created Cases page group, click the Add Page link and follow these steps to add the Triage Emails page:
      1. In the Title field, select Expression.
      2. Copy and paste the following code snippet into the expression editor:

        1
        
        'translation!{9ccd1bc4-9914-437c-8daf-e4f4b64bf756}CMGT_EML_TRI_Translations.{913cbe12-d23c-4542-b556-f0a24df13ff0}Triage Emails'
        
      3. In the Web Address Identifier field, enter triage-emails.
      4. In the Interface Content field, call the CMGT_EML_TRI_SitePage_TriageEmail interface.
      5. In the Width field, select Full.
      6. In the Visibility field, select Only show when… and copy and paste the following code snippet into the expression editor.
      1
      2
      3
      4
      5
      6
      
        a!isUserMemberOfGroup(
          username: loggedInUser(),
          groups: {
            cons!CMGT_GRP_CASE_MANAGERS
          }
        )
      
      1. Click ADD.
  5. Lastly, click the up arrow on the newly created Cases page group until it is directly after the Workspace page.

    cms_case_site_page

  6. Click SAVE.
  7. Search for and open the CMGT_SITE_PAGE_CASES expression rule.
    1. Replace the old Cases page reference with the new Cases page reference.
      • Note: The page reference is different now that it was recreated as part of a site page group.
    2. Click SAVE on the expression rule.

Step 3: Add the Emails view on the case record

To display the email threads that are associated with a case in their own record view:

  1. Login to the target environment.
  2. From Appian Designer, navigate to the CMGT Case Management Studio Base application.
  3. Search for and open the CMGT_CaseMetaData record type.
  4. Select Views and click ADD VIEW MANUALLY.
    1. For the View Name field, copy and paste the the Emails translation string from the CMGT_EML_TRI_Translations object into the expression editor:

      1
      2
      3
      4
      
      rule!CMGT_EML_TRI_Case_RecordView_Emails(
      caseId: rv!record['recordType!{20adfe68-8996-4ca1-bfd3-139cd4876ee5}CMGT_CaseMetaData.fields.{fa0bd394-0010-4b42-8fc1-3ec3e5fa68f8}caseId'],
      caseMetaDataId: rv!identifier
      )
      

      cms_rtviews_create_newview

    2. For the Interface field, copy and paste the following code snippet into the expression editor:

      1
      2
      3
      4
      
      rule!CMGT_EML_TRI_Case_RecordView_Emails(
      caseId: rv!record['recordType!{20adfe68-8996-4ca1-bfd3-139cd4876ee5}CMGT_CaseMetaData.fields.{fa0bd394-0010-4b42-8fc1-3ec3e5fa68f8}caseId'],
      caseMetaDataId: rv!identifier
      )
      
    3. Click OK.
    4. Copy the URL stub that was generated for the new view.
    5. Navigate to Views and Actions Security and select the Edit icon edit icon in the Emails section.
      1. Configure the security so that only users in the CMGT Internal Users group can see the view, as shown.

        cms_security_internal_group

      2. Click OK.
      3. Click SAVE on the record type.
  5. Navigate back to CMGT Case Management Studio Base application.
  6. Search for and open the CMGT_EML_TRI_TXT_URL_STUB_CASE_RECORD_EMAILS_TAB constant.
    1. Paste the value of the URL stub for the new view in the Value field.
    2. Click SAVE.

Step 4: Add the Emails section on the Case summary

To display a preview of the email threads that are associated with a case on the case summary:

  1. From Appian Designer, navigate to the CMGT Case Management Studio Base application.
  2. Search for and open the CMGT_Case_RecordView_Summary interface.
    1. In expression mode, find the column layout that contains CMGT_Case_CaseDetailsSummary.
    2. Copy and paste the following code snippet after CMGT_Case_CaseDetailsSummary and above CMGT_Case_Milestones, as shown.

      1
      2
      3
      4
      5
      
      rule!CMGT_EML_TRI_CaseSummary_Emails(
                caseMetaData: ri!case['recordType!{d81cdd0e-c54d-4b8e-beec-b7ae37fefe7f}CMGT_Case.relationships.{953eb73d-3c33-4861-a83a-6344d3a2a16c}casemetadata'],
                brandingMap: local!brandingMap,
                triggerRefresh: local!triggerRefresh
              ),
      

      cms_email_trl_expression_rule

    3. Click SAVE.

Step 5: Add the email triage actions to the Case Audit framework

The action of associating an email to a case should be included in the case history. To include this new action in the case history:

  1. From Appian Designer, navigate to the CMGT Case Management Studio Base application.
  2. Search for and open the CMGT_EventHistory_Case_FormatDetails expression rule.
    1. Copy and paste the following code block above the default condition in the match() statement, as shown.

      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      
      whenTrue: fv!value = cons!CMGT_EML_TRI_REFID_EVENT_TYPE_LINKED_THREAD,
          then: 'translation!{9ccd1bc4-9914-437c-8daf-e4f4b64bf756}CMGT_EML_TRI_Translations.{65c8bfe4-e5b7-48d1-b95f-7ff19b102d5c}Thread: {subjectName}'(
            'translation!{9ccd1bc4-9914-437c-8daf-e4f4b64bf756}CMGT_EML_TRI_Translations.{65c8bfe4-e5b7-48d1-b95f-7ff19b102d5c}Thread: {subjectName}.translationvariables.{df0a14e0-2a2f-456a-a64b-d14a5258f50d}subjectName': index(
              rule!CMGT_EML_TRI_QR_GetThreads(
                threadIds: local!details.threadId,
                fields: 'recordType!{53d3f93d-ccb6-423d-9238-2edf8811d08f-cmgt_eml_tri}CMGT_EML_TRI_Thread.fields.{2a95571a-53a9-490b-9322-b32712e2fa2a-cmgt_eml_tri}subject',
                executeWhen: a!isNotNullOrEmpty(value: local!details.threadId)
              ),
              'recordType!{53d3f93d-ccb6-423d-9238-2edf8811d08f-cmgt_eml_tri}CMGT_EML_TRI_Thread.fields.{2a95571a-53a9-490b-9322-b32712e2fa2a-cmgt_eml_tri}subject',
              null
            )
          ),
      

      cms_email_tri_getthreads_rule

    2. Click SAVE.

Step 6: Add the Compose action to the Case record and the Emails view

To allow case workers to initiate new email threads from a case record:

  1. From Appian Designer, navigate to the CMGT Case Management Studio Base application.
  2. Search for and open the CMGT_CaseMetaData record type.
    1. Click Actions.
    2. Under Related Actions, click Configure New Action Manually.
    3. Enter the following details in the dialog:
      1. Under Display Name, select Use expression.
        1. Call the Compose translation string from the CMGT_EML_TRI_Translations translation set.
      2. Key: composeEmail
      3. Icon: pencil-square-o
      4. Dialog Height: Full
      5. Dialog Width: Medium plus
      6. Process Model: CMGT_EML_TRI_ComposeEmail
      7. Context:
        1. Paste in the following expression:

          1
          2
          3
          4
          5
          6
          7
          8
          9
          10
          
          {
          case: rule!CMGT_QR_GetCaseV2(
          caseId: rv!record['recordType!{20adfe68-8996-4ca1-bfd3-139cd4876ee5}CMGT_CaseMetaData.fields.{fa0bd394-0010-4b42-8fc1-3ec3e5fa68f8}caseId'],
          fields: {
          'recordType!{d81cdd0e-c54d-4b8e-beec-b7ae37fefe7f}CMGT_Case.fields.{9da3d852-f62e-48aa-950f-103a146da7c0}friendlyId',
          'recordType!{d81cdd0e-c54d-4b8e-beec-b7ae37fefe7f}CMGT_Case.fields.{908c9e8c-078d-4e74-afc9-6e3f9a7c176a}caseTypeUuid',
          'recordType!{d81cdd0e-c54d-4b8e-beec-b7ae37fefe7f}CMGT_Case.relationships.{8beba714-f253-41d2-9232-e0c0f51bed2e}caseType.fields.{15e4b128-9a10-47b8-bbcb-35939753e4fe}parentUuid'
          }
          )
          }
          

          cms_case_creation_via_email_setup

    4. Click DONE and save the record type.
  3. From Appian Designer, navigate to the CMGT Add-On - Case Creation via Email application.
  4. Search for and open the CMGT_EML_TRI_EmailListPane interface.
    1. Add the Compose Email record action as an item within the a!sideBySideItem that contains the comment specifying Call compose action here.
    2. Configure the record action field as shown:

      call_compose_action_here

    3. Click SAVE.
  5. Search for and open the CMGT_EML_TRI_Case_RecordView_Emails interface.
    1. Add the Compose Email record action in the additionalContent parameter of CMGT_EML_TRI_DisplayEmptyState, where the comment specifies Call compose action here.
    2. Configure the record action field as shown:

      cmgt_eml_tri_displayemptyetate

      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      
         a!recordActionField(
         actions: a!recordActionItem(
           action: 'recordType!{20adfe68-8996-4ca1-bfd3-139cd4876ee5}CMGT_CaseMetaData.actions.{bce1f9c5-f31f-4910-b1cf-f6c6bfe71598}composeEmail',
           identifier: ri!caseMetaDataId
         ),
         display: "LABEL_AND_ICON",
         style: "TOOLBAR_PRIMARY",
         showWhen: a!isNotNullOrEmpty(ri!caseId),
         align: "END"
         )
      
    3. Click SAVE.
  6. Navigate back to the CMGT Add On - Case Creation via Email application.
  7. Search for and open the CMGT_EML_TRI_Case_RecordView_Emails rule.
    1. Add the following code snippet below the Call compose action here comment, as shown:

      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      
      a!recordActionField(
                              actions: a!recordActionItem(
                                action: 'recordType!{20adfe68-8996-4ca1-bfd3-139cd4876ee5}CMGT_CaseMetaData.actions.{bce1f9c5-f31f-4910-b1cf-f6c6bfe71598}composeEmail',
                                identifier: ri!caseMetaDataId
                              ),
                              display: "LABEL_AND_ICON",
                              style: "TOOLBAR_PRIMARY",
                              showWhen: a!isNotNullOrEmpty(ri!caseId),
                              align: "END"
                            )
      

      cms_email_trl_expression_rule

    2. Click SAVE.

Step 7: Customize the email sent upon triage

When an email is linked to an existing case or created as a new case, the original email sender will receive a notification that an action has been taken on their email. The notification will include the Case Identifier for reference. By default, the message on this email states, If you have any questions or need assistance, please reach out to your system administrator. You can tailor this message to match the needs of your organization, team, or process.

To change this message:

  1. From Appian Designer, navigate to the CMGT Add-On - Case Creation via Email application.
    1. Search for and open the CMGT_EML_TRI_Translations translation set.
      1. Find the string with the English value If you have any questions or need assistance, please reach out to your system administrator.
      2. Edit the value of the string to something that makes sense for your organization. See the image below for reference as to where this string appears.

        cms_case_creation_confirmation

      3. Click SAVE.

Step 8: Update the time interval for polling emails

By default, the email poller checks the connected email inbox every ten minutes for new emails to retrieve. You can customize this process to run less frequently. This is an optional step.

To avoid potential performance issues, we recommend not running the process more frequently.

To decrease the frequency:

  1. Login to the target environment.
  2. Navigate to the Appian Designer.
  3. Navigate to CMGT Add-On - Case Creation via Email application.
    1. Search for and open the CMGT_EML_TRI_EMAIL_POLLER_TIME_INTERVAL_IN_MINUTES constant.
      1. Update the value to an integer for how often the email poller should run. Be sure the value is in minutes.
      2. Click SAVE.
    2. Search for and open the CMGT_EML_TRI_IngestMailViaPoller process model.
      1. From the File menu, click Save & Publish.

Step 9: Add automation to pre-populate the case type of the email

When converting an email into a case, the case manager must enter the appropriate case type, then enter the rest of the required details before submitting the case. By default, the case type selection is manual. To add a customization that automatically sets the case type based on the email content, you can customize CMGT_EML_TRI_InitializeCaseDetails using your own custom AI Skills object or expression rule. This is an optional step.

To update the rule:

  1. Search for and open the CMGT_EML_TRI_InitializeCaseDetails rule.
  2. Update the rule to add the code for pre-populate the case type.

For additional guidance, open the expression rule in the Appian Designer and read the in-line comments.

Next step

Now that you have set up the Case Creation via Email module, you can create a case via email and link the corresponding email to the newly created case.

Feedback