Survey tools provide easy and cost effective ways of collecting information from a large number of individuals. Instead of collecting data on a Salesforce portal, you can integrate your survey tool with Salesforce and insert data onto a custom or standard Salesforce object. In this article I will give you pointers on how to insert data from Survey Gizmo (www.surveygizmo.com) into salesforce objects. Obviously you can do the same with other survey tools too (as long as APIs are exposed).
There are 3 basic steps to complete this integration:
1.Â Â Â Â Â Â Create a survey/form in SurveyGizmo.
2.Â Â Â Â Â Create APEX page which will callÂ SurveyGizmoÂ API.
3a.Â Â Â Insert all data from API to SFDC objects.
3b.Â Â Apply check to not insert duplicate data in SFDC data.
To start with it, we need to create a custom visualforce page to consume Survey Gizmo API and apex controller to synchronize Survey Gizmo.
Data from surveygizmo api
Survey ID -> to get the data of a particular survey. [Mandatory]
From Date, to Date -> date range for the records creation date in survey gizmo. [Optional]
Visualforce page to synchronize data
For a particular survey, user can also further filter the records for synchronization by providing from Date and to Date to filter on created date of records in Survey Gizmo.
After applying all the filters, users click on the sync data button & fetch records from Survey Gizmo. The custom controller inserts the survey records to a custom object and contact & account objects.
Survey Gizmo provides the urls for attachment that were uploaded at the time of creating record in Survey Gizmo. To save these attachments to the respective record in Salesforce you will to make http request for each individual record because there is a limitation of 10 callouts to an HTTP request or an API call. To overcome this problem we created an apex job which is started after the Survey records had been synced in Salesforce.
Â NOTE: You can monitor the attachment sync status at â€œSetup-> Monitor -> Apex jobâ€.
This button is used to assign bulk records to a user for some specific processing.Â User can select the number the records from the list by checking the checkbox available with every record in Salesforce in standard List View. After selecting the records user can click on the button that will redirect it to a custom visualforce page & it will list all the selected records from list view.