public async Task <ActionResult> Index() { Logger.LogInformation("Navigated to MyProfile/Index."); (var preferences, var lowellReference) = await GetCustomerPreferences(); MyProfileVm vm = new MyProfileVm() { LowellReference = lowellReference, CustomerEmail = GetEmail(), LoggedInUserID = LoggedInUserId, ContactPreferencesVm = new ContactPreferencesVm { MobileNumber = preferences?.PrimaryPhone, AllowContactBySms = (preferences == null) ? false : preferences.ContactPreferenceSMS, AllowContactByEmail = (preferences == null) ? false : preferences.ContactPreferenceEmail, LowellReference = lowellReference }, EnableContactPreferences = _portalSetting.Features.EnableContactPreferences }; _gtmService.RaiseMyProfileViewedEvent(vm, LoggedInUserId); await _webActivityService.LogMyProfileViewed(lowellReference, LoggedInUserId); return(View(vm)); }