Skip to main content
Join the Agentforce Hackathon on Nov. 18-19 to compete for a $20,000 Grand Prize. Sign up now. Terms apply.

Track and Transform Component Forecasts

Learning Objectives

After completing this unit, you’ll be able to:

  • List the predefined DPE definitions available with Program Based Business.
  • View forecasts for a program, its variants, and components.
  • Convert forecast data into Opportunity records.
  • Convert Opportunity records into Sales Agreement records.

The Story So Far

Before taking the next step, let’s quickly go over what Susan, Jackie, and the engineering manager have achieved so far.

Susan assigned permissions to Jackie and explored the predefined Forecast Facts. While doing so, Susan also decided which fields are used as forecast dimensions and measures. Next, she defined forecast configurations with forecast sets and created program templates. 

After this, Jackie created the manufacturing program, created a Forecast Set Use record, and imported the forecast data using CSV files.

With the program in place, the engineering manager created relationships between Xela’s product variants and Rayler Motors’ components. And now we are here!

If you remember, Susan has already cloned and customized the predefined DPE definitions to suit Rayler Motors’ requirements. And she’s associated these definitions in the Xela PowerUp Components Set forecast set. Since the program is ready, her next task is to run the Data Processing Engine that can generate component forecasts. 

DPE Templates and How They Work

Manufacturing Cloud includes four DPE templates that you can use to calculate your forecasts. You can identify the DPEs by their Process Type, which is Program Based Business. 

The four predefined Data Processing Engine definitions.

Let’s find out more about the definitions and how they work.

Data Processing Engine Template What Does It Do?

Generate Program Component Forecast

When you generate component forecasts for the first time for a program, use this definition. Susan can also trigger it when the underlying program and variant forecast have changed since the last run and Jackie imports new forecasts for a program.

Calculate Program Component Forecast

For each period, the forecast gets calculated to give you the latest values. For Rayler Motors, this definition runs each month. Susan can also trigger it when new components are introduced, or if there are new Product Related Material records that have been created since the last run.

Rollover Program Component Forecast

At the end of each month, the forecast display rolls over to expire the forecast for the first period, and add another period to the display. This definition generates component forecasts for new periods.

Regenerate Program Component Forecast

When you make changes to the forecast set configurations or change the dimensions and period groups, run this definition to generate forecasts based on the updated parameters. The definition expires the existing forecast records and creates new forecasts.

The DPEs first extract data from the following object records.

  • Advanced Account Forecast Period
  • Advanced Account Forecast Period Group
  • Advanced Account Forecast Set
  • Advanced Account Forecast Set Use
  • Manufacturing Program
  • Manufacturing Program Component Forecast Fact
  • Manufacturing Program Template
  • Manufacturing Program Template Item
  • Manufacturing Program Variant Forecast Fact
  • Period
  • Price Book
  • Price Book Entry
  • Product
  • Product Related Material

The Data Source nodes in the Generate Program Component Forecast Data Processing Engine definition.

Each DPE then joins, filters, and aggregates data, applies other transformations like formulas and slices, and finally writes back the data to the Manufacturing Program Component Forecast object. The measure fields like Total Cost Per Unit, Expected Profit Per Unit, and Selling Price Per Unit are populated, along with the system-calculated Forecasted Quantity and Forecasted Revenue.

To automate the process of getting forecasts updated every week, Susan runs these definitions through separate scheduled Salesforce Flow definitions. When there are new programs that require new component forecasts, or existing forecasts that need recalculating, the flow triggers these processes. Susan runs a flow that generates forecasts for the new Xela PowerUp program. When the flow run is successful, she informs Jackie. 

View Forecasts and Make Adjustments

Jackie can now see forecasts for all three levels on the Xela PowerUp program record. She can seamlessly navigate between the program, variant, and component forecasts. She can also filter the data by dimensions like Manufacturing Plant, Car Model, Variant Name, and Part Name. She can see monthly forecasts for 24 periods and she can filter the forecast by Period so that she can concentrate on a few periods at a time.

It’s time for Jackie’s call with the purchasing manager at Xela Automotive. Jackie walks him through the rich component forecast data that the application has generated. He is impressed to see the granular details such as component quantities aggregated for each variant and manufacturing plant. 

However, the purchasing manager wants a few changes. For the upcoming month of February, he’d like Jackie to increase the forecasted quantity of gear boxes for the Xela PowerUp XZ Plus car by 20%. That’s because Xela Automotive wants to keep a surplus inventory on hand while assembling the cars. Luckily for Jackie, Susan had already configured forecast adjustment periods. For the first 5 days each month, Jackie can edit the forecasts. 

Jackie clicks the Forecasted Quantity cell for February for Gear Box 2100 on the component forecast view and changes the value. She also adds the following adjustment note: “Need surplus for assembling the car.” When she saves her changes, she can see the changes are tracked. This makes it easier for engineering managers to view the change in quantity and the reason for the change. Since engineering managers can also edit the forecasts for the next 5 days, they can make adjustments as needed.

The engineering manager looks at the forecast and is happy with Jackie’s changes. A quick check of the production plans and inventory reassures him that there are enough gear boxes on hand. Jackie can now start negotiations with Xela. It’s time for Rayler Motors to start exploring this as a potential business opportunity. And this was all possible because of Manufacturing Cloud!

Meet the Transformation API

The component forecast looks good and the components have been finalized, so Jackie must convert the forecast into an opportunity. Sales managers at Rayler Motors can then follow the usual sales process of fulfilling the opportunity, confirming a new business deal for Rayler Motors. And they can then track the new recurring business terms with sales agreements. Key account managers can track the planned and actual quantities, and revenues of each product component over time.

Manufacturing Cloud comes with a powerful API that can achieve all of this and take the business further. The Transformation API can translate records at the following levels.

  • Parent to Parent: Converts the Manufacturing Program Component Forecast Fact header details into Opportunity header details. You can also use this to convert Opportunity or Quote header details to Sales Agreement header details.
  • Parent to Child: Converts the Manufacturing Program Component Forecast Fact header details into Opportunity Line Item or Opportunity Line Item Schedule details.
  • Child to Child: Converts the Opportunity Line Item or Quote Line Item into Sales Agreement Product details.
  • Support: Helps derive certain fields like Account from the Manufacturing Program and populates the Account on an Opportunity record. This mapping is used along with one of the other three mappings. When you convert the Manufacturing Program Component Forecast into an Opportunity, you don’t get the Account automatically.

Convert Forecast Into Opportunities

Let’s find out how Susan converts the Manufacturing Program Component Forecast Fact records for the Xela PowerUp program into an Opportunity record. Each Opportunity record has multiple related Opportunity Line Item and Line Item Schedule records for each period.

  1. Create field mappings: Susan uses the ObjectHierarchyRelationship metadata API to retrieve and deploy field mappings between the input object and the output object. The Usage Type should be Transformation Mapping. Susan creates files for the following mappings.
    1. Parent to Child: MfgProgramCpntFrcstFact to Opportunity
    2. Child to Child: MfgProgramCpntFrcstFact to OpportunityLineItem
    3. Child to Child: MfgProgramCpntFrcstFact to OpportunityLineItemSchedule
    4. Support: ManufacturingProgram to Opportunity
  2. Define payload request parameters: Susan defines the request parameters to specify some basic values such as the Account ID and PriceBook ID for the new Opportunity Line Items.
  3. Trigger the API: Susan then triggers the following API call to get the Forecast Fact records and convert them into opportunity records with the specified response parameters and mapped field values. /services/data/v55.0/connect/manufacturing/transformations

Jackie can now see the Opportunity record on the Related tab of the Xela PowerUp program. For each component, an Opportunity Line Item record has also been created. With the period and selling price per unit information, the Opportunity Line Item Schedule records have also been populated.

Guarantee Business with Sales Agreements

It’s a happy day at Rayler Motors. The opportunities have been closed and won and Rayler Motors got the deal with Xela Automotive. Xela wants to enter into a 2-year sales agreement for the three components at a monthly frequency. Susan follows the same process to convert.

  • Opportunity to Sales Agreement
  • Opportunity Line Item to Sales Agreement Product.

And she uses the SalesAgreement connect API to complete the conversion.

Susan and Jackie have worked hard to grow the business at Rayler Motors. Manufacturing Cloud has helped them every step of the way. We hope you can also apply your learning and blaze new trails with Program-Based Business in Manufacturing Cloud!

Resources

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback