The function ecx:distribute generates a random result according to the standard uniform distribution. The parameters define the ratio of the probability that the result returns the value true. The value returned is a Boolean data type.

Example

A message contains a personalized message which includes a special offer. The offer is only visible to a percentage of randomly selected recipients.

The expression that inserts personalization into a message is constructed as follows:

<%InsertIf expression="${ecx:distribute(1,5)}" id="name"%>Text1<%/InsertIf%>
CODE

In this example, there is a 20% (1 in 5) chance that personalization is displayed in the message.

The ID assigned to the personalization identifies the variation in the statistics and helps measure the performance of messages sent with the personalized message part.

The ID assigned to the personalization in the expression is limited to 35 characters.

Structure​

ecx:distribute(integer, integer)

Parameters​

Parameter

Description

integer

Specifies a percentage of the total distribution.

integer

Specifies the total number considered for the distribution.