Change LogDateOwner
Created documentation

 

Enhancement:O&G - Opportunities - Disable pre-fill forecast amounts for O&G opportunities

 

Enhancement:  Forecast exception for Reoccuring business

 

Enahncement: &

 

Object Overview and Relationships


Description:

The Product Forecast object is designed to hold forecasted financial, volumetric, and probability-weighted metrics for specific products associated with opportunities. This object facilitates forecasting and revenue prediction by allowing users to aggregate data at the product-opportunity level. 

Related Objects:

  • Opportunity: The Product Forecast object is associated with the Opportunity object via a Master-Detail relationship. This enables consolidated reporting and tracking of forecasted metrics across different opportunities.

  • Product: There is a Lookup relationship with the Product object, tying each forecast to a product. This supports detailed product-level forecasting and analysis.

  • Opportunity Realized Sales Year: While not directly referenced, historical data from Opportunity Realized Sales Year can inform or validate forecasts, providing a comparison of past actuals versus forecasted metrics.


Fields 

Field LabelAPI NameData TypeDescription
CM Calculation MethodSLV_CM_Calculation_Method__cPicklist

Method used to calculate the contribution margin, allowing flexibility in forecasting calculations based on different pricing or cost models.

Contribution Margin (%)SLV_Contribution_Margin__cPercent (3, 2)

The profit margin percentage after deducting variable costs, indicating profitability on a percentage basis.

Contribution Margin (Amount)SLV7_PF_Contribution_Margin_Tot_Amount__cFormula (Currency)

Total contribution margin amount, representing profit in currency value.

Contribution Margin (Amount) in EURFX_Contribution_Margin_Amount_EUR__cFormula (Number)

Contribution margin amount in EUR, allowing for profitability comparison across regions.

Contribution Margin (Amount) OldSLV_Contribution_Margin_Amount__cCurrency (16, 2)

Previously used contribution margin amount, retained for historical reference or calculations.

Contribution Margin (Amount) per UoMSLV7_PF_Contribution_Margin_Amount_UoM__cCurrency (16, 2)

Contribution margin per unit of measure, useful for assessing profitability on a per-unit basis.

Contribution Margin (Amount) per UoM EURFX_Contribution_Margin_Amount_UoM_EUR__cNumber (16, 2)

Per-unit contribution margin in EUR, standardizing profitability analysis.

Created ByCreatedByIdLookup (User)

User who created the forecast record, used for audit and tracking purposes.

CurrencyCurrencyIsoCodePicklist

The currency code associated with this forecast, ensuring consistent financial reporting.

Forecast Yearly Revenue in EuroSLV11_Revenue_Euro__cFormula (Number)

Projected revenue for the forecasted year, expressed in EUR.

Forecasted Yearly RevenueSLV_Revenue__cFormula (Currency)

Forecasted annual revenue for this product, calculated in the object’s primary currency.

Forecasted Yearly Revenue in EURFX_Revenue_EUR__cFormula (Number)

Forecasted yearly revenue in EUR for multi-currency analysis.

Last Commercial Roadmap UpdateSLV3_Last_Commercial_Roadmap_Update__cDate/Time

Timestamp of the last roadmap update, useful for tracking recent forecast adjustments.

Last Modified ByLastModifiedByIdLookup (User)

User who last modified the forecast, allowing change tracking and accountability.

Opp ProbabilityOpp_Probability__cFormula (Percent)

Probability percentage of the associated opportunity’s closure, influencing revenue forecasts.

OpportunitySLV_Opportunity__cMaster-Detail (Opportunity)

Link to the Opportunity object, tying the forecast data to specific sales opportunities.

Opportunity Product IDSLV_Opportunity_Product_Id__cText (18)

Unique identifier linking the forecast to a specific product in the opportunity, providing line-item level forecast data.

Pivot Volume in TSLV5_Pivot_volume_in_T__cFormula (Number)

Alternative measurement for volume, possibly used for specific product forecasts, measured in tons.

PriceSLV_Price__cCurrency (16, 2)

Unit price of the product, aiding in revenue and profitability calculations.

Price in EURFX_Price_EUR__cNumber (16, 2)

Price in EUR, enabling standardized price analysis across different currencies.

Probability Weighted RevenueProbability_Weighted_Amount__cFormula (Currency)

Revenue forecast adjusted by opportunity probability, indicating expected revenue based on win likelihood.

Probability Weighted Revenue in EURFX_Probability_Weighted_Amount_EUR__cFormula (Number)

Probability-weighted revenue in EUR, standardizing expected revenue reporting.

Probability Weighted VolumeSLV5_1_PF_Probability_Weighted_Volume__cFormula (Number)

Expected volume adjusted by opportunity probability.

Probability Weighted Volume in TSLV29_PF_Probability_Weighted_Volume_T__cFormula (Number)

Probability-adjusted volume in tons, supporting specific product forecasts.

ProductSLV_Product__cLookup (Product)

Link to the Product object, associating forecast data with individual products.

Product NameProduct_Name__cFormula (Text)

Name of the product, for quick reference in reports and dashboards.

S.NoNameAuto Number

Auto-generated unique identifier for each forecast record.

SLV7 Warning IndicatorSLV7_Warning_Indicator__cFormula (Number)

Indicator field, potentially used to highlight forecasts that require review or have significant risk.

UnicValueByYearSLV4_UnicValueByYear__cText (25) (External ID)

Unique external ID combining year and other factors, ensuring each forecast record is uniquely identifiable.

Unit of MeasureSLV5_PF_Unit_of_Measure__cPicklist

Specifies the unit in which the product volume is measured, standardizing forecast data across products.

VisibilitySLV_Visibility__cPicklist

Controls visibility settings for the forecast, allowing customization for different user groups.

VolumeSLV_Volume__cNumber (16, 2)

Forecasted quantity of the product expected to be sold, essential for production and inventory planning.

YearSLV_Year__cPicklist

Specifies the year for which the forecast is relevant, useful for annual segmentation.

Year FormulaYear_Formula__cFormula (Text)

A formula field that calculates the year based on other date fields, ensuring alignment with forecast ye


Automation

Flow Name: Create Product Forecasts

Purpose:
This flow creates a forecast record for each Opportunity Line Item added to an opportunity, ensuring that forecasts are generated and updated based on specific business rules.

Trigger

  • Type: Record-Triggered Flow
  • Event: Triggered each time an Opportunity Product record is created.
  • Entry Conditions: None – the flow runs for all Opportunity Products and executes immediately.

Logic and Flow Steps

  1. Retrieve Existing Forecasts

    • The flow first checks if any forecast records already exist for the Opportunity.
    • It retrieves records from Product Forecast where:
      • SLV_Product__c equals $Record > Product ID
      • SLV_Opportunity__c equals $Record > Opportunity ID
  2. Check for Existing Forecasts

    • Decision: If forecast records exist, the flow ends.
    • If No Forecasts Exist: The flow proceeds to a counter-based decision to manage forecast creation.
  3. Counter Logic and Forecast Creation

    • Counter Check (Counter < 5):

      • If fewer than 5 forecasts exist, the flow:
        • Assigns values to all relevant fields in the forecast record.
        • Sets the Year field to: 
TEXT(YEAR(DATEVALUE(DATETIMEVALUE({!SLV7_OPP_Targeted_first_delivery_date}))) + {!counter})
    • Counter Check (Counter ≥ 5):

      • When the counter reaches 5, it stops assigning values and creates the forecast records with the previously assigned field values.
  1. Field Assignments (Set Values)

    • The following fields are populated from the Opportunity Line Item to the Forecast record:
      • Currency ISO Code
      • Opportunity
      • Unit of Measure
      • Opportunity Product ID
      • Product
      • CM Calculation Method
      • Volume
      • Price
      • Contribution Margin (Amount) per UoM
      • Contribution Margin
      • Year
  • For Oil & Gas GBU, an exception is applied:
    • The forecast record for the first delivery year is created with all fields set to 0.


FX_Price_EUR__c

  • Event: Before Insert, Before Update
  • Action: Update FX price in EUR
  • Purpose: Converts SLV_Price__c to EUR based on the currency exchange rate (CurrencyIsoCode to EUR) for accurate FX pricing.

2. FX_Contribution_Margin_Amount_UoM_EUR__c

  • Event: Before Insert, Before Update
  • Action: Update FX contribution margin in EUR
  • Purpose: Converts SLV7_PF_Contribution_Margin_Amount_UoM__c to EUR using CurrencyIsoCode to ensure accurate FX calculations for contribution margin.

3. SLV_Product_Forcast_Rollup__c

  • Event: N/A (commented out)
  • Action: Update rollup flag on Opportunity (currently inactive)
  • Purpose: Intended to update a rollup flag (SLV_Product_Forcast_Rollup__c) on the associated Opportunity record to indicate the existence or total of related forecasts, but this feature is currently commented out.

4. Opportunity Realized Sales Year (ORSY) Related Fields

The following fields are used to manage ORSY records in synchronization with forecast records:

  • Product_Forecast__c

    • Event: After Insert, Before Delete
    • Action: Link or delete ORSY with forecast
    • Purpose: Links ORSY records to the forecast record on insert, or deletes them if the forecast is removed, ensuring data integrity.
  • Opportunity_Product_Id__c

    • Event: After Insert
    • Action: Link ORSY with Opportunity Product
    • Purpose: Links ORSY records to Opportunity Products using SLV_Opportunity_Product_Id__c, allowing forecast data alignment with specific products.
  • Opportunity__c

    • Event: After Insert
    • Action: Link ORSY with Opportunity
    • Purpose: Links ORSY records to the Opportunity associated with the forecast, consolidating forecast data at the Opportunity level.
  • Year__c

    • Event: After Insert
    • Action: Set ORSY year based on forecast year
    • Purpose: Sets the Year__c field in ORSY records based on SLV_Year__c from the forecast, aligning each ORSY record with the correct forecasted period.
  • Product__c

    • Event: After Insert
    • Action: Link ORSY with product
    • Purpose: Links ORSY records to the product in the forecast (SLV_Product__c), ensuring forecast data is product-specific.
  • CurrencyIsoCode

    • Event: After Insert
    • Action: Set currency for ORSY
    • Purpose: Transfers the CurrencyIsoCode from the forecast to ORSY records, ensuring currency consistency across forecasted sales data.


Enhancements 

Oil & Gas Forecast Year Creation - 


  • For O&G Opportunity rollout project, change was made in a way Forecast records are generated. 

New opportunity products created for O&G Opportunities will generate Forecast records but these records will not be pre-filled for all years. Only first year will be pre-filled with values from Opportunity Product. The rest will be set to null. 


This was done due to nature of O&G business and inability to know in advance. Hence these values stay blank for later years.

  • This change applies only for O&G Opportunities. 

Oil & Gas Reocurring Business Forecasting Exception -

 Summary

The goal is to streamline forecasting when the Recurring Business checkbox is set to true on an Opportunity. If changed from false to true, the forecast values for the first year will automatically populate subsequent forecast years. Once set to true, the change cannot be reversed or affect the forecasts further if toggled back to false.


Flow Name: OGR_Copy_Forecasts

Type: Autolaunched Flow

Key Features

  1. Trigger-Based Flow

    • The "Opportunity after create or update" flow will be updated to check if the Recurring Business field has been set to true.
  2. Automated Forecast Copying

    • A new autolaunched flow (OGR_Copy_Forecasts) will handle the following logic:
      • When Recurring Business changes from false to true, the first-year forecast values are copied to subsequent forecast years.
      • No updates are made if the checkbox is set back to false.
  3. One-Time Action

    • Forecasts are updated only when Recurring Business is changed from false to true. Subsequent toggling does not alter the forecasts.
  4. Flow Structure

    • Trigger Point: On Opportunity updates.
    • Logic:
      • Evaluate the status of the Recurring Business field.
      • If true, invoke the OGR_Copy_Forecasts flow to populate forecast years.


When Reoccurring Business is TRUE:

Product Forecasts are prefilled:


When Reoccurring Business is FALSE and GBU is O&G, forecasts are not pre-filled:

Automated UOM-to-Metric Tons Conversion


  • Purpose: Standardize volume representation across all records.
  • Logic: Converts values from supported UOMs to metric tons using a formula based on the UOM and associated conversion factors.
  • Key Formula Logic:
CASE(SLV5_PF_Unit_of_Measure__c,
    'T', SLV_Volume__c / 1,
    'KG', SLV_Volume__c / 1000,
    'Sh. T', SLV_Volume__c / 1.1023,
    'LB', SLV_Volume__c / 2204.6,
    'L', SLV_Volume__c * OGR_Conversion_Factor__c,
    'GAL', SLV_Volume__c * OGR_Conversion_Factor__c,
    0
)

Flow Name: Opportunity Products - Convert UOMs

Type: Triggered Flow

Key Features

 1. Integration Across Objects

  • Opportunity Line Items (OLI):
    • Field Name: SLV5_Volume_in_T__c
    • Stores the converted volume for each line item based on the selected UOM.
  • Product Forecasts:
    • Field Name: SLV5_Pivot_volume_in_T__c
    • Extends the conversion logic from OLI, ensuring compatibility and consistency.

2. Key Data Dependencies

  • Conversion Factors:
    • Stored in OGR_Conversion_Factor__c (Opportunity Product).
    • Dynamically updated when alternative UOMs or density values are modified.
  • Lookup Field:
    • New lookup field from Product Forecast to Opportunity Line Item ensures consistent reuse of existing conversion factors.

3. Reporting and Analytics

  • Field Accessibility:
    • Not displayed on record page layouts by default.
    • Included in custom and standard report types for visibility in reporting.
  • Use Cases:
    • Analyze product volumes in metric tons for forecasting and decision-making.
    • Ensure consistent reporting across regions and product lines.

4. Handling Missing Data

  • Conversion logic accounts for scenarios where:
    • No valid conversion factor is available (sets value to 0).
    • Selected UOM is unsupported (marks records for review or logs errors for follow-up).