Recued
Menu
← Back to recipes

Deal Health Scorer

by recued-core v1 15 views

Computes weighted health subscores and provides AI-driven recommendations when health drops below threshold.

How it works 33 steps

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
stage_deals deal-list-reader-hubspot
Fetch list reader from hubspot
Process (30 steps)
guard guard
Stop if deal is missing
days_since_activity date_diff
Calculate days between deal last activity date and now
activity_penalty math
Calculate days since activity times 5
activity_score math
Calculate 100 minus activity penalty
contact_count count
Count items in contacts
contact_score math
Calculate contact count times 25
stage_deals_filtered filter
Filter by condition
stage_avg reduce
Reduce with avg
stage_deviation_raw math
Calculate deal amount minus stage avg
stage_deviation_pct math
Calculate stage deviation raw divided by stage avg
stage_deviation_abs math
Calculate stage deviation pct times 100
stage_score math
Calculate 100 minus stage deviation abs
close_date_past is_past
Check if is in the past
close_date_score switch
Map close date past to one of: true
competitor_score switch
Map deal custom fields new competitors 30d to one of: true
w_activity math
Calculate activity score times 0.3
w_contact math
Calculate contact score times 0.25
w_stage math
Calculate stage score times 0.2
w_close math
Calculate close date score times 0.15
w_competitor math
Calculate competitor score times 0.1
health_1 math
Calculate w activity plus w contact
health_2 math
Calculate health 1 plus w stage
health_3 math
Calculate health 2 plus w close
health_score math
Calculate health 3 plus w competitor
checklist to_checklist
Format results as an actionable checklist
summary to_summary
Format results as a summary card
ai_ready all
Check if all conditions are true
hashed_deal hash_replace
Anonymize sensitive fields for safe AI processing
ai_analysis ai-prompt
AI generates a response from a custom prompt
skip: step.ai_ready equal false
restored_deal hash_restore
Restore anonymized fields back to real values
Output
summary summary
checklist checklist
ai_analysis restored_deal
Settings 2 configurable

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

enable ai toggle = on
ai threshold number = 60

Uses (4 ingredients)

Ingredient deal-reader-hubspot deal-reader-hubspot
Ingredient deal-contacts-hubspot deal-contacts-hubspot
Ingredient deal-list-reader-hubspot deal-list-reader-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

3 more ingredients could not be resolved from the marketplace.

About

Tags

hubspot dealhealthhubspotscoring

Details

33 steps 2 configurable settings recipe_id: compute-deal-health-hubspot