Expression
The Expression class has two key properties:
expression: The actual script code (stored as text)
engineName: The scripting language to use ("javascript" or "python")
Purpose of Expressions in the Campaign Process
Expressions serve as dynamic eligibility filters that determine which clients should be included in a campaign. This provides several important benefits:
Dynamic Client Selection: Rather than hardcoding client criteria in the application, expressions allow for flexible, rule-based selection that can be changed without code modifications.
Business User Control: Marketing teams can create and modify campaign targeting criteria without requiring developer intervention.
Scripting Flexibility: Supporting both JavaScript and Python gives users options based on their preference or specific needs.
How Expressions Are Used
During Campaign Setup: When creating a campaign, administrators define an expression that represents eligibility criteria (e.g.,
client.creditScore > 700 && client.income > 50000
)During Execution: When the campaign executes:
The system retrieves potential client data
Passes each client through the script engine along with the expression
The expression evaluates to true or false for each client
Only clients that evaluate to true are included in the execution
Application Creation: After filtering, applications are created only for the eligible clients
This approach allows for precise targeting of clients based on complex criteria that can be easily modified between campaigns.
Last updated
Was this helpful?