cancel
Showing results for 
Search instead for 
Did you mean: 

Inquiry about Personal Data Erasure Feature in SAP Commerce Cloud

Mehdi_Elhiti
Discoverer
275

Hi everyone,

I’m currently exploring the Personal Data Erasure feature in SAP Commerce Cloud, which allows for the deletion of customer data using cron jobs and hooks. I noticed that this functionality is only available for customers and not for employees.

Could anyone provide insights on why this distinction exists? Are there any recommended approaches for managing employee data deletion that comply with data protection regulations?

Thank you for your help!

SAP Commerce SAP Commerce Cloud 

View Entire Topic
Harish_Vatsa
Active Contributor

The distinction seem to be the GDPR policy which is mostly customer specific.

In order to create an Employee Erasure module, its better to write your own Employee Retention jobs which takes Queries the employee model 

final EmployeeModel employeeToBeProcessedTemplate = new EmployeeModel(); final EmployeeModel employeeToBeProcessed = flexibleSearchService.getModelByExample(employeeToBeProcessedTemplate);

Post this you can find what all values you need to delete from the employeeToBeProcessed and then start removing if by using modelService.remove()​
For example - 

 
final Collection<AddressModel> toBeRemovedAddresses = 
employeeToBeProcessed.getAddresses
modelService.removeAll(toBeRemovedAddresses());

You can schedule the job and write the logic to delete the employee based upon your need like (last login time, active or not etc)