Free cookie consent management tool by TermsFeed

Set Up the Surveys and Questions Add-On Module

On This Page
This content applies solely to Connected Claims, which must be purchased separately from the Appian base platform. This content was written for Appian 26.6 and may not reflect the interfaces or functionality of other Appian versions.

Prepare for setup

After installing the Surveys and Questions add-on module, you need to set it up before using it with Connected Claims. This guide walks you through the recommended setup steps.

System prerequisites

Your environment must meet the following requirements before you set up the Surveys and Questions module:

  • Appian platform running version 26.9 or greater.
  • A supported web browser.
  • Imported Connected Claims Management Base Application v2.1, which includes the following application containers:
    • Connected Claims Management Base (CCM)
    • CCM Studio Generated Objects
  • Imported Survey Task Framework v1.3 application.

Add the runtimeSurvey relationship to the Task record

This section adds the stfRuntimeSurvey relationship to the CCM_Task record type. The relationship associates each task in Connected Claims with its Surveys and Questions runtime survey data, so tasks can use dynamic surveys. Complete this section before the other sections, because later sections reference the relationship.

To add the relationship to the CCM_Task record type:

  1. In the target environment, sign in as the deployment user.
  2. Go to Appian Designer.
  3. Open the Connected Claims Management Base application.
  4. Search for and open the CCM_Task record type.
  5. Add a new relationship to the record type.
  6. Configure the relationship with the following settings:
    • Relationship Name: stfRuntimeSurvey
    • Relationship Type: One to One, between CCM_Task and CCM_STF_RuntimeSurvey
    • CCM_Task field: taskId - Number (Integer)
    • CCM_STF_RuntimeSurvey field: taskId - Number (Integer)
    • Write and Delete Related Records: Write or delete RuntimeSurveys when modifying Tasks

    The Edit Relationship with CCM_STF_RuntimeSurvey dialog, with the stfRuntimeSurvey relationship name, the One to One relationship type, the taskId fields, and the write and delete option selected

Configure the Survey pages in the Control Panel

This section adds the Surveys and Questions Questionnaire page to the Connected Claims Control Panel, so administrators can create and manage surveys and questions.

To configure the Questionnaire page:

  1. Open the CCM_ControlPanel control panel object.
  2. Under the Custom Configurations section of the object, click the add custom configuration button.
  3. Set up the Questionnaire page in the following way:
    • Display Name: Use an expression and select Questionnaire from the CCM_STF_Translations translation set.
    • Icon: globe
    • Description: Displays list of surveys and questions
    • Web Address Identifier: questionnaire
    • Claims Location: Global
    • Interface: CCM_STF_ControlPanel_Questionnaire

    Questionnaire custom configuration in the CCM_ControlPanel object

  4. Click SUBMIT.

Enable dynamic display when creating Runtime Survey tasks on a claim

This section enables the Surveys and Questions module to display the survey creation interface when users create Runtime Survey tasks on a claim, so they can configure survey-specific settings.

To enable dynamic display:

  1. Open the CCM_Task_Sub_TaskBehaviorTypeCreateDynamicDisplay interface.
    1. Add the following code to the existing a!match() in the interface:

      Task behavior interface updated with Survey task type code

      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      35
      36
      37
      38
      39
      
      /*Survey*/
      equals: cons!CCM_STF_REFID_TASK_BEHAVIOR_TYPE_SURVEY,
      then: a!sideBySideLayout(
        items: {
          a!sideBySideItem(
            item: 
              rule!CCM_STF_SurveyTaskBehaviorType_CreateDynamicDisplay(
                targetRecord: ri!task,
                contextJsonRecordField: 'recordType!{ee5aa46d-0228-430f-a794-1134a11fbcc0-ccm}CCM_Task.fields.{664672b3-911e-425a-a1b1-99917f4c255e-ccm}contextJson'
              ),
              width: "10X"
      
          ),
          a!sideBySideItem(
            item: a!buttonArrayLayout(
              buttons: a!buttonWidget(
                label: 'translation!{ace60168-888f-4725-8793-b28c784c6b4d}CCM_BaseTranslationSet.{f22bcad9-47fe-48f3-9a4e-d1df8f1bb57f}Preview',
                saveInto: a!save(ri!isSurveyPreview, true()),
                disabled: rule!CCM_UTIL_IsBlank(
                  value: index(
                    rule!CCM_UTIL_CastJsonToMap(
                      ri!task['recordType!{ee5aa46d-0228-430f-a794-1134a11fbcc0-ccm}CCM_Task.fields.{664672b3-911e-425a-a1b1-99917f4c255e-ccm}contextJson']
                    ),
                    "cfgSurveyId",
                    null
                  )
                )
              ),
              align: "START",
              marginAbove: "LESS",
              marginBelow: "NONE"
            ),
            width: "MINIMIZE"
          )
        },
        alignVertical: "BOTTOM",
        marginAbove: "NONE",
        marginBelow: "NONE"
      )
      

Enable dynamic display when creating Reference Survey tasks

This section enables the Surveys and Questions module to display the survey creation interface when administrators create Reference Survey tasks in the Control Panel, so they can configure reusable survey templates.

To enable dynamic display:

  1. Open the CCM_ReferenceTask_Sub_TaskBehaviorTypeCreateDynamicDisplay interface.
    1. Add the following code to the existing a!match() in this interface:

      Reference survey task interface updated with Survey code

      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      35
      36
      37
      38
      39
      40
      
      /*Survey*/
      equals: cons!CCM_STF_REFID_TASK_BEHAVIOR_TYPE_SURVEY,
      then: {
        a!sideBySideLayout(
          items: {
            a!sideBySideItem(
              item: rule!CCM_STF_SurveyTaskBehaviorType_CreateDynamicDisplay(
                targetRecord: ri!referenceTask,
                contextJsonRecordField: 'recordType!{3dbe5fed-28bf-4f27-aa59-eb2c940289b4-ccm}CCM_WFL_CFG_ReferenceTask.fields.{c634a732-7506-42e0-b52a-9d1a48df3999}contextJsonDefault'
              ),
              width: "10X"
            ),
            a!sideBySideItem(
              item: a!buttonArrayLayout(
                buttons: a!buttonWidget(
                  label: 'translation!{ace60168-888f-4725-8793-b28c784c6b4d}CCM_BaseTranslationSet.{f22bcad9-47fe-48f3-9a4e-d1df8f1bb57f}Preview',
                  saveInto: a!save(ri!isSurveyPreview, true()),
                  disabled: rule!CCM_UTIL_IsBlank(
                    value: index(
                      rule!CCM_UTIL_CastJsonToMap(
                        ri!referenceTask['recordType!{3dbe5fed-28bf-4f27-aa59-eb2c940289b4-ccm}CCM_WFL_CFG_ReferenceTask.fields.{c634a732-7506-42e0-b52a-9d1a48df3999}contextJsonDefault']
                      ),
                      "cfgSurveyId",
                      null
                    )
                  )
                ),
                align: "START",
                marginAbove: "LESS",
                marginBelow: "NONE"
              ),
              width: "MINIMIZE"
            )
          },
          alignVertical: "BOTTOM",
          marginAbove: "NONE",
          marginBelow: "NONE"
        ),
      
      },
      

Enable additional relationships when creating Survey tasks

This section updates two task behavior expression rules so the Surveys and Questions module initializes survey-related data when users create Survey tasks.

To update the task behavior expression rules:

  1. Open the CCM_Task_TaskBehaviorTypeCreateDynamicInitialValues expression rule.
  2. Add the following code to the existing a!match() in this rule:

    1
    2
    3
    4
    5
    
    /*STF Add On: Survey Task Type*/
    equals: cons!CCM_STF_REFID_TASK_BEHAVIOR_TYPE_SURVEY,
    then: rule!CCM_STF_SurveyTaskBehaviorType_CreateInitialTaskRuntimeData(
      task: ri!task
    )
    

    The CCM_Task_TaskBehaviorTypeCreateDynamicInitialValues expression rule with the Survey task type code added to the a!match function

  3. Open the CCM_Task_TaskBehaviorTypeSetDynamicValuesNewOccurrence expression rule.
  4. Add the following code to the existing a!match() in this rule:

    1
    2
    3
    4
    5
    
    /*STF Add-on: RuntimeSurvey*/
    equals: cons!CCM_STF_REFID_TASK_BEHAVIOR_TYPE_SURVEY,
    then: rule!CCM_STF_SurveyTaskBehaviorType_SetDynamicValuesNewOccurance(
      task: ri!task
    )
    

    The CCM_Task_TaskBehaviorTypeSetDynamicValuesNewOccurrence expression rule with the RuntimeSurvey code added to the a!match function

This section updates the CCM_TaskBehaviorType_returnCompleteActionDynamicQueryFields expression rule so the system can query and display the questions and answers related to a survey when users complete a Survey task.

To update the expression rule:

  1. Open the CCM_TaskBehaviorType_returnCompleteActionDynamicQueryFields expression rule.
    1. Add the following code to the existing a!match() in this rule:

      Complete action query fields rule with Survey relationships

      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      
      /*STF Add ON: Survey*/
      equals: cons!CCM_STF_REFID_TASK_BEHAVIOR_TYPE_SURVEY,
      then: a!map(
        recordTypesToInclude: {
          'recordType!{ee5aa46d-0228-430f-a794-1134a11fbcc0-ccm}CCM_Task.relationships.{c45e9bb7-71f1-430d-bd28-ee138bba8dab}stfRuntimeSurvey',
          'recordType!{ee5aa46d-0228-430f-a794-1134a11fbcc0-ccm}CCM_Task.relationships.{c45e9bb7-71f1-430d-bd28-ee138bba8dab}stfRuntimeSurvey.relationships.{43d501cc-ad5a-4a92-9edf-64ddca9fcfe1}runtimeQuestions'
        },
        relatedRecordData: {
          a!relatedRecordData(
            relationship: 'recordType!{ee5aa46d-0228-430f-a794-1134a11fbcc0-ccm}CCM_Task.relationships.{c45e9bb7-71f1-430d-bd28-ee138bba8dab}stfRuntimeSurvey.relationships.{43d501cc-ad5a-4a92-9edf-64ddca9fcfe1}runtimeQuestions',
            limit: 100,
            sort: a!sortInfo(
              field: 'recordType!{04daddea-2f84-4d5a-ba7b-cfe048fb6199}CCM_STF_RuntimeQuestion.fields.{e3ceccf7-c375-447a-888f-68b0ef8cb283}positionOrder',
              ascending: true
            )
          ),
          a!relatedRecordData(
            relationship: 'recordType!{ee5aa46d-0228-430f-a794-1134a11fbcc0-ccm}CCM_Task.relationships.{c45e9bb7-71f1-430d-bd28-ee138bba8dab}stfRuntimeSurvey.relationships.{43d501cc-ad5a-4a92-9edf-64ddca9fcfe1}runtimeQuestions.relationships.{c52a4351-2dd6-4926-b01c-d2c95c0c58e3}runtimeAnswers',
            limit: 100
          )
        }
      )
      

Enable dynamic display when completing Runtime Survey tasks on a claim

This section configures the task completion interface so the Surveys and Questions module displays survey questions and captures responses when users complete Runtime Survey tasks on a claim.

To enable dynamic display:

  1. Open the CCM_Task_Sub_TaskBehaviorTypeCompleteDynamicDisplay interface.
    1. Add the following code to the existing a!match() in this interface:

      Complete Runtime Survey interface with dynamic display code

      1
      2
      3
      4
      5
      6
      7
      8
      
      /*STF Add On: Survey*/
        equals: cons!CCM_STF_REFID_TASK_BEHAVIOR_TYPE_SURVEY,
        then: {
          rule!CCM_STF_RuntimeSurvey_Sub_Complete(
            brandingMap: ri!brandingMap,
            runtimeSurvey: ri!task['recordType!{ee5aa46d-0228-430f-a794-1134a11fbcc0-ccm}CCM_Task.relationships.{c45e9bb7-71f1-430d-bd28-ee138bba8dab}stfRuntimeSurvey']
          )
        }
      

Enable dynamic display when viewing Survey Task records

This section updates the CCM_Task_Sub_TaskBehaviorTypeSummaryDynamicDisplay interface so users can view completed survey responses and survey details when they view Survey Task records.

To enable dynamic display:

  1. Open the CCM_Task_Sub_TaskBehaviorTypeSummaryDynamicDisplay interface.
    1. Add the following code to the existing a!match() in this interface:

      Survey task records interface with dynamic display code

      1
      2
      3
      4
      5
      6
      7
      8
      
      /*STF Add On: Survey*/
        equals: cons!CCM_STF_REFID_TASK_BEHAVIOR_TYPE_SURVEY,
        then: {
          rule!CCM_STF_SurveyTaskBehaviorType_SummaryDynamicDisplay(
            task: ri!task,
            brandingMap: ri!brandingMap
          )
        }
      

Set additional survey relationships in the Task SetMetadata rule

This section updates the CCM_Task_SetMetadata expression rule so the system maintains survey-related metadata and relationships when users update or modify tasks, and so users can set additional survey relationships.

  1. Open the expression rule CCM_Task_SetMetadata.
    1. Around line 379, add the following code to the list of maps in the childRelationships input of the call to CCM_UTIL_SetRecordFields:

      Task SetMetadata rule updated with survey relationships

      1
      2
      3
      4
      5
      6
      7
      8
      
      /*STF Add-on: RuntimeSurvey*/
      a!map(
        field: 'recordType!{ee5aa46d-0228-430f-a794-1134a11fbcc0-ccm}CCM_Task.relationships.{c45e9bb7-71f1-430d-bd28-ee138bba8dab}stfRuntimeSurvey',
        value: rule!CCM_STF_RuntimeSurvey_SetMetaData(
          runtimeSurveys: fv!item['recordType!{ee5aa46d-0228-430f-a794-1134a11fbcc0-ccm}CCM_Task.relationships.{c45e9bb7-71f1-430d-bd28-ee138bba8dab}stfRuntimeSurvey'],
          initiator: ri!initiator
        )
      )
      

      Note:  The CCM_Task.stfRuntimeSurvey relationship reference is environment-specific. Update it to reference the relationship created in your target environment.

Add the Update Survey action to the CCM_Task record

This step adds the Update Survey related action to the CCM_Task record type, so claims adjusters and supervisors can change the questions in a Survey task for a single claim. For details about how users work with the action, see Update a survey on an active claim.

To add the Update Survey related action:

  1. In the target environment, sign in as the deployment user.
  2. Go to Appian Designer.
  3. Open the Connected Claims Management Base application.
  4. Search for and open the CCM_Task record type.
  5. Click the Actions tab.
  6. Under Related Actions, click Configure New Action Manually.
  7. Configure the related action with the following properties, then click DONE:
    • Display Name: Use an expression and select Update Survey from the CCM_STF_Translations translation set.
    • Key: updateSurvey
    • Dialog Height: Full
    • Dialog Width: Full
    • Process Model: CCM_STF_Task_UpdateSurvey
    • Context: Enter the following expression:

      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      
      {
        isCancel: false(), /* Boolean */
        runtimeSurvey: rule!CCM_STF_QR_GetRuntimeSurveyV2(
          taskIds: rv!identifier,
          relatedRecordData:
            a!relatedRecordData(
              relationship: 'recordType!{3a83ea79-366b-42a8-8461-243316e0996c}CCM_STF_RuntimeSurvey.relationships.{43d501cc-ad5a-4a92-9edf-64ddca9fcfe1}runtimeQuestions',
              limit: 100,
              sort: a!sortInfo(
                field: 'recordType!{04daddea-2f84-4d5a-ba7b-cfe048fb6199}CCM_STF_RuntimeQuestion.fields.{e3ceccf7-c375-447a-888f-68b0ef8cb283}positionOrder',
                ascending: true
              )
            )
        )
        /* CCM_STF_RuntimeSurvey */
      }
      

Add the Update Survey action to the Tasks grid

This step adds the Update Survey action to the actions menu on each row of the Tasks grid, so users can open the action from a Survey task on a claim.

To add the Update Survey action to the Tasks grid:

  1. Open the CCM_Task_RecordGrid interface rule.
  2. Add the Update Survey action along with the other actions in the a!recordActionField() function, as shown:

    CCM_Task_RecordGrid interface with the Update Survey record action item added to the record action field

    1
    2
    3
    4
    
    a!recordActionItem(
      action: recordType!CCM_Task.actions.updateSurvey,
      identifier: fv!identifier
    )
    

Update the primary and banner messages in Complete Tasks

This section adds the Update Survey lock messages to the CCM_Task_RecordAction_Complete interface rule, so the Complete dialog of a Survey task shows a message while a user updates its survey.

To add the lock messages:

  1. Open the CCM_Task_RecordAction_Complete interface rule.
  2. Add the following code to the existing a!match() in the primaryText parameter:

    The CCM_Task_RecordAction_Complete interface with the CCM_STF_TXT_LOCK_ACTION_UPDATE_SURVEY condition added to the primaryText a!match function

    1
    2
    
    equals: cons!CCM_STF_TXT_LOCK_ACTION_UPDATE_SURVEY,
    then: 'translation!{ace60168-888f-4725-8793-b28c784c6b4d}CCM_BaseTranslationSet.{c420004b-3f7b-42c4-9d49-ebf923c7661d}This activity’s survey is currently being modified',
    
  3. Add the following code to the existing a!match() in the bannerMessage parameter:

    The CCM_Task_RecordAction_Complete interface with the CCM_STF_TXT_LOCK_ACTION_UPDATE_SURVEY condition added to the bannerMessage a!match function

    1
    2
    
    equals: cons!CCM_STF_TXT_LOCK_ACTION_UPDATE_SURVEY,
    then: 'translation!{ace60168-888f-4725-8793-b28c784c6b4d}CCM_BaseTranslationSet.{ba6bedba-ee0e-453d-be16-0e0c9fbca78d}This activity''s survey is being changed by another user..',
    

Update the Survey preview in Create Survey Task

This section adds the Survey preview to the CCM_WFL_ReferenceTask_RecordAction_CreateUpdate interface rule, so users can preview a survey when they create a Survey task.

To add the Survey preview:

  1. Open the CCM_WFL_ReferenceTask_RecordAction_CreateUpdate interface rule.
  2. Add the following code to the existing a!match():

    The CCM_WFL_ReferenceTask_RecordAction_CreateUpdate interface with the Survey preview condition added to the a!match function

    1
    2
    3
    4
    5
    
    whenTrue: local!isSurveyPreview,
    then: rule!CCM_Survey_Preview(
      referenceTask: ri!referenceTask,
      isPreview: local!isSurveyPreview      
    ),
    

Update the Survey preview in Workflow Edit Add Tasks

This section adds the Survey preview to the CCM_Task_RecordAction_WorkflowEdit_AddTasks interface rule, so users can preview a survey when they add a Survey task to a workflow.

To add the Survey preview:

  1. Open the CCM_Task_RecordAction_WorkflowEdit_AddTasks interface rule.
  2. Add the following code to the existing a!match():

    The CCM_Task_RecordAction_WorkflowEdit_AddTasks interface with the Survey preview condition added to the a!match function

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    
    whenTrue: local!isSurveyPreview,
    then: rule!CCM_Survey_Preview(
      surveyId: index(
        rule!CCM_UTIL_CastJsonToMap(
          local!currentNewTask['recordType!{ee5aa46d-0228-430f-a794-1134a11fbcc0-ccm}CCM_Task.fields.{664672b3-911e-425a-a1b1-99917f4c255e-ccm}contextJson']
        ),
        "cfgSurveyId",
        null
      ),
      isPreview: local!isSurveyPreview
    ),
    

Update the Survey preview in Claim Type Workflow Edit

This section adds the Survey preview to the CCM_WFL_ClaimType_RecordAction_WorkflowTasksAdd_AddTasks interface rule, so users can preview a survey when they add a Survey task to a claim type workflow.

To add the Survey preview:

  1. Open the CCM_WFL_ClaimType_RecordAction_WorkflowTasksAdd_AddTasks interface rule.
  2. Add the following code to the existing a!match():

    The CCM_WFL_ClaimType_RecordAction_WorkflowTasksAdd_AddTasks interface with the Survey preview condition added to the a!match function

    1
    2
    3
    4
    5
    
    whenTrue: local!isSurveyPreview,
    then: rule!CCM_Survey_Preview(
      referenceTask: local!newReferenceTask,
      isPreview: local!isSurveyPreview
    ),
    

Update the Task.stfRuntimeSurvey relationship in add-on rules

Two expression rules in the Survey Task Framework add-on application must refer to the stfRuntimeSurvey relationship that you created when you added the runtimeSurvey relationship to the Task record.

  1. Open the expression rule CCM_STF_SurveyTaskBehaviorType_CreateInitialTaskRuntimeData.
    1. In line 12, replace the commented relationship with recordType!CCM_Task.stfRuntimeSurvey.
  2. Open the expression rule CCM_STF_SurveyTaskBehaviorType_SetDynamicValuesNewOccurance.
    1. In line 36, replace the commented relationship with field: recordType!CCM_Task.stfRuntimeSurvey.

Use the module after setup

After you set up the Surveys and Questions module, you can create dynamic surveys and questionnaires within Connected Claims, configure survey tasks in the Control Panel, and collect structured data through customizable survey forms integrated with your claims workflow.

Feedback