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
whereCondition
IWhereConditionWhere condition that specifies which contacts are deleted. A
null
value does not delete any contacts.batchLimit
intOptional 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
whereCondition
are 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.cancellationToken
CancellationTokenCancellation 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.