• Set custom user attributes

    User attributes are key-value pairs describing user traits. To use the set attributes, you must create the attribute with the same key in the Personalize Management console.

    This method can only be called after initializing the SDK.

    Parameters

    • clientAttributes: ClientAttributes

      Attributes set on the client. Must be an object.

    Returns Promise<void>

    await Personalize.set({ age: 20 });