How it works
The Lead domain has no tables per integration type (transactions, form_responses, etc.). Enriched data is derived from events and stored as memories by the Memory Updater Lambda.Memory schema
source_event_ids provides full traceability from a memory back to the events that produced it. Memories that overwrite (e.g., last_transaction) contain a single event ID. Memories that aggregate (e.g., product:whey_1kg with purchase_count: 5) contain all contributing event IDs.
UNIQUE on (lead_organization_id, memory_type, key) — enables upsert.
Memory Types
| Type | Description | Key examples |
|---|---|---|
fact | Factual information | family, location |
preference | Communication or behavior preferences | price_sensitivity, payment_method |
interest | Interest in a product or category | category:supplements, product:creatina |
purchase | Purchase history and patterns | last_transaction, product:whey_1kg |
support | Support history | ticket:T-456 |
behavioral | Observed behavior patterns | last_conversation, response_pattern |
campaign | Campaign interaction history | campaign:camp_whey_recompra |
form | Form responses | sat_survey_2026:how_did_you_find_us |
Template variable resolution
Dispatch templates resolve variables from Lead (profile) and Memory (enriched data): Template:| Variable | Query |
|---|---|
lead.name | Aurora: Lead.name |
purchase.last_transaction.product_name | DynamoDB: SK="purchase#last_transaction" → value.product_name |
purchase.last_transaction.amount | Same item → value.amount |
form.sat_survey_2026:how_did_you_find_us.answer | DynamoDB: SK="form#sat_survey_2026:how_did_you_find_us" → value.answer |