You are here:
Flow for Advanced Account Forecast Calculations
Use flows to orchestrate the end-to-end process of calculating forecasts. You can create flows that run data processing engine definitions to calculate forecasts based on sales agreements, orders, opportunities, or other records. To get started quickly, use the default flows that come with prebuilt apps or customize the templates based on your needs. You can also build a flow from scratch and add the invocable actions for Advanced Account Forecasting and Data Processing Engine to your flows.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Unlimited, and Developer Editions |
Flows in Prebuilt Apps
Manufacturing Cloud includes prebuilt apps that help you quickly start your implementation and explore proof-of-concept workflows. The prebuilt apps for Advanced Account Forecasting include flows and other components that you can use to orchestrate forecast calculations.
- Advanced Account Forecast Product Category: Use the components in the prebuilt app to generate forecasts at any level in the product category hierarchy.
- Advanced Account Forecast Revenue Measures: Use the components in the prebuilt app to generate forecasts for key revenue measures.
Key Specifications of a Forecast Calculation Flow
Before you create a flow for generating forecasts from scratch, review the key specifications of these flows.
- To schedule your forecast calculations at fixed intervals, create a Schedule-Triggered flow.
- To run a data processing engine definition by using a flow, add an Action element to the flow, and select the data processing engine definition to be run. See Run a Data Processing Engine Definition in Flows and Data Processing Engine Actions .
- To allow users to specify the dimensions for which forecasts are generated, create a screen flow. Add a screen element to collect dimension information. The collected information is stored in variables. Set the variables as the input values for the action that runs the data processing engine definition.
- You can design a flow that has elements that are dependent on the results written back by a data processing engine definition that's run in the same flow. You can pause the flow by using a Wait element when the Data Processing Engine definition is running and resume the flow after the run is complete.
- To calculate forecasts for an account based on the formulas associated with a forecast set, add the Calculate Advanced Account Forecasts invocable action to your flow.
- To update the status of the Advanced Account Forecast Set Partner record after the forecast data for an account and a forecast set is generated, add the Update Advanced Account Forecast Set Partner invocable action to your flow.
- If you’re processing a large number of records, we recommend processing the data in batches to generate forecasts.
Example Flow
A manufacturing company wants to generate forecasts for available products at various inventory locations. The company's Salesforce admin clones the Generate Account Forecast DPE template to create a DPE definition called Generate Product Inventory Quantity Forecasts. The admin modifies the definition to generate forecasts for products at different inventory locations. The admin creates a forecast set called Product Inventory Quantity with Inventory Location and Product as the dimensions and Available Quantity as the measure.
The admin creates a flow with these elements to run the DPE definition.
| Element | name | Description |
|---|---|---|
| Start | Start | Sets the schedule of running the flow. For example, 5:00 PM every week starting from June 27, 2024. |
| Screen | Collect Inventory Location Information | Collects the ID of the Associated Location record that stores the inventory location information. The screen uses a Text input component to capture the associated location ID. The associated location ID is stored in a variable. |
| Action (Data Processing Engine) | Run Data Processing Engine Definition | Calls an action to start a batch job to run the Product Inventory Quantity Forecasts DPE definition. For the input values, the admin specifies the ID of the Product Inventory Quantity forecast set and the variable that stores the associated location record ID. For output values, the flow records whether the batch job request was successful, and stores the Batch Job ID in variables. |
| Action (Send Email) | Send Failure Email | Calls an action that sends an email to the admin if the Run Data Processing Engine Definition action fails. |
| Action (Send Email) | Send Job Initiated Email | Calls an action that sends an email to the admin if the Run Data Processing Engine Definition action starts. |
| Wait | Pause Until Action Completes | Pauses the flow until the Run Data Processing Engine Definition action is complete. |
| Get Records | Get Batch Job | Gets the details of the batch job by using the Batch Job ID. |
| Get Records | Get Batch Job Definition | Gets the details of the batch job definition. |
| Decision | Was Batch Job Complete | Determines whether the batch job was completed using the status of the batch job definition. |
| Action (Send Email) | Send Job Complete Email | Calls an action that sends an email to the admin if the batch job definition is completed. |
| Action (Send Email) | Send Job Not Completed Email | Calls an action that sends an email to the admin if the batch job definition isn't completed. |

