Building complex surveys with analytics on


An India based company which offers a powerful combination of analytics and visualizations that deliver highly accurate and insightful dashboards and help to make timely data driven decisions.


Client wanted us to develop a “Custom Survey Application” in using Apex classes and Visualforce pages to manage feedbacks of employees on a large scale in the organization.
The questions are related to different types of areas like Health Benefits, Insurance Benefits, Wellness, Leave etc.
Details of main challenges :

  • To arrange the questions up to 6 levels hierarchy on the page.
  • Need to display more than thousand questions on a single Visualforce page using the hierarchy(Parent and child).
  • Participant can fill the survey form, save it using Save Button, data will be stored in different custom objects in Salesforce and finally submit the response using Submit Button when all the mandatory questions has been filled by the Participant. Otherwise an error message will be shown on the page. On Successful submission of the form, the data will be stored in different custom objects in Salesforce.
  • Participant can switch on different Tabs(e.g Health Benefits to Insurance) without clicking on save button and previously data filled by Participant is automatically saved.


We developed the application using Visualforce pages and Apex on Enterprise license. We have developed object structure for this application and manage the questions in hierarchical manner. There are 6 Custom objects which is used in this application :-

  • Survey
  • Response
  • Question
  • Survey user
  • Company Information
  • Benefit Overview
We created the Visualforce page on which participant can enter the response for the questions and response will saved in Response object with particular Question.We stored the questions in objects as fields and records. We also created Apex trigger and batch classes for achieving the functionality. We have used Apex to construct mail functionality.
The Admin can track the user activity with the help of stage of the user. There are 5 stages in this Survey. Each stage has its specific significance.
  • Stage 1 - User Login Pending
  • Stage 2 - Survey In Progress
  • Stage 3 - Survey Submitted
  • Stage 4 - Validation in Progress
  • Stage 5 - Validation Completed
We also worked on the analytics side on this project and built custom reports in the Salesforce using VF pages.


  • Easy to manage the responses of the related questions of the Participants.
  • Easy to analyze the responses of all the Participants.
  • Application consists of more than 3000 questions, so Participants can fill the form in 1-2 days. If Participants again login into the Survey after logout, all the data which user has filled previously has been auto populated in the survey form. The data will not be lost if the participant has saved the form before logout.
  • In this application, we provided username and password for each participant and user can login with own credentials. We done this through a Custom login page leveraging the use of platform instead of Standard Community login page.
  • We made this application using Salesforce license.