Braze JavaScript SDK
    Preparing search index...

    Function incrementCustomUserAttribute

    • Increment/decrement the value of a custom attribute. Only numeric custom attributes can be incremented. Attempts to increment a custom attribute that is not numeric will be ignored. If you increment a custom attribute that has not previously been set, a custom attribute will be created and assigned the value of incrementValue. To decrement the value of a custom attribute, use a negative incrementValue.

      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.

      • OptionalincrementValue: number

        Default 1. May be negative to decrement.

      Returns Promise<boolean | undefined>

      Resolves to a boolean that indicates whether the update was successfully enqueued. Resolves to undefined if the SDK is not initialized.