View this page in the latest version of Appian. Set Up the Surveys and Questions Add-On Module Share Share via LinkedIn Reddit Email Copy Link Print 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: In the target environment, sign in as the deployment user. Go to Appian Designer. Open the Connected Claims Management Base application. Search for and open the CCM_Task record type. Add a new relationship to the record type. 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 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: Open the CCM_ControlPanel control panel object. Under the Custom Configurations section of the object, click the add custom configuration button. 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 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: Open the CCM_Task_Sub_TaskBehaviorTypeCreateDynamicDisplay interface. Add the following code to the existing a!match() in the interface: 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: Open the CCM_ReferenceTask_Sub_TaskBehaviorTypeCreateDynamicDisplay interface. Add the following code to the existing a!match() in this interface: 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: Open the CCM_Task_TaskBehaviorTypeCreateDynamicInitialValues expression rule. 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 ) Open the CCM_Task_TaskBehaviorTypeSetDynamicValuesNewOccurrence expression rule. 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 ) Query survey-related relationships when completing a task 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: Open the CCM_TaskBehaviorType_returnCompleteActionDynamicQueryFields expression rule. Add the following code to the existing a!match() in this rule: 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: Open the CCM_Task_Sub_TaskBehaviorTypeCompleteDynamicDisplay interface. Add the following code to the existing a!match() in this interface: 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: Open the CCM_Task_Sub_TaskBehaviorTypeSummaryDynamicDisplay interface. Add the following code to the existing a!match() in this interface: 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. Open the expression rule CCM_Task_SetMetadata. Around line 379, add the following code to the list of maps in the childRelationships input of the call to CCM_UTIL_SetRecordFields: 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: In the target environment, sign in as the deployment user. Go to Appian Designer. Open the Connected Claims Management Base application. Search for and open the CCM_Task record type. Click the Actions tab. Under Related Actions, click Configure New Action Manually. 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: Open the CCM_Task_RecordGrid interface rule. Add the Update Survey action along with the other actions in the a!recordActionField() function, as shown: 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: Open the CCM_Task_RecordAction_Complete interface rule. Add the following code to the existing a!match() in the primaryText parameter: 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', Add the following code to the existing a!match() in the bannerMessage parameter: 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: Open the CCM_WFL_ReferenceTask_RecordAction_CreateUpdate interface rule. Add the following code to the existing a!match(): 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: Open the CCM_Task_RecordAction_WorkflowEdit_AddTasks interface rule. Add the following code to the existing a!match(): 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: Open the CCM_WFL_ClaimType_RecordAction_WorkflowTasksAdd_AddTasks interface rule. Add the following code to the existing a!match(): 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. Open the expression rule CCM_STF_SurveyTaskBehaviorType_CreateInitialTaskRuntimeData. In line 12, replace the commented relationship with recordType!CCM_Task.stfRuntimeSurvey. Open the expression rule CCM_STF_SurveyTaskBehaviorType_SetDynamicValuesNewOccurance. 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 Was this page helpful? SHARE FEEDBACK Loading...