Random()

Returns a random number within a defined range.

Availability 

Marketing Cloud Engagement ✅ Yes
Marketing Cloud Next ✅ Yes

This function became available in Marketing Cloud Next during the Summer ’26 release (API version 67.0).

Syntax 

1Random(lowerBound, upperBound)

The Random() function has two parameters:

  • lowerBound (number): Required. The smallest number that the function can return.
  • upperBound (number): Required. The largest number that the function can return.

Usage 

To use this function, pass it a lower and an upper bound. The numbers can be positive or negative integer or decimal numbers. The order of the upperBound and lowerBound parameters in the function doesn’t matter.

1%%=Random(42,32256)=%%

The function returns a random number that is greater than or equal to the smallest number, and less than or equal to the largest number.