Applies to versions > 2.5.0
HsM stores a customer status with each customer that can be Active or Deleted. This status used to implement a soft -deletion of customers. A customers with status Active is called an active customer, a customer with status Deleted is called a deleted customer. Transitioning a customer from status Active to Deleted is called soft-deleting; transitioning a customer's status from Deleted to Active is called restoring.
Modifying the customer status, i.e. soft-deleting and restoring is bound to the permission EDIT_CUSTOMER_STATUS .
When soft-deleting a customer, data stored or associated with this customer is not modified. I.e. a customer can be soft-deleted and then restored with virtually no data loss. The only exception is that if a customer is part of a user's recently accessed customers or favorite customers, this information will be lost when the customer soft-deleted. I.e. even if the is restored at a later point in time, it will not again appear in the recently accessed customers or favorite customers of any user.
Following restrictions apply when soft-deleting a customer:
•Customers that are ancestors in a customer relationship cannot be soft-deleted. I.e. only customers that have no active descendants can be soft-deleted.
•The root customer can not be soft-deleted.
•Customers marked as externally managed can only be soft-deleted via the Synchronization API.
•Customers not marked as externally managed can only be soft-deleted via the Standard API.
Following restrictions and rules apply when restoring a customer:
•As the uniqueness of the customer code is not checked for deleted customers HsM HsM has to check the uniqueness of a deleted customer's customer code within all active customers before restoring. If HsM finds that the customer code of the deleted customer would violate that uniqueness the customer code is erased before restoring.
•When restoring a customer, HsM checks if all ancestors of this customer are active customers - only then the customer can be restored.
•Customers marked as externally managed can only be restored via the Synchronization API.
•Customers not marked as externally managed can only be restored via the Standard API.
The Standard API allows setting the customer status (to Active and Deleted) and allows searching and listing customers with status Deleted. All other endpoints of the Standard API will not recognize customers in status deleted, i.e. will act as if those customer were non-existent.
Note that clients that work offline with cached customer data (e.g. when using the Hagleitner 360 App) might not be able to synchronize data changes of a customer that was meanwhile deleted on the Client Service.
The Synchronization API handles customers in status Deleted and Active agnostic. I.e. customers can be retrieved and modified irrespective of their status.
Devices registered with deleted customers can be registered at other customers, since HsM considers those devices as free devices. I.e. Via device registrations it is possible to actually modify the device registrations of a deleted customer.