Deals

From wyre-technology/msp-claude-plugins · View interactive version

Deals is an AI agent skill from the GitHub repository wyre-technology/msp-claude-plugins. HubSpot deal records and sales pipelines: deal fields, default and custom pipeline stages, deal amount conventions (MRR vs. TCV), forecast categories and weighted forecasting, and associating deals with contacts and companies.

How to use this skill

Skill file

HubSpot Deal & Pipeline Management

Overview

Deals in HubSpot represent sales opportunities -- potential or active revenue from clients. For MSPs, deals track managed services agreements, project engagements, hardware sales, or any revenue opportunity moving through the sales process. Each deal belongs to a pipeline (e.g., "Sales Pipeline" or "Renewals") and progresses through stages (e.g., "Discovery", "Proposal", "Closed Won"). Deals are associated with contacts and companies to provide full context on who is involved and which client the revenue belongs to.

Conduit connector

Conduit's hubspot connector is HubSpot's own hosted MCP server (https://mcp.hubspot.com/anthropic/v1/mcp, OAuth). Its CRM tools are generic over object type, so every call names the objectType:

| Tool | Call shape |

|------|-----------|

| search_crm_objects | objectType, optional query (free text), filterGroups (property filters and associatedWith association filters), properties, sorts, limit (max 200), offset |

| get_crm_objects | objectType, objectIds (1-100), properties |

| manage_crm_objects | createRequest.objects[] or updateRequest.objects[] (each with objectType, properties, optional associations, and objectId for updates), plus confirmationStatus (CONFIRMED only after the user approved the exact change) |

| search_properties / get_properties | Discover property names and enumeration values for an objectType |

| search_owners | Resolve hubspot_owner_id values to people |

Parameter names in the tables below (such as contactId) describe the HubSpot fields involved; send them in the call shapes above. See hubspot-api-patterns for the full tool list.

Anti-triggers

opportunity exists and what it is worth; the line items, catalog, and margin

live in salesbuildr-quotes or connectwise-cpq-quotes.

xero-invoices or qbo-invoices.

identical vocabulary; use salesbuildr-opportunities.

MCP Tools

Available Tools

| Tool | Description | Key Parameters |

|------|-------------|----------------|

| get_crm_objects (objectType: "deals") | Get deals by ID | objectIds (required, 1-100) |

| manage_crm_objects (createRequest, objectType: "deals") | Create a new deal | dealname (required), amount, dealstage, pipeline |

| manage_crm_objects (updateRequest, objectType: "deals") | Update an existing deal | objectId (required), property fields to update |

| search_properties (objectType: "deals") | List all available deal properties | None |

| search_crm_objects (objectType: "deals") | Search deals by criteria | filterGroups, sorts, limit, offset |

Search Deals

Call search_crm_objects (objectType: "deals") with filter groups to find deals:

Search by deal name:

{
  "filterGroups": [
    {
      "filters": [
        {
          "propertyName": "dealname",
          "operator": "CONTAINS_TOKEN",
          "value": "Managed Services"
        }
      ]
    }
  ],
  "limit": 100
}

Search by deal stage:

{
  "filterGroups": [
    {
      "filters": [
        {
          "propertyName": "dealstage",
          "operator": "EQ",
          "value": "proposalpendinng"
        }
      ]
    }
  ],
  "sorts": [
    {
      "propertyName": "amount",
      "direction": "DESCENDING"
    }
  ],
  "limit": 100
}

Search by close date range (upcoming closings):

{
  "filterGroups": [
    {
      "filters": [
        {
          "propertyName": "closedate",
          "operator": "GTE",
          "value": "2026-02-01"
        },
        {
          "propertyName": "closedate",
          "operator": "LTE",
          "value": "2026-03-31"
        }
      ]
    }
  ],
  "limit": 100
}

Search for high-value open deals:

{
  "filterGroups": [
    {
      "filters": [
        {
          "propertyName": "amount",
          "operator": "GT",
          "value": "10000"
        },
        {
          "propertyName": "dealstage",
          "operator": "NOT_IN",
          "values": ["closedwon", "closedlost"]
        }
      ]
    }
  ],
  "sorts": [
    {
      "propertyName": "amount",
      "direction": "DESCENDING"
    }
  ],
  "limit": 100
}

Create a Deal

Call manage_crm_objects (createRequest, objectType: "deals") with the deal's properties:

Example: Create a managed services deal:

Update a Deal

Call manage_crm_objects (updateRequest, objectType: "deals") with the deal's objectId and the properties to change:

Example: Move deal to next stage:

Retrieve a Deal

Call get_crm_objects (objectType: "deals") with the deal ID in objectIds:

Example:

Key Concepts

Default Pipeline Stages

HubSpot's default sales pipeline includes these stages (your account may have custom stages):

| Stage ID | Display Name | Probability | MSP Context |

|----------|-------------|-------------|-------------|

| appointmentscheduled | Appointment Scheduled | 20% | Discovery call booked |

| qualifiedtobuy | Qualified to Buy | 40% | Budget and authority confirmed |

| presentationscheduled | Presentation Scheduled | 60% | Demo or proposal meeting set |

| decisionmakerboughtin | Decision Maker Bought-In | 80% | Key stakeholder agrees |

| contractsent | Contract Sent | 90% | MSA or SOW sent for signature |

| closedwon | Closed Won | 100% | Deal signed, revenue booked |

| closedlost | Closed Lost | 0% | Deal did not close |

Multiple Pipelines

HubSpot supports multiple pipelines for different deal types. Common MSP pipelines:

| Pipeline | Use Case |

|----------|----------|

| Sales Pipeline | New client acquisition |

| Renewals | Annual contract renewals |

| Projects | One-time project engagements |

| Hardware | Hardware procurement deals |

Deal Amount

The amount field represents the deal's monetary value. For MSPs:

Forecast Categories

Deals can be categorized for forecasting:

| Category | Description |

|----------|-------------|

| omit | Excluded from forecast |

| pipeline | In pipeline, not yet committed |

| bestCase | Best case scenario |

| commit | Committed, high confidence |

| closed | Closed won |

Field Reference

Core Fields

| Field | Type | Description |

|-------|------|-------------|

| dealname | string | Deal name |

| amount | number | Deal amount (currency) |

| dealstage | enumeration | Current pipeline stage |

| pipeline | enumeration | Pipeline the deal belongs to |

| closedate | date | Expected or actual close date |

| hubspot_owner_id | number | Assigned owner (user ID) |

| dealtype | enumeration | Deal type (newbusiness, existingbusiness) |

| description | string | Deal description |

| createdate | datetime | Record creation date |

| lastmodifieddate | datetime | Last modification date |

| notes_last_updated | datetime | Last note timestamp |

| hs_deal_stage_probability | number | Stage-based close probability |

| hs_forecast_amount | number | Weighted forecast amount |

| hs_forecast_probability | number | Forecast probability |

| hs_closed_amount | number | Actual closed amount |

| hs_is_closed | boolean | Whether the deal is closed |

| hs_is_closed_won | boolean | Whether the deal is closed won |

| num_associated_contacts | number | Associated contacts count |

| hs_num_associated_company | number | Associated companies count |

Common Workflows

Search Deals by Stage

  1. Call search_crm_objects (objectType: "deals") with a filter on dealstage
  2. Sort by amount descending to see highest-value deals first
  3. Review associated companies and contacts for context

Update Deal Stage

  1. Call get_crm_objects (objectType: "deals") to confirm current stage and details
  2. Call manage_crm_objects (updateRequest, objectType: "deals") with the new dealstage value
  3. Optionally update amount if the deal value has changed
  4. Call manage_crm_objects (createRequest, objectType: "notes") with associations to the deal to document why the stage changed

Pipeline Overview

  1. Call search_crm_objects (objectType: "deals") with a filter excluding closedwon and closedlost stages
  2. Group results by dealstage
  3. For each stage, calculate:
  1. Sum weighted values for pipeline forecast

Revenue Forecast

  1. Call search_crm_objects (objectType: "deals") with filters:
  1. For closed-won deals, use actual amount
  2. For open deals, calculate weighted amount: amount * hs_deal_stage_probability
  3. Sum for total forecasted revenue

Create a Deal with Company Association

  1. Find the company - Call search_crm_objects (objectType: "companies") with the company name
  2. Find the contact - Call search_crm_objects (objectType: "contacts") for the decision-maker
  3. Create the deal - Call manage_crm_objects (createRequest, objectType: "deals") with deal name, amount, stage, and close date
  4. Associate with company - Call manage_crm_objects (updateRequest with associations) from deal to company
  5. Associate with contact - Call manage_crm_objects (updateRequest with associations) from deal to contact
  6. Log creation note - Call manage_crm_objects (createRequest, objectType: "notes") with associations to the new deal to document the deal context

Stale Deal Review

  1. Call search_crm_objects (objectType: "deals") with filters:
  1. For each stale deal, note the owner, company, and amount
  2. Create tasks for deal owners to follow up

Response Examples

Single Deal:

{
  "id": "54321",
  "properties": {
    "dealname": "Acme Corp - Managed IT Services",
    "amount": "5000",
    "dealstage": "proposalpending",
    "pipeline": "default",
    "closedate": "2026-04-15T00:00:00.000Z",
    "hubspot_owner_id": "67890",
    "dealtype": "newbusiness",
    "hs_deal_stage_probability": "0.6",
    "createdate": "2026-01-10T09:00:00.000Z",
    "lastmodifieddate": "2026-02-20T11:30:00.000Z"
  },
  "createdAt": "2026-01-10T09:00:00.000Z",
  "updatedAt": "2026-02-20T11:30:00.000Z"
}

Search Results:

{
  "total": 15,
  "results": [
    {
      "id": "54321",
      "properties": {
        "dealname": "Acme Corp - Managed IT Services",
        "amount": "5000",
        "dealstage": "proposalpending",
        "closedate": "2026-04-15T00:00:00.000Z"
      }
    },
    {
      "id": "54322",
      "properties": {
        "dealname": "Beta Inc - Network Upgrade",
        "amount": "12000",
        "dealstage": "contractsent",
        "closedate": "2026-03-01T00:00:00.000Z"
      }
    }
  ],
  "paging": {
    "next": {
      "after": "54322"
    }
  }
}

Error Handling

Common Errors

| Error | Cause | Resolution |

|-------|-------|------------|

| Deal not found | Invalid deal ID | Verify the ID with search_crm_objects (objectType: "deals") |

| Invalid deal stage | Stage ID not valid for the pipeline | Use search_properties (objectType: "deals") to check valid stages |

| Invalid pipeline | Pipeline ID not recognized | Check your HubSpot account for available pipelines |

| Invalid close date | Date format incorrect | Use ISO 8601 format (YYYY-MM-DD) |

| Rate limited | Too many requests | Wait 10 seconds and retry |

Best Practices

  1. Name deals consistently - Use format "Company Name - Service Type" for easy identification
  2. Always set close date - Forecast accuracy depends on close dates being realistic and updated
  3. Associate with company and contact - Every deal should be linked to both for full context
  4. Update stages promptly - Move deals through stages as conversations progress
  5. Track deal type - Distinguish new business from existing business for accurate reporting
  6. Review stale deals - Regularly check for deals that have not been updated recently
  7. Assign owners - Every deal should have a hubspot_owner_id for accountability
  8. Separate pipelines - Use distinct pipelines for different deal types (new sales, renewals, projects)

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.