How to Create User Profiles
Creating User Profiles on iOS
1. Create User Profile.
You can create rich profiles by sending user fields as shown below.
12345678910111213141516171819MarketoLead *profile = [[MarketoLead alloc] init];// Get user profile from network and populate[profile setEmail:@"jd@makesomething.com"];[profile setFirstName:@"John"];[profile setLastName:@"Doe"];[profile setAddress:@"1234KingFishSt"];[profile setCity:@"SouthPadreIsland"];[profile setState:@"CA"];[profile setPostalCode:@"78596"];[profile setCountry:@"USA"];[profile setGender:@"male"];[profile setLeadSource:@"_facebook_ads"];[profile setBirthDay:@"01/01/1985"];[profile setFacebookId:@"facebookid"];[profile setFacebookProfileURL:@"facebook.com/profile"];[profile setFacebookProfilePicURL:@"faceboook.com/profile/pic"];[profile setLinkedInId:@"linkedinid"];[profile setTwitterId:@"twitterid"];
12345678910111213141516171819let profile = MarketoLead()// Get user profile from network and populateprofile.setEmail("jd@makesomething.com")profile.setFirstName("John")profile.setLastName("Doe")profile.setAddress("1234KingFishSt")profile.setCity("SouthPadreIsland")profile.setState("CA")profile.setPostalCode("78596")profile.setCountry("USA")profile.setGender("male")profile.setLeadSource("_facebook_ads")profile.setBirthDay("01/01/1985")profile.setFacebookId("facebookid")profile.setFacebookProfileURL("facebook.com/profile")profile.setFacebookProfilePicURL("faceboook.com/profile/pic")profile.setLinkedInId("linkedinid")profile.setTwitterId("twitterid")
2. Add more standard fields.
-
1234// Add other custom fields[profile setFieldName:@"mobilePhone"withValue:@"123.456.7890"];[profile setFieldName:@"numberOfEmployees"withValue:@"10"];[profile setFieldName:@"phone"withValue:@"123.456.7890"];
-
1234// Add other custom fieldsprofile.setFieldName("mobilePhone" , withValue :"123.456.7890");profile.setFieldName("numberOfEmployees", withValue: "10");profile.setFieldName("phone", withValue:"123.456.7890");
3. Report User Profile.
1234Marketo *sharedInstance = [Marketo sharedInstance];// This method will update user profile[sharedInstance associateLead:profile];
1234let marketo = Marketo.sharedInstance()// This method will update user profilemarketo.associateLead(profile)
Creating User Profiles on Android
1. Create User Profile.
You can create rich profiles by sending user fields as shown below.
12345678910111213MarketoLead profile = new MarketoLead();// Get user profile from network and populatetry {profile.setEmail("htcone3@gmail.com");profile.setFirstName("Mike");profile.setLastName("Gray");profile.setFacebookId("facebookid");profile.setAddress("1234 King Fish Blvd");}catch (MktoException e) {e.printStackTrace();}
2. Add more standard fields.
123456789101112// Add other custom fieldsprofile.setCustomField("mobilePhone", "123.456.7890");profile.setCustomField("numberOfEmployees", "10");profile.setCustomField("phone", "123.456.7890");profile.setCustomField("rating", "R");profile.setCustomField("facebookDisplayName", "mini");profile.setCustomField("facebookReach", "10");profile.setCustomField("facebookReferredEnrollments", "100");profile.setCustomField("facebookReferredVisits", "9998");profile.setCustomField("lastReferredEnrollment", "03/01/2015");profile.setCustomField("lastReferredVisit", "03/01/2015");profile.setCustomField("linkedInDisplayName", "Android");
3. Report User Profile.
1234MarketoLead profile = new MarketoLead();// This method will update user profilemarketoSdk.associateLead(profile);