Configuring bucket attributes

There are two types of bucket attributes: Percentile buckets and Value buckets.

  • Percentile buckets

    Percentile buckets use percentages to define bucket ranges.

    Example: "Bucket 1" could represent a range of 10% - 20%, while "Bucket 2" could represent a range of 20% - 30%, and so on.

  • Value buckets

    Value buckets use values to define bucket ranges.

    Example: "Bucket 1" could represent ages 0 - 18, while "Bucket 2" could represent ages 19 - 35.

Configuring each bucket attribute type requires a slightly different setup.

Percentile buckets

For Percentile buckets, define the percentage ranges for your buckets. For example, you might define the following:

  • Bucket 1: 0% - 10%

  • Bucket 2: 11% - 25%

  • Bucket 3: 26% - 75%

  • Bucket 4: 76% - 90%

  • Bucket 5: 91% - 100%

These percentages are defined using the lowerBound and upperBound parameters, where lowerBound represents the lower value, and upperBound represents the greater value.

For example: Consider "Bucket 1" above, where you would define a lowerBound of 0%, and an upperBound of 10%.

When defining bounds, you can set a type of INCLUSIVE or EXCLUSIVE.

  • Inclusive bounds

    Includes the percentage value within the range.

  • Exclusive bounds

    Excludes the percentage value from the range.

You can also use the rangeValue parameter in your config to label the output. For example, if a customer is in "Bucket 3" (where the behavior lands somewhere between 26% and 75%), and you want that bucket to have a particular name, such as "Average", then set the data parameter to "Average". Or if you prefer to label the bucket more plainly, according to your use case, then set the data parameter to something like "26-75%".

Value buckets

Value buckets define a series of value bounds for your buckets.

For example, in an "age bucket", you might define the following:

  • Bucket 1: age 0 - age 18

  • Bucket 2: age 19 - age 35

  • Bucket 3: age 36 - age 59

  • Bucket 4: age 60 - age 75

  • Bucket 5: age 76 and above

The values are defined using the lowerBound and upperBound parameters, where lowerBound represents the lower value, and upperBound represents the greater value.

For example: Consider "Bucket 1" above, where you would define a lowerBound of 0, and an upperBound of 18.

When defining bounds, you can set a type of INCLUSIVE or EXCLUSIVE.

  • Inclusive bounds

    Inclusive includes the static attribute in the range

  • Exclusive bounds

    Exclusive excludes the static attribute from the range

Use rangeValue in your config to label the output. For example, if a customer is in "Bucket 3" (being aged somewhere between 36 and 59), and you want that bucket to have a particular name, such as "Prime Consumer", then set the data parameter to "Prime Consumer". Or if you prefer to label the bucket more plainly, according to your use case, then set the data parameter to something like "36-59".

Defining Buckets without bounds

Omit the upperBound from your config to achieve a value range without a ceiling (for example, "Bucket 5" where the age is anyone aged 76 and older without a limit). Similarly, you can omit the lowerBound (or not) from your config to achieve a value range without a floor (for example, "Bucket 1" where the age is anyone younger than 18, but bucket 1 can also include a lowerBound value of 0).

Learn more

Bucket Attributes API