Automation that reads/writes nonexistent fields or never fires
src/objects/campaign.hook.ts:73-74 counts crm_lead with filter: { campaign: id } — crm_lead has no campaign field. num_leads / num_converted_leads are always 0 (errors swallowed by onError: 'log').
src/objects/contact.hook.ts:51,54 writes contact_email / contact_phone to crm_opportunity — neither field exists on the object; the failure is swallowed by catch {}.
days_in_stage (opportunity.object.ts:180-184) is written by nothing; only seed data hardcodes it. opportunity-stagnation.flow.ts:41 filters days_in_stage > 14, so the flow only matches seeded demo rows.
campaign-enrollment.flow.ts:11-31 is type: 'schedule' (cron 0 9 * * 1) but filters on input variables {campaignId} / {leadStatus} that a scheduled trigger never receives; each run resolves to empty filters.
quote.hook.ts:98-128 inserts crm_contract with crm_contact from the quote; crm_quote.crm_contact is optional while crm_contract.crm_contact is required: true. Accepting a contact-less quote fails validation silently (async: true, onError: 'log').
knowledge_article.hook.ts:25-27 sets input.published_at = nowIso without checking for a provided value; seeded historical dates (src/data/index.ts:1107,1128,1157) all become the boot date.
crm_quote.owner (quote.object.ts:89-93) is the only owner field without defaultValue; demo-bootstrap.flow.ts:76-83 also skips quote/contract/campaign/forecast, so quote_expiration / contract_renewal / contract_expiration notify an empty owner.
Duplicate/conflicting automation on the same events
- Case escalation creates two follow-up tasks:
case.hook.ts:112-128 (priority urgent) and case-escalation.flow.ts:54-65 (priority high).
- Contract renewal tasks are created twice and daily:
contract.hook.ts:132-147 on activation, plus contract-renewal.flow.ts:61-73 every day inside the notification window with no idempotency marker.
num_sent is written by both campaign-enrollment.flow.ts:55 and campaign.hook.ts:97; campaign-completion.flow.ts:46 triggers the latter.
- Escalation fields are written by three different places with different field subsets:
case-escalation.flow.ts:50, case-sla-monitor.flow.ts:55, case.actions.ts:25-32.
- Quote totals:
quote-generation.flow.ts:49-51 computes amount * (1 - discount/100); quote_line_item.hook.ts and all five seeded quotes compute subtotal − discount + tax + shipping. The flow (:63) also sets stage: 'proposal' unconditionally, which the opportunity_stage_progression state machine only allows from needs_analysis.
- Stage→probability values are hardcoded outside the map in
opportunity.hook.ts:27-35: opportunity.actions.ts:44, lead-conversion.flow.ts:126; the 14-day stagnation threshold is duplicated in opportunity.view.ts:189; thresholds 100000/500000 appear in 5 places.
Automation that reads/writes nonexistent fields or never fires
src/objects/campaign.hook.ts:73-74countscrm_leadwithfilter: { campaign: id }—crm_leadhas nocampaignfield.num_leads/num_converted_leadsare always 0 (errors swallowed byonError: 'log').src/objects/contact.hook.ts:51,54writescontact_email/contact_phonetocrm_opportunity— neither field exists on the object; the failure is swallowed bycatch {}.days_in_stage(opportunity.object.ts:180-184) is written by nothing; only seed data hardcodes it.opportunity-stagnation.flow.ts:41filtersdays_in_stage > 14, so the flow only matches seeded demo rows.campaign-enrollment.flow.ts:11-31istype: 'schedule'(cron0 9 * * 1) but filters on input variables{campaignId}/{leadStatus}that a scheduled trigger never receives; each run resolves to empty filters.quote.hook.ts:98-128insertscrm_contractwithcrm_contactfrom the quote;crm_quote.crm_contactis optional whilecrm_contract.crm_contactisrequired: true. Accepting a contact-less quote fails validation silently (async: true, onError: 'log').knowledge_article.hook.ts:25-27setsinput.published_at = nowIsowithout checking for a provided value; seeded historical dates (src/data/index.ts:1107,1128,1157) all become the boot date.crm_quote.owner(quote.object.ts:89-93) is the only owner field withoutdefaultValue;demo-bootstrap.flow.ts:76-83also skips quote/contract/campaign/forecast, soquote_expiration/contract_renewal/contract_expirationnotify an empty owner.Duplicate/conflicting automation on the same events
case.hook.ts:112-128(priorityurgent) andcase-escalation.flow.ts:54-65(priorityhigh).contract.hook.ts:132-147on activation, pluscontract-renewal.flow.ts:61-73every day inside the notification window with no idempotency marker.num_sentis written by bothcampaign-enrollment.flow.ts:55andcampaign.hook.ts:97;campaign-completion.flow.ts:46triggers the latter.case-escalation.flow.ts:50,case-sla-monitor.flow.ts:55,case.actions.ts:25-32.quote-generation.flow.ts:49-51computesamount * (1 - discount/100);quote_line_item.hook.tsand all five seeded quotes computesubtotal − discount + tax + shipping. The flow (:63) also setsstage: 'proposal'unconditionally, which theopportunity_stage_progressionstate machine only allows fromneeds_analysis.opportunity.hook.ts:27-35:opportunity.actions.ts:44,lead-conversion.flow.ts:126; the 14-day stagnation threshold is duplicated inopportunity.view.ts:189; thresholds100000/500000appear in 5 places.