Deal Risk Assessor
Weighted risk score from activity staleness, close date validity, and contact engagement. Configurable weights and AI threshold.
How it works
Inspect the data fetches, transforms, gates, and output this recipe runs.
Data fetch
deal
deal-reader-hubspot
Fetch reader from hubspot
contacts
deal-contacts-hubspot
Fetch contacts from hubspot
▼
Process (23 steps)
guard_deal
guard
Stop if deal is empty
base_activity_date
coalesce
Use the first available value from: deal last activity date, deal created at
days_since_activity
date_diff
Calculate days between base activity date and now
activity_score
math
Calculate: min({{step.days_since_activity}} / {{config.activity_max_days}} * 100, 100)
close_date_is_null
compare
Check if deal close date is missing
close_date_is_past
is_past
Check if is in the past
skip: step.close_date_is_null equal true
close_date_invalid
any
Check if any of the conditions are true
days_until_close
date_diff
Calculate days between now and deal close date
skip: step.close_date_invalid equal true
close_date_score
math
Calculate: min({{step.days_until_close}} / {{config.close_date_max_days}} * 100, 100)
skip: step.close_date_invalid equal true
close_score
coalesce
Use the first available value from: close date score, 100
total_contacts
count
Count items in contacts
contacts_with_activity
filter
Filter by condition
contacts_no_activity
math
Calculate: {{step.total_contacts}} - {{step.contacts_with_activity.length}}
contacts_with_days
map
Extract last_contacted from each item
stale_active_contacts
filter
Filter by condition
total_stale
math
Calculate: {{step.contacts_no_activity}} + {{step.stale_active_contacts.length}}
contact_score_raw
math
Calculate: min({{step.total_stale}} / {{step.total_contacts}} * 100, 100)
skip: step.total_contacts equal 0
contact_score
coalesce
Use the first available value from: contact score raw, 100
overall_risk
weighted_score
Weighted score from: activity score (NaN%), close score (NaN%), contact score (NaN%)
ai_ready
all
Check if all conditions are true
risk_checklist
to_checklist
Format results as an actionable checklist
risk_summary
to_summary
Format results as a summary card
ai_assessment
ai-prompt
AI generates a response from a custom prompt (PII auto-protected)
skip: step.ai_ready equal false
▼
Output
summary
risk_summary
checklist
risk_checklist
ai_analysis
ai_assessment
Settings
Configurable at install. Defaults shown — change them anytime in Recued.
enable ai
toggle
=
on
ai threshold
number
=
50
contact weight
number
=
0.25
activity weight
number
=
0.4
activity max days
number
=
90
close date weight
number
=
0.35
close date max days
number
=
180
contact engagement days
number
=
30
Uses (3 ingredients)
Ingredient
deal-reader-hubspot
deal-reader-hubspot
Ingredient
deal-contacts-hubspot
deal-contacts-hubspot
Legacy
AI Custom Prompt
ai-prompt
Trust & control
What installing this recipe would let it do. Recued grants these permissions at install — review them there before approving.
What it's allowed to do
Read
Legacy
AI Custom Prompt
read-only
2 more ingredients could not be resolved from the marketplace.