Skip to main content


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

Creating and configuring a new questionnaire

Updated on September 12, 2020

You can create and use questionnaires in Pega Retail Advisor to gather information and solicit feedback from your customers. Questionnaires can include text, radio buttons, and drop-down questions.

By default, the application includes the following sample questionnaire classes that you can use to create new questionnaires to meet your business needs:
PegaMKT-Advisor-Data-Questionnaire-NeedsAssessment
Use this class to gather basic information about what kind of product the customer needs.
PegaMKT-Advisor-Data-Questionnaire-Negotiation
Use this class to gather feedback from the customer during a retention negotiation.
  1. Log in by using an administrator account. Dev Studio opens.
  2. Create a new class for the questionnaire.
    1. In the Dev Studio header search text field, search for and select the questionnaire class that you want to use as a template, for example, PegaMKT-Advisor-Data-Questionnaire-NeedsAssessment.
    2. Click Save as.
    3. In the Class Name field, enter a name for the new questionnaire that begins with PegaMKT-Advisor-Data-Questionnaire-.
    4. In the Add to ruleset field, select your implementation ruleset.
    5. Click Create and open.
  3. In the Explorer panel, click App and search for the questionnaire class for which you want to add a question.
  4. Right-click the questionnaire class name and then click CreateData Model Property.
  5. Enter a Label for the property and click Create and Open.
  6. Specify the Property type and Table type.
    You can set the Table type to Local List, Field Value, Class Key Value, Remote List, or Prompt List. As a best practice, use either Field Value or Prompt List because these modes support localization.
  7. Add the list of possible answers. For more information, see Property form Completing the General tab.
    Note: If the answer text in a property is longer than 64 characters, create a field value for each answer.
  8. Save the property into your implementation ruleset and ensure that it applies to the questionnaire class for which you are adding the question. For more information, see Properties - Completing the Create, Save As, or Specialization form.
  9. Repeat steps 4 through 8 for each question that you want to add to the questionnaire.
  10. Create a section for the questionnaire.
    1. In the Dev Studio header search text field, search for and select the questionnaire section that applies to PegaMKT-Advisor-Data-Questionnaire-NeedsAssessment.
    2. Edit the section by adding and removing controls based on the sample to meet your business needs. Ensure that each answer references the appropriate property that you created in steps 4 through 8. For more information on configuring sections, see Section form - Completing the Design tab.
      Note: Use the following types of controls for questionnaire answers: Text Input, Radio Buttons, and Drop-down.
    3. Save the section into your implementation ruleset and ensure that it applies to the questionnaire class that you created in step 2. For more information, see Sections - Completing the Create, Save As, or Specialization form.
  11. Update the service intent task class for which you are adding the questionnaire.
    1. Create a property named AdvisorQuestionnaire under the intent task class. Set the Property type to Single Page and specify the -Questionnaire class in the Page definition field.
    2. To display multiple questionnaire sections, copy the PegaMKT-Advisor-Work.DisplayQuestionnaire into the intent task class. By default, this flow supports one section. Add an assignment shape for each questionnaire section and create a backing flow action for each shape.
    3. Each flow action should reference the corresponding question section in the questionnaire class. Use the AdvisorQuestionnaire page property under the intent task class to switch context to the questionnaire class.
  12. Provide questionnaire context to Next-Best-Action decisions.
    1. To pass the responses to questionnaire questions as context to Next-Best-Action decisions, copy the MapQNAToContext data transform to the questionnaire class.
    2. Add an entry to the Response.Contexts page list for each question. For each entry, set values for the following fields.
      • Set .Type equal to "QnA".
      • Set .Key to the identifier of the question.
      • Set .Value to the value (that is, the response) of the question.
    3. Click Save.
  • Previous topic Adding a questionnaire to an intent task
  • Next topic Defining Pega Customer Decision Hub actions, containers, and offer types

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.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us