Skip to main content
lane_h
Helper ⭐️
December 2, 2015
Question

Remove Test Survey Data

  • December 2, 2015
  • 13 replies
  • 243 views
We are trying to do some cleanup from some test surveys we did when we were implementing and trialling. 

The surveys won't allow me to delete them because they have responses. 

Any ideas on how to remove these?

13 replies

smorrisgainsightcom
Helper ⭐️⭐️⭐️
December 2, 2015
Hi Lane!  You can do this via a tool such as Workbench or Jitterbit by querying the Survey Response table then deleting records tied to the survey.  If you'd like me to walk to you through it, feel free to reach out to me via email and we can set up a time.

smorris@gainsight.com
smorrisgainsightcom
Helper ⭐️⭐️⭐️
December 4, 2015
For anyone else curious, we used Developer Console to delete all survey responses and participants to the specific surveys.  We deleted all records from both objects as they were just test records.  If you are deleting these for specific surveys, a WHERE clause would need to be added to the delete line.

1.  delete [SELECT Id FROM JBCXM__SurveyResponse__c];

2.  delete [SELECT Id FROM JBCXM__SurveyParticipant__c];
billy_lam
Contributor ⭐️⭐️
September 26, 2016
Hi Scott - had a question about your response. What is the functional difference between a SurveyResponse and a SurveyParticipant? I'm looking into different ways to query the system and wasn't sure how these two objects differentiated and worked
smorrisgainsightcom
Helper ⭐️⭐️⭐️
September 26, 2016
Hi Billy:

If you're using the standard Survey functionality (not Copilot) then here are how the objects interact:

When you add participants to the survey, they are added as records in the JBCXM__SurveyParticipant__c object.  Once they respond, their answer (with a lookup to the Participant object), is store in the JBCXM__SurveyResponse__c object.

Let me know if this helps.

Scott
billy_lam
Contributor ⭐️⭐️
September 26, 2016
Gotcha - that makes sense! Thanks Scott. How about in the Copilot scenario? 
smorrisgainsightcom
Helper ⭐️⭐️⭐️
September 26, 2016
In the case of Copilot, the response record is created in the same fashion, however the participant record isn't created until the user responds to the survey.  
billy_lam
Contributor ⭐️⭐️
September 26, 2016
Got it. Thanks again Scott! 🙂
richard_morgan
Contributor ⭐️⭐️
September 28, 2016
HI Scott,
Are there plans to allow for deletion of survey's through your interface? Seems that it would be more efficient than to do hard queries.

Thanks
Richard
kristin_f3c469
Contributor ⭐️⭐️⭐️⭐️⭐️
October 26, 2016
Agree with Richard. Capability to delete an unwanted survey is needed.
kristin_f3c469
Contributor ⭐️⭐️⭐️⭐️⭐️
October 26, 2016
One added note, I deleted the Survey Response and Survey Participant records, and was then able to delete the survey via the UI. Apparently the survey is not really deleted, because it was appearing in the reports on the NPS tab dashboard. So I had to hard delete the survey record from the NPS Survey Master object.