Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

Running a questionnaire in a case

Updated on March 29, 2022

Collect a wide variety of information from your application users by running a questionnaire in a case. By providing questions and collecting answers in a structured format, you can quickly incorporate user feedback into a case. Reusing questionnaires speeds up the development of your application and helps you deliver accurate applications that precisely meet the business needs of the users.

Your application runs the questionnaire as a child case in the context of the parent case that includes the Questionnaire step. To save more time, you can propagate data from the parent case to the questionnaire. For example, when a user provides basic information about their stay at a hotel by completing a booking form in a parent case, you can propagate the obtained data to an exit questionnaire. As a result, the questionnaire already includes their basic information, such as the dates of their stay and type of accommodation.

Data propagation also helps you deliver more accurate applications, as you can use data from a parent questionnaire to build logic in a child questionnaire. For example, if a user provides a monthly income greater than a specified amount in a parent questionnaire, you can create visibility conditions in the child questionnaire to skip further questions about their income.

Before you begin:
  • Create a questionnaire that you want to run in a case. For more information, see Creating a questionnaire.
  • If you upgrade your questionnaires from Pega Platform 8.5 or earlier and you want to access questionnaire data from the parent case, first remove and then reconfigure the Questionnaire shape in the parent case, and next edit the DataTableEditorReport report definition by adding the parentKey parameter to a filter condition. Ensure that the parentKey parameter equals to the .pxCoverInsKey column source. For more information, see Report definitions.
  1. Add the Questionnaire shape to the life cycle of your case.
    1. In the navigation pane of App Studio, click Case types, and then click the case type that you want to open.
    2. On the Workflow tab, in the Case life cycle section, hover over a process in a stage, and then click StepMoreAutomationsQuestionnaire.
    3. Click Select.
  2. In the Create Questionnaire field, provide a name for the step, for example, Rate customer service.
  3. In the Step properties pane, in the Select questionnaire list, select the name of the questionnaire that you want to run as a child case.
  4. Optional: To reuse information from the parent case, transfer data from the current case to the questionnaire:
    Map fields from the case type to the questionnaire
    1. In the Step properties pane, select the Transfer info to questionnaire case check box.
    2. In the Transfer information dialog box, in the 'From' field column, select the field with the values that you want to transfer.
    3. In the 'To' field column, press the Down arrow key, and then select a destination field to which you want to transfer the value.
    4. Optional: To add mapped fields to the case type view, in the View section, select the Add mapped fields to [case type view name] view check box.
    5. Click OK.
    Configure advanced mapping by providing a data transform
    1. Switch to Dev Studio.
    2. In the Step properties pane, select the Transfer info to questionnaire case check box.
    3. In the list of transfer options, select Existing.
    4. In the Data transform field, enter the name of the data transform that you want to apply.
    5. Click Save, and then switch to App Studio.
    Result: At run time, when a user opens the questionnaire that is part of the case processing, the questionnaire already includes the specified data from the parent case.
  5. In the Route to field, press the Down arrow key, and then select the user who is responsible for answering the questions in the questionnaire:
    • To route the questionnaire to the user who currently processes the case, select Current user.
    • To route the questionnaire to a specific user, select Specific user, and then, in the Operator field, enter the ID of the user to complete the questionnaire.
    • To route the questionnaire to a work queue that multiple users share, select Work queue, and then, in the Work queue field, enter the name of the work queue.
  6. Click Save.
Result: After you add a Questionnaire step to your parent case type, you can access the data that users provide only after the child case for completing the questionnaire is complete. In the data model of the parent case, the system adds two new properties of a query type: a single property, and a list property. These two new properties source data from the questionnaire child case type. For more information about queries, see Referencing a data page.
For example: The following figure shows the effect of propagating data from a parent case to a questionnaire child case at run time in a process of reviving a reimbursement claim in an application for hotel operations. After a customer provides details, such as dates of arrival and departure, in the parent case, when the questionnaire runs as a child case, the application prepopulates answers with information that the customer already provided:
Prepopulating answers in a questionnaire
Run time representation of details in a parent case that the application transfers to a questionnaire child case

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us