private void SetCinemaVisitorInfoFacet() { CinemaVisitorInfo visitorInfo = new CinemaVisitorInfo() { FavoriteMovie = CandidateContactInfo.FavoriteMovie }; Client.SetFacet(IdentifiedContactReference, CinemaVisitorInfo.DefaultFacetKey, visitorInfo); }
public MappingResult Map( string facetKey, Facet source, ContactMappingInfo mappings, string[] data) { if (facetKey != FacetName) { return(new NoMatch(facetKey)); } if (facetKey != FacetName) { return(new NoMatch(facetKey)); } if (!(source is CinemaVisitorInfo newMarketingFacet)) { newMarketingFacet = new CinemaVisitorInfo(); } var marketingInfo = newMarketingFacet; //var companyName = mappings.GetValue(FormatDataField(nameof(marketingInfo.CompanyName)), data); //var division = mappings.GetValue(FormatDataField(nameof(marketingInfo.ContactDivision)), data); //var lineOfBusiness = mappings.GetValue(FormatDataField(nameof(marketingInfo.ContactLineOfBusiness)), data); //var phone = mappings.GetValue(FormatDataField(nameof(marketingInfo.ContactPhone)), data); //var marketingType = mappings.GetValue(FormatDataField(nameof(marketingInfo.ContactType)), data); //if (!string.IsNullOrWhiteSpace(companyName)) { marketingInfo.CompanyName = companyName; } //if (!string.IsNullOrWhiteSpace(division)) { marketingInfo.ContactDivision = division; } //if (!string.IsNullOrWhiteSpace(lineOfBusiness)) { marketingInfo.ContactLineOfBusiness = lineOfBusiness; } //if (!string.IsNullOrWhiteSpace(phone)) { marketingInfo.ContactPhone = phone; } //if (!string.IsNullOrWhiteSpace(marketingType)) { marketingInfo.ContactType = marketingType; } return(new FacetMapped(facetKey, marketingInfo)); }