Loading

Survey Data Deletion When Removing Associated Flow Versions

Publiceringsdatum: May 6, 2026
Beskrivning

Overview

Salesforce Surveys are built on the Flow framework. Each Survey is backed by Flow versions that define its structure and behavior.
When Flow versions associated with a Survey are deleted, the corresponding Survey Versions are also removed. This triggers a cascade deletion of all related Survey data, including:

  • Survey Invitations
  • Survey Responses
  • Survey Question Responses

This behavior is part of the current platform design. You can find more details here.

Impact

If Flow versions linked to Surveys are deleted:

  • All associated Survey data may be permanently deleted
  • Deleted data may bypass the Recycle Bin (hard delete)
  • Data cannot be recovered once removed
  • Survey-related objects are not API insertable, preventing data restoration via Data Loader or APIs

Important Considerations

  • Deleting inactive Flow versions may still impact active or historical Survey data if those versions are linked to Surveys
  • Survey data deletion occurs automatically as part of referential integrity enforcement
  • There is currently no supported backend recovery mechanism for this data once deleted

Lösning

Best Practices / Recommendations

To avoid unintended data loss:

  • Do not delete Flow versions associated with Surveys unless you are certain they are no longer required
  • Before performing cleanup:
    • Identify Flows with ProcessType = 'Survey'. Please note that this attribute is not visible in the Salesforce UI and can only be accessed via API (for example, using  Developer Console, Workbench, or other API tools).
    • Validate whether they are linked to active or historical Survey data
  • Maintain regular external backups of Survey data (e.g., via reporting or data export tools)
  • Consider implementing a data retention and archival strategy for Survey responses

Workaround (Data Reconstruction Approach)

If data has already been deleted and a backup is available, a partial reconstruction may be attempted using the following approach:

  • Recreate the Survey manually in Salesforce
  • Recreate Survey Invitations
  • Use the Connect API to simulate survey submissions using existing data

Note:

  • This is not a true restoration method
  • Requires data transformation and development effort
  • Subject to API and licensing limits

Limitations

  • SurveyResponse and related objects are not insertable via standard APIs (Data Loader, REST, SOAP, Apex)
  • No internal or external tooling is currently available to directly rehydrate deleted Survey data
Knowledge-artikelnummer

005321734

 
Laddar
Salesforce Help | Article