Events

Event contracts only — the flows that publish and handle them live on the domain pages.

Published

Channel Event Published by Payload Consumers

EventBridge

underwriting_recalculate_user (source underwriting.api)

API POST /{user_id}/recalculate; float-created handler after every created float

bare user ID string

This service’s own rule runner (full rule re-run)

EventBridge

user_rule_run_completed (source underwriting.rule-runner)

Rule runner, after all outcomes are saved

RuleCompletedEvent: user/item/account IDs, CFI data, early-advance notification

Result runner

Segment

underwriting_float_limit_updated

Rule runner, after a CFI limit change persists

increased, old_limit, new_limit, float_rank, sub_rank, previous_float, balance

Analytics — CFI

Segment

ad_float_created_tier_<tier> — the MLResult’s float-tier letter lowercased (e.g. ad_float_created_tier_b), or none when it has no tier

Float-created handler, when the deciding evaluation has an MLResult and the user has a Firebase app instance ID

risk_score, float_tier (empty when the MLResult has no tier), firebase_install_id (the user’s Firebase Analytics app instance ID, which Google Analytics needs to attribute the event), app_platform (the user-service app_platform, ios or android; Segment routes on it to the matching platform’s Google Analytics stream, since an app instance ID only belongs to one platform’s Firebase app)

Google Analytics ad targeting by score band — Rule Engine

Iterable

early_advance_eligible

Result runner, when the user passed underwriting and an early advance was granted

keyed by email; user_id, float_id, day, end_date

User notification — Early Advance

Source: pkg/api/update_user.go, pkg/rulerunner/runner.go, pkg/floatcreated/handler.go, pkg/rulerunner/increase.go, pkg/resultrunner/runner.go

Consumed

Each EventBridge rule routes matching events from the default bus to one SQS tap consumed by one Lambda. Handlers do not branch on event name — routing is entirely pattern-driven; the rule runner records the event type as the run’s invocation type and runs the same full evaluation for every trigger.

Event (detail-type) Source filter Handled by Flow

user_new_txns_batch_completed

txn-service.refiner

Rule runner (full rule run)

Rule Engine

user_new_insights_available

insight-service.miner

Rule runner (full rule run)

Rule Engine

underwriting_recalculate_user

underwriting.api

Rule runner (full rule run)

Rule Engine

user_rule_run_completed

underwriting.rule-runner

Result runner

Rule Engine

user_float_created

float-service.api

Float-created handler

Rule Engine

new_bank_account_added

any source

Profile handler

Float Profiles

Source: deploy/main.tf (EventBridge rules)