protected override void ProcessContact(Contact contact) { Log.Logger.Debug($"Started processing contact {contact.Id}"); ContactIdentifier identifier = contact.Identifiers.FirstOrDefault(i => i.Source == _config.IdentifierSource); if (identifier != null || contact.Interactions.Any(i => i.EndDateTime > DateTime.UtcNow.AddYears(-1))) { Contact existingContact = SearchContact(contact); if (existingContact != null) { Log.Logger.Debug($"Found a contact for {contact.Id}, updating"); UpdateContact(existingContact, contact); } else { Log.Logger.Debug($"Contact {contact.Id} is new, adding"); AddContact(contact); } } else { Log.Logger.Information($"Contact {contact.Id} was skipped"); CurrentStatus.SkippedCounterAdd(1); } }