Sub topic 2
Deals, Pipelines and Stages
Prerequisites and the working model
This chapter assumes that you understand the basic B2B sales process, including qualification, proposal, and closing. You should also be comfortable navigating a web application and reading simple JSON. The examples use Salesforce and HubSpot terms, but the underlying model applies to most CRMs.
A deal is a CRM record representing a possible sale. Salesforce usually calls this record an opportunity. HubSpot calls it a deal. A deal stores commercial facts such as:
- The account or company that may buy.
- The contacts involved in the purchase.
- The expected amount.
- The expected close date.
- The pipeline and current stage.
- The owner responsible for the next action.
A pipeline is an ordered set of stages that describes a sales process. A stage is the deal's current position in that process. For example, a pipeline might contain Qualification, Discovery, Proposal, Negotiation, and Closed Won.
The stage is more than a label. It tells reports and automation how to interpret the deal. A forecast may use the stage to estimate the likelihood of winning. A workflow may create a task when a deal enters Proposal.
How a deal moves through a pipeline
A deal normally moves forward as the buyer reaches meaningful milestones. A good stage represents buyer evidence, not only seller activity.
For example, “Proposal” should mean that the buyer has received and is evaluating a proposal. Sending an email that says a proposal is coming does not necessarily justify moving the deal to that stage.
Salesforce and HubSpot both support multiple pipelines, but their configuration details differ.
| Concept | Salesforce | HubSpot |
|---|---|---|
| Deal record | Opportunity | Deal |
| Ordered process | Sales process and stages | Pipeline and deal stages |
| Stage field | `StageName` | `dealstage` |
| Expected value | `Amount` | `amount` |
| Expected close date | `CloseDate` | `closedate` |
| Probability | Often tied to the stage | May be configured as a stage property |
Stage names and internal values are configuration data. Do not assume that a label such as “Proposal” has the same internal value in every account. HubSpot commonly uses internal stage IDs, and Salesforce organizations can customize stage names.
Updating stage, amount, and close date
When a deal changes, update all fields that describe the new forecast. For example, if a buyer approves a proposal and gives a target signing date, update the stage, amount, and close date together.
Avoid moving a deal forward merely to make the pipeline look healthier. A false stage creates inaccurate forecasts and may trigger the wrong automation. If the deal stops progressing, move it backward only when your sales process allows that, or record the reason in a dedicated field or activity.
The following Python example creates a HubSpot deal and then moves it to a configured stage. The stage value comes from an environment variable because each HubSpot portal can use different internal values.
import os
import requests
token = os.environ["HUBSPOT_TOKEN"]
stage = os.environ["HUBSPOT_DEAL_STAGE"]
headers = {
"Authorization": f"Bearer {token}",
"Content-Type": "application/json",
}
deal = {
"properties": {
"dealname": "Acme - Annual Platform License",
"amount": "48000",
"pipeline": os.environ.get("HUBSPOT_PIPELINE", "default"),
"dealstage": stage,
"closedate": "2026-12-31T00:00:00Z",
}
}
create_response = requests.post(
"https://api.hubapi.com/crm/v3/objects/deals",
headers=headers,
json=deal,
timeout=30,
)
create_response.raise_for_status()
deal_id = create_response.json()["id"]
update = {
"properties": {
"amount": "52000",
"dealstage": stage,
"closedate": "2027-01-15T00:00:00Z",
}
}
update_response = requests.patch(
f"https://api.hubapi.com/crm/v3/objects/deals/{deal_id}",
headers=headers,
json=update,
timeout=30,
)
update_response.raise_for_status()
print(f"Updated deal {deal_id}")A production integration should validate that the requested stage belongs to the selected pipeline. It should also handle authentication failures, missing required properties, rate limits, and duplicate requests.
Common stage errors
- Using one pipeline for unrelated sales motions, such as new business and renewals.
- Leaving an old close date unchanged after the buyer changes the schedule.
- Setting an amount without recording whether it is one-time revenue, recurring revenue, or a total contract value.
- Treating a closed-lost deal as deleted. Historical losses are useful for reporting.
- Using stage changes as a substitute for recording calls, meetings, and next steps.
- Allowing different representatives to interpret the same stage differently.
Define entry and exit criteria for every stage. For example, a Discovery deal might require a confirmed business problem, a named decision process, and an agreed next meeting. These criteria make the pipeline more consistent and make reports easier to trust.
Exercise
A buyer has confirmed the problem and requested pricing, but no proposal has been sent. Which stage should the deal use if the pipeline has Discovery and Proposal stages?
Show answer
Keep the deal in Discovery unless the organization's stage definition says that a pricing request is sufficient to enter Proposal. A stage should reflect its documented entry criteria, not a hopeful forecast.