Description
Feature allows to setup a campaign with multiple message pools and click actions which will be used based on poly campaign map configuration.
This allows user to have a single campaign with a flexibility of things like multiple message pools and a set of target URLs for each message.
Restrictions
Poly campaign are always running on some interval. This interval determines the periodicity of all campaign states that are possible. In other words, it is only possible to fulfill scenario where campaign transitions happen with an interval that is evenly divisible by the campaign’s base interval.
Capabilities
Following attributes are possible to be adjusted on the fly:
- pool
- messages_per_user (number of messages per user)
- msg_template_id (click action template ID)
- segment
- drop_messages (an indicator to be used when a certain iteration step should be skipped)
Use cases
Different segments
This particular use case allows to setup campaign that will target different audiences, depending on the iteration cycle. By having a campaign running with an interval, it means, that we can prioritize certain segments over the others, by having a cycle that contains more of such segments.
Examples
Online/offline
Let’s say we want something like this:
- online users receive messages every 20 seconds
- offline users receive messages every 60 seconds
In order to achieve this, we can create a campaign with 2 segments and 3 iterations:
- 1st iteration: online users segment
- 2nd iteration: online users segment
- 3nd iteration: without segment (will send messages to all active users, regardless of their online status)
Awake & clicked users
Let’s say we want something like this:
- users that were awake in the last 10 minutes receive messages every 20 seconds
- users who clicked in the last 20 minutes receive messages every 40 seconds
- everyone else receives messages every 60 seconds
In order to achieve this, we can create a campaign with 3 segments and 3 iterations:
- 1st iteration: awake users segment
- 2nd iteration: awake + clicked users segment
- 3nd iteration: without segment (will send messages to all active users, regardless of their online status)
Technical details
Feature is activated by a campaign.is_poly flag and is heavily rely on the iter_cycle attribute to define the iteration cycle in which campaign’s context will fall into different message pools and click actions configs (based on the poly-campaign-map entity).
By having is_poly flag activated, manager service once receiving a new campaign request, will go for the poly-campaign-map entity to get the list of message pools and click actions to be used for the campaign. Pool will be replaced with a new one and msg_template_order_id will be put into the MessageInitiatorBatch part of the MessageInitiatorRequest. This will be used later to get the correspondent click-action entities by directory-messages service (using TemplatesDirectoryHandler)