Prize drawing conditions:
Feature requirements:
As a result of the analysis of the competition conditions and implementation requirements, it was determined: if one user shares something (for example, a link to an event) with another user and as a result expects a certain action from him in order to receive any kind of a reward, this is a classic referral system.
Therefore, we decided not only to provide the client with the required functionality within the current needs, but to implement a complete referral system management. This would allow us to have a ready-made tool for managing any activity on the site or application in the future.
In the case of a client task, this is a drawing of a book for sharing the information about the event, but such a tool can cover many more cases:
As can be seen from the examples from previous slide, the referral system allows you to work with almost any kind of user activity on the site. Its scope of application is not limited to the interaction of an affiliate (the one who offers to perform an action) and a referral (the one who performs the action) — one user is enough to track the activity.
If a site/application is interested in increasing user engagement, implementing such an activity management system is a great way to achieve this goal.
Our application developed for a client is an example of a decoupled approach that is actively used in systems built on Drupal — all data is stored and updated on the backend (Drupal-side), the application “communicates” with the backend and is responsible for the part of the system the end user intercats with (Frontend-side).
Existing solutions (Drupal modules) for working with the referral systems had limited functionality (were not flexible enough), or did not pass the checks for the code quality.
For this reason, a custom module for managing the referral system was developed for the task, which provides the ability to interact with it not only on the side of the website, but also for various kinds of applications.
Before starting development, we determined which concepts the system should be able to work with:
The referral system administration section allows the site administrators to manage referral records and activities.
Visual regression testing. The first image shows a screenshot created on a test run before deployment.
For the case of our book drawing, in addition to setting the time for achievement assignment, the activity type has a setting for the pop-up message that will be shown to the participant in the application after the conditions of the draw are met.
Client informed us, that it may be necessary to offer the winners to download a file in the future, this possibility was implemented in advance.
Visual regression testing. The first image shows a screenshot created on a test run before deployment.
When developing the functionality of referral activities, we took into account that there can be many different types of activities, therefore the basic type of activity, which functionality the specific to the business logic activity types will be extend, should assume variability and should not be strictly tied to our case.
For the “classic” version of referral activities, the functionality of generating a unique referral link was implemented (by sharing such link the system can uniquely identify the affiliate user).
Visual regression testing. The first image shows a screenshot created on a test run before deployment.