Recued
Menu
← Back to recipes

Deal Risk Assessor

by recued-core v4 37 views

Use “Deal Risk Assessor” in Recued. Weighted risk score from activity staleness, close date validity, and contact engagement. Configurable weights and AI threshold.

How it works 24 steps

Inspect the data fetches, transforms, gates, and output this recipe runs.

Data fetch
▼ deal recued-core.hubspot.deal.read
Read deal on hubspot
▼ contacts recued-core.hubspot.deal_contacts.list
List deal contacts on hubspot
▼
Process (22 steps)
⚠ guard_deal guard
Stop if deal result properties is empty
■ base_activity_date coalesce
Use the first available value from: deal result properties notes last contacted, deal result properties createdate
■ 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 result properties closedate 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 result properties closedate
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 result results
■ 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 properties.notes_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%)
■ risk_checklist to_checklist
Format results as an actionable checklist
■ risk_summary to_summary
Format results as a summary card
✦ ai_assessment core.ai.prompt
AI generates a response from a custom prompt
▼
Output
summary risk_summary
checklist risk_checklist
ai_analysis ai_assessment
Settings 6 configurable

Configurable at install. Defaults shown — change them anytime in Recued.

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 operations)

Pack operation Read deal on hubspot recued-core.hubspot.deal.read
Pack operation List deal contacts on hubspot recued-core.hubspot.deal_contacts.list
AI models AI generates a response from a custom prompt core.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 AI models core.ai.prompt read-only

2 more aren't listed here. You'll see them at install.

Data it touches

SurfacesAI models

About

Tags

hubspot dealriskhubspotai

Details

24 steps 6 configurable settings recipe_id: assess-deal-risk-hubspot