private ContactIdentifier IdentifyAndUpdateEmailContact(string toAddress)
        {
            var basicContact = contactFactory.CreateContactWithEmail(toAddress);

            xDbService.IdentifyCurrent(basicContact);
            xDbService.UpdateEmail(basicContact);
            return(new ContactIdentifier(basicContact.IdentifierSource, basicContact.IdentifierValue, ContactIdentifierType.Known));
        }
        protected override bool Execute(T data, FormSubmitContext formSubmitContext)
        {
            if (data.FieldIdentifyContactId == null || data.FieldIdentifyContactId == Guid.Empty)
            {
                logger.LogWarn("Empty fieldIdentifyContact id");
                return(false);
            }

            var field   = GetFieldById(data.FieldIdentifyContactId.Value, formSubmitContext.Fields);
            var contact = xDbContactFactory.CreateContact(GetValue(field));

            if (string.IsNullOrEmpty(contact.IdentifierValue))
            {
                return(true);
            }
            xDbService.IdentifyCurrent(contact);
            return(true);
        }