Published — v. 4

Simple purchasing window lottery process

This new process is not a specific module but is rather a process that relies on a number of tools ready available in S-360. From a business point of view, people applying do not win tickets but instead "win the right to a purchasing window".

Registration

In order to register interests from customer, create one or more contact criteria and make them mandatory on one of your ticketshop, which will act as the registration portal. For example, you could have one criteria to let customer choose what products they are interested in. Existing customer will have to complete their profile and new contacts will register including the new criteria.

Lottery draw

In SAM, first build one or more target based on the criteria values. You can then create a random sub-target of "winners" using the options of the "duplicate" action in the target.

The randomness of the draw is based on the Random Java class. A new random seed is created, then used to create a random index generator, which is used to get n random indexes of contacts inside the source target. The target size is the size of the source target.

final Integer randomSeed = new Random().nextInt(10000);
final Random random = new Random(randomSeed);
final Set<Integer> randomIndexes = Sets.newHashSet();
while (randomIndexes.size() < subsetTargetSize) {
    final Integer index = random.nextInt(sourceTargetSize);
    randomIndexes.add(index);
}

Purchasing window

Using contact advantages, link the "winners" to the advantage and invite them to come and purchase.

This step can be repeated with a 2nd, 3rd, etc. set of contacts to generate a sequence of purchasing windows.


© SecuTix 2023 - Login