Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Update User Profile
Method Objective
The method updates the user's profile or creates a new profile bound to the user's current device if it was not created earlier.
Note |
---|
If you don't have user data, never send bogus data. It'll cause problems in profile handling in the future. For example, don't send a non-existent email, like |
Syntax and parameters
Code Block | ||||
---|---|---|---|---|
| ||||
PersonaClick sdk.profilesetProfileData(params); { callback } |
Name | Type | Requirement | Description |
---|---|---|---|
params | HashMap | required | Object with request parameters. |
callback | function | optionally | Callback Function |
Request Parameters
Name | Type | Description |
---|---|---|
email userEmail | string | User Email. |
first_namefirstName | string | User First Name. |
gender | string | User Gender (m – male, f – female). |
iduserLoyaltyId | string | Store side The Loyalty Program user ID (loyalty card). |
last_namelastName | string | User Surname. |
phoneuserPhone | string | User Phone. |
Additional request parameters
Name
Description
. |
birthday | string | User birthday in the format YYYYY-MM-DD. |
age | string |
User age (in years). | ||
location | string | The user's current location from the list of locations in the product feed. |
The "auto" object properties
Name
Description
Vehicle Brand.
Vehicle's VDS/VIN.
The "kids" object properties
Name
Description
Example of use
Code Block | ||||
---|---|---|---|---|
| ||||
HashMap<String, String> params = new HashMap<>(); params.put("id", "100500"); params.put("email",sdk.setProfileData( userEmail: "john.doe@examplemail.com"); params.put("phone", "4400114527199"); params.put("first_name", "John"); params.put("last_name", "Doe"); params.put("birthday",, userPhone: "4400114527199", userLoyaltyId: "000001234567", birthday: "1990-03-11"); params.put("age",, age: "31"); params.put("gender", "m"); params.put("location", "NY"); params.put("bought_something", "1"); params.put("loyalty_id firstName: "John", "000001234567"); params.put("loyalty_card_location", "NY"); params.put("loyalty_status", "5% discount"); params.put("loyalty_bonuses", "1123"); params.put("loyalty_bonuses_to_next_level", "1877"); params.put("fb_id" ,"000000000354677"); params.put("vk_id", "vk031845"); params.put("telegram_id", "0125762968357835"); params.put("kids", "[{\"gender\":\"m\",\"birthday\":\"2001-04-12\"},{\"gender\": \"f\", \"birthday\": \"2015-07-28\"}]"); params.put("auto", "[{\"brand\":\"Nissan\",\"model\":\"Qashqai\",\"vds\":\"TM7N243E4G0BJG978\"}]"); PersonaClick.profile(params); lastName: "Doe", location: "NY", gender: "m" ) { (profileDataResp) in print("Profile data callback") } |
Table of Contents | ||||
---|---|---|---|---|
|