private static Entity PrepareCustomerSocialProfiles(Social socialprofile, Guid customerId, ITracingService trace)
        {
            if (socialprofile.Value == null)
            {
                return(null);
            }
            trace.Trace("Preparing Social Profile information - Start");
            Entity socialprofileEntity = null;

            if (!string.IsNullOrWhiteSpace(socialprofile.Value))
            {
                socialprofileEntity = new Entity(EntityName.SocialProfile, Attributes.SocialProfile.UniqueProfileId, socialprofile.Value);
            }
            if (!string.IsNullOrWhiteSpace(socialprofile.Value))
            {
                socialprofileEntity[Attributes.SocialProfile.ProfileName] = socialprofile.Value;
            }
            if (!string.IsNullOrWhiteSpace(socialprofile.SocialType))
            {
                socialprofileEntity[Attributes.SocialProfile.SocialChannel] = CommonXrm.GetCommunity(socialprofile.SocialType);
            }
            if (customerId != null)
            {
                socialprofileEntity[Attributes.SocialProfile.Customer] = new EntityReference(EntityName.Contact, customerId);
            }
            trace.Trace("Preparing Social Profile information - End");
            return(socialprofileEntity);
        }