LinkedIn
Copied!

Table of Contents

Asking a question in a case

Version:

Only available versions of this content are shown in the dropdown

Collect a single response from a user who processes a case by using the Question shape in a case life cycle. By isolating individual questions, you can selectively capture user input without the formal structure of a questionnaire. For example, in a home insurance process, a case worker asks a customer what kind of offers they want to receive in the future.

Only standard Pega Platform applications support running a question from the case life cycle outside of a questionnaire. In applications based on Cosmos React, you can run a questionnaire by using the Questionnaire shape. For more information, see Running a questionnaire in a case.

Create a question that you want to ask in the case. For more information, see Adding a question to a question page.
  1. Add the Question shape to the life cycle of your case.

    1. In the navigation pane of Dev Studio, click Case types, and then click the case type that you want to open.

    2. On the Workflow tab, in the Life cycle section, hover over a process in a stage, and then click Step More Automations Question .

    3. Click Select.

  2. In the Answer question field, provide a name for the step, for example, Type of offers.

  3. Choose a question to ask:

    Choices Actions
    Reuse an existing question
    1. In the Question type list, select Rule.

    2. In the Question rule field, press the Down arrow key, and then select the name of a question.

      You cannot select a complex question, because only questionnaires support complex questions.
      In the Question Info section, you can verify that the question is relevant to the case.
    3. Optional:

      To ensure that the user provides an answer to the question, select the Required check box.

    Create a virtual question
    Virtual questions are not reusable. Use this approach only when you are collecting a text response and the question is specific to the process that contains the Question shape.
    1. In the Question type list, select Text.

    2. In the Question text field, enter the text of the question that your application displays at run time.

    3. In the Map answer to property field, press the Down arrow key, and then select a property to store the value of the answer that the user provides.

  4. In the Route to field, press the Down arrow key, and then select the user who is responsible for answering the question:

    • To route the question to the user who currently processes the case, select Current user.
    • To route the question to a specific user, select Specific user, and then, in the Operator field, enter the ID of the user to answer the question.
  5. Optional:

    To control whether your application displays the question at run time, in the Display when field, press the Down arrow key, and then select a when condition.

    Display a question about a vehicle engine number only if the customer's insurance covers the type of accident that a customer had.
  6. Optional:

    To validate the answer that the user provides, configure the processing to perform:

    1. In the Pre-question processing activity and Post-question processing activity fields, press the Down arrow key, and then select the name of an activity.

      Your application runs these activities when the user is online.
    2. In the Pre-question javascript function and Post-question javascript function fields, enter the names of functions that the harness of the case includes.

      Your application runs these functions when the user is offline.
      Applications based on Cosmos React do not support pre-question and post-question processing. You can run these activities and JavaScript functions only in standard Pega Platform applications.
  7. Optional:

    To provide additional comments about the question, in the Audit note field, enter some helpful extra text.

  8. Click Save.

Have a question? Get answers now.

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