Interface IContactsBulkDeletionService
- Namespace
 - CMS.ContactManagement
 
- Assembly
 - CMS.ContactManagement.dll
 
Provides functionality for deleting contacts in bulk.
public interface IContactsBulkDeletionService
  - Extension Methods
 
Methods
BulkDelete(IWhereCondition, int, CancellationToken)
Deletes contacts and their associated objects (e.g. activities, contact group relations, customer journeys data) using a stored procedure.
Task BulkDelete(IWhereCondition whereCondition, int batchLimit = 0, CancellationToken cancellationToken = default)
  Parameters
whereConditionIWhereConditionWhere condition that specifies which contacts are deleted. A
nullvalue does not delete any contacts.batchLimitintOptional parameter that restricts the number of contacts deleted within a single call of the method. Omitting the parameter or using 0 as the value deletes contacts in batches of 1000 and automatically repeats until all contacts matching
whereConditionare deleted. If you set the batch size value, a single method call only deletes one batch of contacts, and you need to manually handle the batch processing and iteration.cancellationTokenCancellationTokenCancellation token.
Returns
- Task
 
Remarks
Service does not secure successful deletion of all data when an unexpected state (e.g. timeout) occurs, which can result in the partial deletion of the associated objects.