Build the rule in an editor. No SQL, nothing to release.
Every mission, streak and shop item asks the same question: does this customer qualify? You build that question yourself by picking from dropdowns, so a marketing manager can write it and no developer has to be involved.
Every line is a thing, a comparison, and a value you choose.
Every line reads the same way, such as money spent, is at least, 50. Only the first part varies: it can be a fact you hold about the customer, a running total, what they did in a period, or a detail attached to one thing they did.
Something you know about them
Country, tier, signup source. You send them, and none of it has to be personal.
A number you track, as a running total
Lifetime spend, orders placed, lessons finished. The whole picture, not the last few weeks.
What they did in a period
Count, sum, average, lowest or highest, over a window you choose.
A detail on one thing they did
It narrows the question above: how much did they spend on card.
The same editor writes mission goals, streak days and shop rules.
A rule you can write for a mission goal, you write the same way for a streak day or for who may buy an item. Each campaign keeps its own copy, so editing one never changes another.
// readable names, and your own keys exactly as you named them: // this is the tree the visual builder saves, written to be read. // The API takes the same tree under its own field names { "logicalOperator": "and", "conditions": [ { "operand": { "type": "metricEventAggregate", "metricKey": "purchase_amount", "function": "sum", "window": { "type": "currentCalendarPeriod", "unit": "week" }, // per-event filter, same AND/OR builder "filter": { "logicalOperator": "and", "conditions": [ { "operand": { "type": "metricEventProperty", "propertyKey": "payment_method" }, "operator": "equalTo", "value": { "type": "text", "text": "card" } } ] } }, "operator": "greaterThanOrEqualTo", "value": { "type": "number", "number": 500 } }, { "operand": { "type": "playerAttribute", "attributeKey": "tier" }, "operator": "in", "value": { "type": "list", "list": ["gold", "platinum"] } }, // a nested group, nest as deep as the mechanic needs { "logicalOperator": "or", "conditions": [ { "operand": { "type": "playerMetric", "metricKey": "lifetime_spend" }, "operator": "greaterThan", "value": { "type": "number", "number": 1000 } }, { "operand": { "type": "metricEventAggregate", "metricKey": "visits", "function": "count", "window": { "type": "rolling", "unit": "day", "amount": 7 } }, "operator": "greaterThanOrEqualTo", "value": { "type": "number", "number": 20 } } ] } ] }
Tell us the rule you have never been able to write.
Describe it in your own words. We will build it in the editor during the call.