Braze React Native SDK - v21.0.0
    Preparing search index...

    Function setCustomUserAttribute

    • Sets a custom user attribute. This can be any key/value pair and is used to collect extra information about the user.

      Parameters

      • key: string

        The identifier of the custom attribute. Limited to 255 characters in length, cannot begin with a $, and can only contain alphanumeric characters and punctuation.

      • value: string | number | boolean | object | string[] | Date | object[] | null

        Can be numeric, boolean, a Date object, a string, an array of strings, an object, or an array of objects. Strings are limited to 255 characters in length, cannot begin with a $, and can only contain alphanumeric characters and punctuation. Passing a null value will remove this custom attribute from the user.

      • Optionalcallback: Callback<boolean>

        A callback that receives the function call result.

      Returns void

    • Sets a custom user attribute. This can be any key/value pair and is used to collect extra information about the user.

      Parameters

      • key: string

        The identifier of the custom attribute. Limited to 255 characters in length, cannot begin with a $, and can only contain alphanumeric characters and punctuation.

      • value: string | number | boolean | object | string[] | Date | object[] | null

        Can be numeric, boolean, a Date object, a string, an array of strings, an object, or an array of objects. Strings are limited to 255 characters in length, cannot begin with a $, and can only contain alphanumeric characters and punctuation. Passing a null value will remove this custom attribute from the user.

      • merge: boolean

        If the value is object, this boolean indicates if the value should be merged into the existing key.

      • Optionalcallback: Callback<boolean>

        A callback that receives the function call result.

      Returns void