Foundation event
The foundation event is the top-level object emitted per player. The table below lists its root fields; nested object types are documented in the sections that follow, and the links in the Type column jump to them.
Root object
Section titled “Root object”| Field | Type | Description |
|---|---|---|
playerrequired | object | |
triggeroptional | scheduledsession | What produced this event: 'scheduled' (batch run) or 'session' (real-time). All predictions in one event share this trigger. |
valueoptional | valuePrediction | |
churnRiskoptional | churnRiskPrediction | |
sessionChurnRiskoptional | sessionChurnRiskPrediction | |
incentiveUsageoptional | incentiveUsagePrediction | |
incentiveGuidanceoptional | incentiveGuidancePrediction | |
reactivationPotentialoptional | reactivationPotentialPrediction | |
incentiveRecommendationsoptional | array of incentiveRecommendationmax 3 items | |
favoriteGameCategoriesoptional | array of favoriteGameCategorymax 3 items | |
recommendedGamesoptional | array of recommendedGamemax 3 items |
Kafka headers
Section titled “Kafka headers”Events delivered over Kafka carry a trigger message header with the same value
as the root trigger field, so consumers can route or filter without parsing the
payload.
| Header | Value |
|---|---|
trigger |
scheduled (batch run) or session (real-time), UTF-8 |
Player
Section titled “Player”| Field | Type | Description |
|---|---|---|
idrequired | string | |
cohortrequired | number | |
grouprequired | TargetControl | |
metadataoptional | object | Free-form, customer-specific metadata. Arbitrary key/value pairs not validated by the schema (e.g. siteId, brand, region). Lets customers attach bespoke data without changing the schema. |
valuePrediction
Section titled “valuePrediction”| Field | Type | Description |
|---|---|---|
currentrequired | valuePredictionEntry | |
previousoptional | valuePredictionEntry |
valuePredictionEntry
Section titled “valuePredictionEntry”| Field | Type | Description |
|---|---|---|
scorerequired | number | Value Score |
sequencerequired | numbermin 1 / max 4 | A numeric representation of the player based on the value score |
segmentrequired | 1. Low2. Core3. High4. VIP | The segment name of the player based on the value score |
daterequired | string | ISO8601 date-time |
churnRiskPrediction
Section titled “churnRiskPrediction”| Field | Type | Description |
|---|---|---|
currentrequired | churnRiskPredictionEntry | |
previousoptional | churnRiskPredictionEntry |
churnRiskPredictionEntry
Section titled “churnRiskPredictionEntry”| Field | Type | Description |
|---|---|---|
scorerequired | numbermin 0 / max 1 | Churn Risk Score |
sequencerequired | numbermin 1 / max 4 | A numeric representation of the player based on the churn risk score |
segmentrequired | 1. Low2. Medium3. High4. Dormant | The segment name of the player based on the Risk Score |
daterequired | string | ISO8601 date-time |
sessionChurnRiskPrediction
Section titled “sessionChurnRiskPrediction”| Field | Type | Description |
|---|---|---|
currentrequired | sessionChurnRiskPredictionEntry | |
previousoptional | sessionChurnRiskPredictionEntry |
sessionChurnRiskPredictionEntry
Section titled “sessionChurnRiskPredictionEntry”| Field | Type | Description |
|---|---|---|
scorerequired | numbermin 0 / max 1 | Session Churn Risk Score |
sequencerequired | numbermin 1 / max 4 | A numeric representation of the player based on the churn risk score |
segmentrequired | 1. Low2. Medium3. High4. Dormant | The segment name of the player based on the Risk Score |
daterequired | string | ISO8601 date-time |
incentiveUsagePrediction
Section titled “incentiveUsagePrediction”| Field | Type | Description |
|---|---|---|
currentrequired | incentiveUsagePredictionEntry | |
previousoptional | incentiveUsagePredictionEntry |
incentiveUsagePredictionEntry
Section titled “incentiveUsagePredictionEntry”| Field | Type | Description |
|---|---|---|
scorerequired | number | Incentive Usage Score |
sequencerequired | numbermin 1 / max 4 | A numeric representation of the player based on the churn risk score |
segmentrequired | 0. No bonus usage1. Normal bonus usage2. Increased bonus usage3. Bonus abuser | The segment name of the player based on the incentive usage score |
daterequired | string | ISO8601 date-time |
incentiveGuidancePrediction
Section titled “incentiveGuidancePrediction”| Field | Type | Description |
|---|---|---|
currentrequired | incentiveGuidancePredictionEntry | |
previousoptional | incentiveGuidancePredictionEntry |
incentiveGuidancePredictionEntry
Section titled “incentiveGuidancePredictionEntry”| Field | Type | Description |
|---|---|---|
scorerequired | number | Incentive Guidance Score |
sequencerequired | numbermin 1 / max 4 | A numeric representation of the recommended incentive posture |
segmentrequired | 1. Increase Incentives2. Continue Incentives3. Limit Incentives4. Avoid Incentives | Recommended incentive posture for the player |
daterequired | string | ISO8601 date-time |
reactivationPotentialPrediction
Section titled “reactivationPotentialPrediction”| Field | Type | Description |
|---|---|---|
currentrequired | reactivationPotentialPredictionEntry | |
previousoptional | reactivationPotentialPredictionEntry |
reactivationPotentialPredictionEntry
Section titled “reactivationPotentialPredictionEntry”| Field | Type | Description |
|---|---|---|
scorerequired | numbermin 0 / max 1 | Reactivation Potential Score |
sequencerequired | numbermin 1 / max 3 | A numeric representation of the player's reactivation potential |
segmentrequired | 1. Low Potential2. Medium Potential3. High Potential | The segment name of the player's reactivation potential |
daterequired | string | ISO8601 date-time |
incentiveRecommendation
Section titled “incentiveRecommendation”| Field | Type | Description |
|---|---|---|
recommendationIdrequired | string | Unique identifier for this recommendation emission |
rankrequired | number | 1-based rank of the recommendation for the player |
scorerequired | number | Score |
incentiveIdrequired | string | Identifier of the recommended incentive type |
incentiveNamerequired | string | Incentive Name |
amountrequired | number | Amount |
triggerIdoptional | string | Identifier of the trigger this recommendation came from |
favoriteGameCategory
Section titled “favoriteGameCategory”| Field | Type | Description |
|---|---|---|
rankrequired | number | |
scorerequired | number | |
categoryIdrequired | string | |
categoryNamerequired | string |
recommendedGame
Section titled “recommendedGame”| Field | Type | Description |
|---|---|---|
rankrequired | number | |
scorerequired | number | |
gameIdrequired | string | |
gameNamerequired | string | |
categoryIdrequired | string | |
categoryNamerequired | string |
Example payload
Section titled “Example payload”The same event as JSON and as a single flattened CSV row. model_dump_csv()
produces the CSV form: nested objects become _-joined snake_case columns,
bounded lists widen into 1-based indexed columns (incentive_recommendations_1_score,
capped at three by maxItems), and unbounded values — free-form metadata
— stay a single JSON-text column. The column set comes from the model, not the
event, so every row carries every column and absent fields are simply empty.
{ "player": { "id": "PLAYER-ID-AS-GUID-OR-NUMERIC-123", "cohort": 1, "group": "Target", "metadata": { "siteId": 123, "brand": "golden-whale-casino", "region": "EU" } }, "trigger": "scheduled", "value": { "current": { "score": 1234.45, "sequence": 4, "segment": "4. VIP", "date": "2023-11-20T13:45:00+02:00" }, "previous": { "score": 1230.45, "sequence": 4, "segment": "4. VIP", "date": "2023-11-19T13:45:00+02:00" } }, "sessionChurnRisk": { "current": { "score": 0.2, "sequence": 2, "segment": "2. Medium", "date": "2023-11-20T13:45:00+02:00" }, "previous": { "score": 0.19634, "sequence": 1, "segment": "1. Low", "date": "2023-11-12T13:45:00+02:00" } }, "churnRisk": { "current": { "score": 0.89634, "sequence": 3, "segment": "3. High", "date": "2023-11-20T13:45:00+02:00" } }, "incentiveUsage": { "current": { "score": 4, "sequence": 4, "segment": "3. Bonus abuser", "date": "2023-11-20T13:45:00+02:00" } }, "incentiveGuidance": { "current": { "score": 2, "sequence": 2, "segment": "2. Continue Incentives", "date": "2023-11-20T13:45:00+02:00" }, "previous": { "score": 1, "sequence": 1, "segment": "1. Increase Incentives", "date": "2023-11-19T13:45:00+02:00" } }, "reactivationPotential": { "current": { "score": 0.78, "sequence": 3, "segment": "3. High Potential", "date": "2023-11-20T13:45:00+02:00" } }, "incentiveRecommendations": [ { "recommendationId": "d164def1-c3c2-401e-8a09-1928f8765b0d", "rank": 1, "score": 87.17, "incentiveId": "1", "incentiveName": "Freebet", "amount": 2000 }, { "recommendationId": "24f4d856-b42d-4f38-ac62-cdbc6a0e85a8", "rank": 2, "score": 72.9, "incentiveId": "1", "incentiveName": "Freebet", "amount": 200 } ], "favoriteGameCategories": [ { "rank": 1, "score": 0.9876, "categoryId": "C-1", "categoryName": "Casino" } ], "recommendedGames": [ { "rank": 1, "score": 0.7654, "gameId": "G-123", "gameName": "Golden Whale Super Spinner", "categoryId": "C-1", "categoryName": "Casino" } ]}player_id,player_cohort,player_group,player_metadata,trigger,value_current_score,value_current_sequence,value_current_date,value_current_segment,value_previous_score,value_previous_sequence,value_previous_date,value_previous_segment,churn_risk_current_score,churn_risk_current_sequence,churn_risk_current_date,churn_risk_current_segment,churn_risk_previous_score,churn_risk_previous_sequence,churn_risk_previous_date,churn_risk_previous_segment,session_churn_risk_current_score,session_churn_risk_current_sequence,session_churn_risk_current_date,session_churn_risk_current_segment,session_churn_risk_previous_score,session_churn_risk_previous_sequence,session_churn_risk_previous_date,session_churn_risk_previous_segment,incentive_usage_current_score,incentive_usage_current_sequence,incentive_usage_current_date,incentive_usage_current_segment,incentive_usage_previous_score,incentive_usage_previous_sequence,incentive_usage_previous_date,incentive_usage_previous_segment,incentive_guidance_current_score,incentive_guidance_current_sequence,incentive_guidance_current_date,incentive_guidance_current_segment,incentive_guidance_previous_score,incentive_guidance_previous_sequence,incentive_guidance_previous_date,incentive_guidance_previous_segment,incentive_recommendations_1_recommendation_id,incentive_recommendations_1_rank,incentive_recommendations_1_score,incentive_recommendations_1_incentive_id,incentive_recommendations_1_incentive_name,incentive_recommendations_1_amount,incentive_recommendations_1_trigger_id,incentive_recommendations_1_metadata,incentive_recommendations_2_recommendation_id,incentive_recommendations_2_rank,incentive_recommendations_2_score,incentive_recommendations_2_incentive_id,incentive_recommendations_2_incentive_name,incentive_recommendations_2_amount,incentive_recommendations_2_trigger_id,incentive_recommendations_2_metadata,incentive_recommendations_3_recommendation_id,incentive_recommendations_3_rank,incentive_recommendations_3_score,incentive_recommendations_3_incentive_id,incentive_recommendations_3_incentive_name,incentive_recommendations_3_amount,incentive_recommendations_3_trigger_id,incentive_recommendations_3_metadata,reactivation_potential_current_score,reactivation_potential_current_sequence,reactivation_potential_current_date,reactivation_potential_current_segment,reactivation_potential_previous_score,reactivation_potential_previous_sequence,reactivation_potential_previous_date,reactivation_potential_previous_segment,favorite_game_categories_1_rank,favorite_game_categories_1_score,favorite_game_categories_1_category_id,favorite_game_categories_1_category_name,favorite_game_categories_2_rank,favorite_game_categories_2_score,favorite_game_categories_2_category_id,favorite_game_categories_2_category_name,favorite_game_categories_3_rank,favorite_game_categories_3_score,favorite_game_categories_3_category_id,favorite_game_categories_3_category_name,recommended_games_1_rank,recommended_games_1_score,recommended_games_1_game_id,recommended_games_1_game_name,recommended_games_1_category_id,recommended_games_1_category_name,recommended_games_2_rank,recommended_games_2_score,recommended_games_2_game_id,recommended_games_2_game_name,recommended_games_2_category_id,recommended_games_2_category_name,recommended_games_3_rank,recommended_games_3_score,recommended_games_3_game_id,recommended_games_3_game_name,recommended_games_3_category_id,recommended_games_3_category_namePLAYER-ID-AS-GUID-OR-NUMERIC-123,1,Target,"{""siteId"":123,""brand"":""golden-whale-casino"",""region"":""EU""}",scheduled,1234.45,4,2023-11-20T13:45:00+02:00,4. VIP,1230.45,4,2023-11-19T13:45:00+02:00,4. VIP,0.89634,3,2023-11-20T13:45:00+02:00,3. High,,,,,0.2,2,2023-11-20T13:45:00+02:00,2. Medium,0.19634,1,2023-11-12T13:45:00+02:00,1. Low,4.0,4,2023-11-20T13:45:00+02:00,3. Bonus abuser,,,,,2.0,2,2023-11-20T13:45:00+02:00,2. Continue Incentives,1.0,1,2023-11-19T13:45:00+02:00,1. Increase Incentives,d164def1-c3c2-401e-8a09-1928f8765b0d,1,87.17,1,Freebet,2000.0,,,24f4d856-b42d-4f38-ac62-cdbc6a0e85a8,2,72.9,1,Freebet,200.0,,,,,,,,,,,0.78,3,2023-11-20T13:45:00+02:00,3. High Potential,,,,,1.0,0.9876,C-1,Casino,,,,,,,,,1.0,0.7654,G-123,Golden Whale Super Spinner,C-1,Casino,,,,,,,,,,,,
