Delete or Purge SharinPix Images

The SharinPix Invocable methods provide data privacy and security control over SharinPix Album and Images, ensuring compliance with GDPR.

GDPR also known as General Data Protection Regulation is a legal framework that sets guidelines for the collection and processing of personal information from individuals who live in and outside of the European Union (EU).

These methods offer two options:

  1. Permanently purge the album and its images, completely removing all data,

  2. Or perform a soft delete, which removes the content from active use while allowing for potential recovery.

The SharinPix Apex methods are as follows:

circle-exclamation

DeleteSharinPixImageAutomation

The DeleteSharinPixImageAutomation allows Salesforce Admin to delete a list of images with the option to purge. Deletion of images can also be performed in bulk, which prevents exceeding Salesforce governor limits.

The Invocable class takes two parameters:

  • Image Id(s) - List of SharinPix Image Public Ids to be deleted. Tip: You can leverage the SharinPix Image Sync feature to retrieve the image IDs.

  • Purge (Optional) - If set to true , SharinPix Image(s) will be PERMANENTLY deleted. If set to false , SharinPix images will be kept in the trash for a period of 30 days before being PERMANENTLY deleted. Default value is false

The above flow is an example of a flow used to delete all images on all Accounts having the status (a custom field) set to "Close". This will trigger the Flow to delete all images tagged as "delete" on the Account, as shown below.

After retrieving the list of SharinPix images to be deleted, the record collection is looped through to assign the Image Public ID to a new collection.

After building a list of SharinPix Image Public IDs, it can be provided to the invocable action DeleteSharinPixImagesAutomation. Below the purge parameter value is taken from a field named "Purge Images" on the triggering Account. This Flow will trigger and delete images on all triggering Account tagged as "delete".

circle-exclamation

DeleteSharinPixAlbumAutomation

The DeleteSharinPixImageAutomation allows Salesforce Admin to delete a SharinPix Album with the option to purge.

The Invocable class takes two parameters:

  • Album Id - Album ID of which all SharinPix Images will be deleted.

  • Purge (Optional) - If set to true , SharinPix Image(s) will be PERMANENTLY deleted. If set to false , SharinPix images will be kept in the trash for a period of 30 days before being PERMANENTLY deleted. Default value is false

The above flow will be triggered automatically whenever the Account Status is set to "Expire". Once this status change occurs, the Flow is triggered to delete the entire SharinPix Album, including all associated files contained within it, ensuring that the album is fully removed from the Salesforce organization without any residual content remaining (if purge = true), else all images on the SharinPix Album will be moved to trash for a period of 30 days.

The Invocable class takes as parameters the triggering SharinPix Album's ID which in this case is the Account's ID and purge parameter value is taken from a field named "Purge Album"

Need help to build your flow to delete SharinPix Images and Album?

The visual experts are here to help. Just send an email to [email protected]envelope to get some help so we can explain you how we can deliver services through our experts to assist you on that duty!

Last updated

Was this helpful?