public override void DeleteItems(List <DataCompareItem> items, IDataSynchronizationStatus status) { if (items != null && items.Count > 0) { int currentItem = 0; foreach (var item in items) { if (!status.ContinueProcessing) { break; } var itemInvariant = new DataCompareItemInvariant(item); //Example: Get the item ID from the Target Identifier Store var item_id = itemInvariant.GetTargetIdentifier <int>(); try { //Call the Automation BeforeDeleteItem (Optional only required if your supporting Automation Item Events) Automation?.BeforeDeleteItem(this, itemInvariant, item_id); if (itemInvariant.Sync) { #region Delete Item var result = WebRequestHelper.DeleteRequestAsJson(null, DatasourceInfo.GetPipedriveItemEndpointUrl(item_id)); #endregion //Call the Automation AfterDeleteItem Automation?.AfterDeleteItem(this, itemInvariant, item_id); } ClearSyncStatus(item); //Clear the Sync Flag on Processed Rows } catch (WebException e) { Automation?.ErrorItem(this, itemInvariant, item_id, e); HandleError(status, e); } catch (SystemException e) { Automation?.ErrorItem(this, itemInvariant, item_id, e); HandleError(status, e); } finally { status.Progress(items.Count, ++currentItem); //Update the Sync Progress } } } }