How to Build AI Sales Forecasting Using CRM and Billing Data
March 24, 2026
AI sales forecasting is a feature inside a SaaS product that predicts future revenue using CRM pipeline data and billing signals. It combines deal activity from systems like Salesforce or HubSpot with subscription and payment data from platforms like Stripe to produce more accurate forecasts.
To build this, your product needs access to both pipeline data and revenue data. CRM systems track deals and their progression, while billing platforms track subscriptions and payments. Each system has different APIs and schemas.
Unified provides category-specific APIs for CRM and Payments, allowing your product to retrieve pipeline and billing data through consistent objects. This makes it possible to build forecasting features without maintaining separate integrations for each provider.
Why SaaS Products Build AI Sales Forecasting Features
Many B2B SaaS products include forecasting capabilities for their customers.
Examples include:
- Revenue intelligence platforms
- Sales analytics tools
- RevOps dashboards
- Customer success platforms
- AI sales assistants
These products help teams answer questions like:
- 'What revenue will close this quarter?'
- 'Which deals are most likely to close?'
- 'How does pipeline compare to actual revenue?'
Without combining CRM and billing data, forecasts are incomplete or inaccurate.
Common AI Sales Forecasting Use Cases
AI forecasting features typically support several workflows.
Revenue prediction
Estimate future revenue based on pipeline and historical performance.
Deal forecasting
Predict the likelihood of deals closing.
Pipeline analytics
Analyze deal stages, velocity, and conversion rates.
Forecast vs actual comparison
Compare expected revenue with billing data.
Risk detection
Identify deals or accounts that may not close.
Unified Categories Used
AI sales forecasting combines data from two categories.
| Category | Description | Key Objects |
|---|---|---|
| CRM | Pipeline and account data from platforms like Salesforce and HubSpot | contact, company, deal, event |
| Payments | Subscription and transaction data from platforms like Stripe | payment, subscription |
These categories provide the inputs needed for forecasting.
Unified Objects and Key Fields
CRM Objects
CRM data provides pipeline and deal context.
| Object | Key Fields | Purpose |
|---|---|---|
| Deal | amount, probability, stage_id, closing_at | Forecast pipeline revenue |
| Contact | name, emails | Customer identity |
| Company | name, domains | Account grouping |
| Event | type, created_at | Activity history |
Important fields for forecasting:
amount– deal valueprobability– likelihood of closingclosing_at– expected close datestage_id– pipeline stage
These fields allow your product to estimate expected revenue.
Payments Objects
Billing data provides actual revenue signals.
| Object | Key Fields | Purpose |
|---|---|---|
| Payment | total_amount, currency, contact_id | Cash collected |
| Subscription | status, current_period_end_at, interval | Recurring revenue |
Important subscription fields include:
status– active, canceled, pausedcurrent_period_start_at/current_period_end_at– billing cycleinterval/interval_unit– billing frequencylineitems– pricing details
These fields allow your product to calculate recurring revenue.
Mapping Data to Forecast Metrics
Forecasting models combine CRM and billing signals.
Pipeline value
weighted_pipeline = deal.amount * deal.probability
Estimates expected revenue based on deal probability.
Projected revenue
projected_revenue = sum(weighted_pipeline by closing_at period)
Forecasts revenue by time period.
Actual revenue
actual_revenue = sum(payment.total_amount)
Tracks collected revenue.
Recurring revenue
MRR = sum(active subscription monthly value)
ARR = MRR * 12
Measures predictable revenue streams.
Combining these metrics allows your product to compare forecasted vs actual performance.
Connecting Customer Data Sources
Customers connect their CRM and billing platforms using Unified Connect.
Typical process:
- Your application launches the authorization flow.
- The user selects integrations such as Salesforce, HubSpot, or Stripe.
- The user authorizes access.
- Unified returns a connection_id.
Your application stores:
user_id → connection_id
All API requests reference this identifier.
Retrieving CRM and Billing Data
Your application retrieves data using Unified endpoints.
CRM:
GET /crm/{connection_id}/deal
GET /crm/{connection_id}/contact
GET /crm/{connection_id}/company
GET /crm/{connection_id}/event
Payments:
GET /payment/{connection_id}/payment
GET /payment/{connection_id}/subscription
These endpoints return normalized objects across providers.
Common filters include:
updated_gtefor incremental updatescontact_idfor linking revenue to accounts
Building an AI Forecasting Pipeline
AI forecasting features typically follow this pattern.
1. Retrieve data
Fetch deals, payments, and subscriptions.
2. Aggregate metrics
Calculate pipeline, revenue, and activity metrics.
3. Train or apply models
Use historical data to predict outcomes.
4. Generate forecasts
Estimate revenue for future periods.
5. Store results
Persist forecasts in your application.
6. Display insights
Show forecasts in dashboards or reports.
This pipeline allows your product to deliver predictive insights.
Generating AI Forecast Insights
AI models can generate explanations alongside forecasts.
Example prompt:
{
"messages": [
{ "role": "system", "content": "You are a sales forecasting assistant." },
{ "role": "user", "content": "Explain why revenue is projected to decline next quarter." }
]
}
The model can produce:
- forecast summaries
- risk explanations
- recommendations
This helps users understand not just the forecast, but the reasoning behind it.
Keeping Forecast Data Updated
Forecasts must reflect current data.
Unified supports updates across categories:
- deal updates
- activity changes
- subscription updates
- payment events
Applications can use webhook events or timestamps such as updated_at to trigger recalculation.
Supported Platforms
Unified supports a broad range of integrations.
CRM (47+ integrations)
- Salesforce
- HubSpot
- Pipedrive
- Zoho CRM
Payments (16 integrations)
- Stripe
- PayPal
- Square
This allows forecasting tools to support many customer environments.
Why This Matters
AI sales forecasting requires combining pipeline data and revenue data.
Without unified integration infrastructure, developers must build and maintain separate integrations for CRM and billing platforms.
Unified provides:
- consistent objects across CRM and payments categories
- real-time access to source data
- unified authentication
- simplified data retrieval
This allows product teams to build forecasting features that provide accurate revenue predictions and actionable insights.
Start building AI sales forecasting across CRM and billing platforms today.