Core Concept
Main Idea
This system manages marketing campaigns that target eligible clients. It handles both manual and scheduled automatic campaigns.
Key Components
Campaign
Can be MANUAL (user-triggered) or AUTOMATIC (scheduled)
When active, automatic campaigns are SCHEDULED
When inactive, automatic campaigns are IDLE
Contains an Expression that defines client eligibility criteria
Expression
Embedded script written in JavaScript or Python
Evaluates client data to determine eligibility
Example:
client.creditScore > 700 && client.income > 50000
Allows business users to define complex targeting criteria without coding
Campaign Execution
Represents a run of a campaign
Has statuses: NEW → IN_PROGRESS → FINISHED
May encounter errors (EXCEPTION_OCCURRED)
Contains a set of target clients filtered by the expression
Execution Checkers
Observer pattern components that react to execution status changes
NotifyFailedChecker: Triggers when execution fails to notify administrators
CreateAppChecker: Creates applications when execution finishes successfully
Basic Flow
Create and configure a campaign with eligibility expression
Activate the campaign
Execute the campaign (manually or automatically)
System evaluates the expression against potential clients
Only clients matching expression criteria are included
When status changes, checkers automatically:
Create applications for successful executions
Send notifications for failed executions
Deactivate when no longer needed
The system provides a powerful way to target specific client segments and automate the campaign execution process.
Last updated
Was this helpful?