# User Info

Now you can Set up and update user information in a simpler and clearer way.

# API

# UpdateUserInfo()

You can call this method to update user information when users log in, and you can transfer more information through field customdata & usertags.

UserConfig userConfig = new UserConfig.Builder()
        .SetUserId("123456789")
        .SetUserName("AIHelper")
        .SetUserTags("recharge,suggestion")
        .build();
AIHelpSupport.UpdateUserInfo(userConfig);

# ResetUserInfo()

Call this method to inform AIHelp when user logs out to ensure the accuracy for tourist-user's information:

AIHelpSupport.ResetUserInfo();

# Definition

# UserConfig

  • Type: UserConfig
  • Default: null
  • Detail: Configuration for user info, such as username, user id, user tags, etc.

# userId

  • Type: string
  • Default: a generated random number
  • Detail: A unique identifier for current user, can not be 0 or -1, random number by default

# userName

  • Type: string
  • Default: anonymous
  • Detail: The display name for current user

# serverId

  • Type: string
  • Default: -1
  • Detail: The server ID for current user

# userTags

  • Type: string
  • Default: ''
  • Detail: split multiple tags by ',', empty string by default. When Setting tags for users, you should ensure that the tags you are Setting has been added in advance in the dashboard of AIHelp:

# customData

  • Type: string
  • Default: ''
  • Detail: custom data to display in dashboard with a jsonString format: {"key":"value", "key":"value"}

# Scenario

Let's assume a scenario where you want to get some information about your users in the dashboard of AIHelp.

The details are as follows:

1、User level;

2、total recharge amount;

3、remaining bills;

Then, the code example for this scenario is as follows:

JSONObject customData = new JSONObject();
customData.put("level", 34);
customData.put("total_recharge", 300);
customData.put("remaining", 56);

UserConfig userConfig = new UserConfig.Builder()
        .SetUserId("123456789")
        .SetUserName("AIHelper")
        .SetUserTags("recharge,suggestion")
        .SetCustomData(customData.toString())
        .build();

AIHelpSupport.UpdateUserInfo(userConfig);

# Page Example

After the configuration is completed, when the user submits a complaint, you can get this in the AIHelp dashboard:

Last Updated: 6/1/2023, 2:02:21 AM