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:
- Create a survey/form in SurveyGizmo.
- Create the APEX page which will call SurveyGizmo API.
- Insert all data from API to SFDC objects.
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.
The API provides the data in the JSON format that can be used at our visualforce page. The integration page contains three filtration fields Survey ID, From Date and To Date.
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, the user can also further filter the records for synchronization by providing from Date and to Date to filter on the 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 a record in Survey Gizmo. To save these attachments to the respective record in Salesforce you will make HTTP requests 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 the list view.
I have gone through your blog and I am sure that it will definitely help others.
Thanks so much. We appreciate the kind words.
Nice Post. Thanks for sharing with us.
Awesome article on Salesforce Integration with SurveyGizmo.