Loading

Create an Opportunity Hierarchy with Custom Objects

Julkaisupäivä: Apr 2, 2026
Kuvaus

Salesforce does not provide a standard Opportunity Hierarchy feature. However, you can simulate this behavior by creating a custom object (such as Parent Opportunity or Opportunity Bundle) and linking related Opportunities using a lookup relationship.

In this approach:

  • A custom object (e.g., Parent Opportunity) acts as a grouping mechanism
  • Multiple Opportunity records are linked to it (one-to-many relationship)
  • Reporting is used to summarize data such as total Amount and average Probability

This method is primarily useful for reporting and visualization. It does not automatically roll up values to the parent record unless additional customization (e.g., Apex) is implemented. Evaluate your business requirements before adopting this approach.

Ratkaisu

To create an Opportunity Hierarchy using a custom object, follow these steps:


Step 1: Create a Custom Object (Parent Opportunity)

  • Go to Setup → Object Manager → Create → Custom Object
  • Name the object (e.g., Parent Opportunity)
  • Configure:
    • Data type: Text (for naming records)
    • Enable Reports
    • (Optional) Enable Notes and Attachments
    • (Optional) Create a custom tab

Step 2: Create a Lookup Relationship on Opportunity

  • Go to Setup → Object Manager → Opportunity → Fields & Relationships
  • Click New
  • Select Lookup Relationship
  • Relate it to the Parent Opportunity object
  • Add the field to the Opportunity page layout

Step 3: Create a Custom Report

  1. Go to the Reports tab and create a new report
  2. Select report type:
    • Opportunities with Parent Opportunity
  3. Choose Summary Report format

Configure the report:

  • Summarize:
    • Amount → Sum
    • Probability → Average
  • Group by:
    • Parent Opportunity Name
  • Include fields such as:
    • Opportunity Name, Owner, Stage, Close Date, Amount, Probability
    • Account Name
    • Parent Opportunity Name

(Optional)

  • Enable Hide Details to show only summarized parent-level data

Save the report (e.g., Opportunity Hierarchy Report)


Step 4: Create and Test Records

  • Create a Parent Opportunity record
  • Create multiple Opportunities and associate them using the lookup field
  • Run the report to validate grouping and summaries

Step 5: Optional Enhancements

Depending on business needs, consider:

  • Adding validation rules (e.g., prevent parent closure until child Opportunities are closed)
  • Adding the report to dashboards
  • Using Apex triggers or automation to:
    • Roll up Amount values
    • Update parent-level metrics
Knowledge-artikkelin numero

000385005

 
Ladataan
Salesforce Help | Article