← 返回
未分类 Key 中文

Cleanup Deals

Standardize deal pipelines, remove test deals, and address deals with missing amounts or close dates. Coordinates with Salesforce sync if applicable.
统一交易渠道,删除测试交易,修复缺失金额或关闭日期的交易;必要时与Salesforce同步。
tomgranot tomgranot 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 336
下载
💾 0
安装
1
版本
#latest

概述

Cleanup Deals

Standardize deal data to make pipeline reporting accurate. Test deals, missing amounts, and stale opportunities distort forecasts and pipeline metrics.

Prerequisites

  • HubSpot API token in .env
  • Python with hubspot-api-client installed via uv
  • Knowledge of which deal pipelines are active and which are synced from Salesforce

Important: Salesforce Sync Considerations

If deals are synced from Salesforce:

  • Do NOT delete or modify synced deals without coordinating with the Salesforce admin.
  • Changes in HubSpot may sync back to Salesforce and cause data loss.
  • Identify synced deals by checking for the hs_salesforceopportunityid property.

Step-by-Step Instructions

Stage 1: Before — Audit Deal Data

Pull deal metrics via the API:

from hubspot import HubSpot
from hubspot.crm.deals import PublicObjectSearchRequest

api_client = HubSpot(access_token=os.getenv("HUBSPOT_API_TOKEN"))

# Deals missing amount
no_amount = PublicObjectSearchRequest(
    filter_groups=[{
        "filters": [{
            "propertyName": "amount",
            "operator": "NOT_HAS_PROPERTY"
        }]
    }]
)

# Deals missing close date
no_close = PublicObjectSearchRequest(
    filter_groups=[{
        "filters": [{
            "propertyName": "closedate",
            "operator": "NOT_HAS_PROPERTY"
        }]
    }]
)

Record: total deals, deals per pipeline stage, deals missing amount, deals missing close date, stale deals (open with no activity in 60+ days).

Stage 2: Execute — Clean Up

  1. Delete test deals — search for deals with names containing "test", "demo", "sample", or with amount = $0 and no associated contacts.
  2. Address missing amounts — export deals without amount and work with sales to fill in values or mark as lost.
  3. Close stale deals — deals open with no activity in 90+ days should be reviewed with the deal owner. Set to "Closed Lost" if abandoned.
  4. Standardize pipeline stages — ensure all pipelines have consistent stage names and probability percentages.
  5. Remove unused pipelines — if a pipeline has zero active deals and is not in use, archive or delete it.

Stage 3: After — Verify

  1. Re-run the deal audit queries. Confirm:
    • Test deals removed
    • Missing amount count decreased
    • Stale deal count decreased
  2. Check pipeline reports for accuracy.

Stage 4: Rollback

  • Deleted deals can be restored from HubSpot's recycling bin within 90 days.
  • Stage changes and property updates can be reverted manually but there is no bulk undo.
  • For Salesforce-synced deals, check the Salesforce recycle bin as well.

Tips

  • Establish a deal hygiene rule: deals without activity for 60 days get an automated reminder to the owner (build a simple workflow).
  • Require amount and closedate as mandatory deal properties to prevent future gaps.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 08:58 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

AdMapix

fly0pants
AdMapix 原始数据层,提供广告创意、应用、排名、下载/收入及市场元数据。返回 AdMapix API 的结构化 JSON;调用方...
★ 297 📥 141,546
data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 211 📥 69,539
data-analysis

Tavily 搜索

jacky1n7
通过 Tavily API 进行网页搜索(Brave 替代方案)。当用户要求搜索网页、查找来源或链接,且 Brave 网页搜索不可用时使用。
★ 273 📥 100,640