View Quotes and Opportunities
In this tutorial, you'll learn how to effectively manage and view quotes and opportunities in DealHub CPQ, enabling you to access and track your sales pipeline.
Summary of Steps
-
Access opportunity quotes
- Prepare view configuration
- Retrieve quote information
- Handle opportunity updates
-
Manage opportunity list
- Configure list access
- Handle pagination
- Track opportunity status
-
Update opportunity data
- Validate update requirements
- Apply changes to draft quotes
- Maintain data consistency
Requirements
Before you begin, make sure you have:
-
DealHub Access
- Active DealHub user account
- Quote viewing permissions
- Opportunity management rights
-
Data Access
- Opportunity IDs ready
- Quote IDs (if needed)
- Customer information
-
System Configuration
- API endpoints configured
- Authentication set up
- Proper user roles assigned
Your permissions determine which quotes and opportunities you can view. Contact your administrator if you need additional access.
New to DealHub opportunities? Learn about opportunity lifecycle management in our Concepts section.
Understanding Quote and Opportunity Management
Before diving into implementation, let's understand the key concepts:
-
Quote-Opportunity Relationship
- Quotes are always linked to opportunities
- One opportunity can have multiple quotes
- Quotes maintain opportunity context
- Changes to opportunities can affect quotes
-
Information States
- Draft quotes can reflect updated opportunity info
- Submitted quotes preserve historical data
- Opportunity updates don't affect submitted quotes
-
View Types
- Opportunity-specific quote views
- User's opportunity list
- Detailed quote information
Changes to opportunity information will only be reflected in draft quotes. Submitted quotes maintain their original data for compliance and audit purposes.
Prerequisites
Before starting this tutorial, ensure you have:
-
Authentication and Access
- Valid DealHub user authentication
- Active access token
- Appropriate user permissions
-
Required Information
- Opportunity IDs
- Quote IDs (if accessing specific quotes)
- Updated opportunity information (if needed)
Viewing Quotes for an Opportunity
Understanding the Quote View Process
When accessing quotes for an opportunity, you can:
- View all associated quotes
- Update opportunity information
- Access specific quote details
Step 1: Prepare the View Request
First, gather the necessary information:
View Configuration Example
const viewConfig = {
// Essential identification
dealhub_user_id: "387483488378",
external_opportunity_id: "opp_123",
// Optional: Updated opportunity information
opportunity_info: {
external_opportunity_name: "Q2 Enterprise Deal",
customer_name: "Acme Corp",
// ... other updates
}
};
Step 2: Implement Quote Viewing
Use the View Quotes API to access opportunity quotes:
View Opportunity Quotes
Endpoint: /api/v2/quotes
Headers:
Authorization: Bearer <ONE_TIME_ACCESS_TOKEN>
Content-Type: application/json
Basic Request:
{
"dealhub_user_id": "387483488378",
"external_opportunity_id": "opp_123"
}
Request with Updates:
{
"dealhub_user_id": "387483488378",
"external_opportunity_id": "opp_123",
"opportunity_info": {
"external_opportunity_name": "Q2 Enterprise Deal",
"external_customer_id": "cust_101",
"customer_name": "Acme Corp",
"customer_contacts": [{
"first_name": "Jane",
"last_name": "Smith",
"email": "jane.smith@acme.com",
"primary_contact": true
}],
"geo_code": "US-WEST",
"currency": "USD"
}
}
Response:
{
"url": "https://service-eu1.dealhub.io/..../",
"errors": []
}
Managing Your Opportunities List
Understanding Opportunity List Access
The opportunities list provides:
- Overview of all your opportunities
- Quick access to associated quotes
- Opportunity status information
The opportunities list is paginated. Implement proper pagination handling to ensure you can access all opportunities.
Step 1: Prepare the List Request
Simple but powerful - you just need your user ID:
const listConfig = {
dealhub_user_id: "387483488378"
};
Step 2: Implement Opportunity List Access
Use the View Opportunities API:
View My Opportunities
Endpoint: /api/v1/opportunities
Headers:
Authorization: Bearer <ONE_TIME_ACCESS_TOKEN>
Content-Type: application/json
Request Body:
{
"dealhub_user_id": "387483488378"
}
Response:
{
"url": "https://service-eu1.dealhub.io/..../",
"errors": []
}
Information Update Best Practices
Validating Updates
When updating opportunity information, ensure:
- All required fields are present
- Data formats are correct
- Currency updates are allowed
- Contact information is valid
Example Update Validation
class OpportunityUpdater {
static validateUpdates(updates) {
const requiredFields = ['external_opportunity_id'];
const missingFields = requiredFields.filter(field => !updates[field]);
if (missingFields.length > 0) {
throw new Error(`Missing required fields: ${missingFields.join(', ')}`);
}
if (updates.customer_contacts) {
this.validateContacts(updates.customer_contacts);
}
}
static validateContacts(contacts) {
const hasValidPrimaryContact = contacts.some(c => c.primary_contact === true);
if (!hasValidPrimaryContact) {
throw new Error('At least one primary contact is required');
}
}
}
Best Practices
-
Opportunity Management
- Regularly sync opportunity data with your CRM
- Implement proper pagination for large opportunity lists
- Cache frequently accessed opportunity details
- Validate all updates before submission
-
Quote Access
- Cache quote URLs with proper expiration
- Monitor quote status changes
- Implement proper pagination handling
Implement background sync for opportunity data to maintain consistency between your CRM and DealHub.
Additional Resources
For more detailed information about specific topics, refer to:
- Error Handling Guide
- Rate Limiting and Quotas
- Advanced Pagination Techniques
- CRM Synchronization Best Practices
Want to customize your quotes further? Learn how to Work with Custom Fields to add specialized data to your quotes.