---
schema_version: "1"
id: d2a600332ffd325c7fb2738e0d19316a605f95cf6b7d47eaea4300ff3e3ee409
title: "Example: Add the Location Dimension for Account Forecasts"
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/aaf_admin_custom_dpe.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.aaf_admin_custom_dpe.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1f04a14b7f76c27b390f9256c20272fc20fe738844d1ddabb1f8ff8430191ab7
description: You can customize the default forecast set and out-of-the-box Data Processing Engine templates by adding additional dimensions, measures, and filters. This example shows how to add a dimension called Location and customize the out-of-the-box Generate Account Forecast Data Processing Engine definition to generate account forecasts.
products:
  - Manufacturing
release: "264"
---
# Example: Add the Location Dimension for Account Forecasts

You can customize the default forecast set and out-of-the-box Data Processing Engine templates by adding additional dimensions, measures, and filters. This example shows how to add a dimension called Location and customize the out-of-the-box Generate Account Forecast Data Processing Engine definition to generate account forecasts.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

1. Create a custom object called Product Location Mapping with these fields.
    
     
    | Field Name | Type |
    | --- | --- |
    | Product\_c | Lookup to Product object |
    | Location\_c | Lookup to Location object |
    
    ![Custom DPE custom objects](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-manufacturing-264-0-0-production-enus/71a7997a-6330-43f9-81ad-0e7c8f13997c/manufacturing/images/plm_custom_object.png)
2. Add product and location mapping records in the Product Location Mapping object.
3. In the Advanced Account Forecasting setup, create a dimension called Location with the following values.
    
     
    | Field Name | Value |
    | --- | --- |
    | Name | Location |
    | Source Object | Location |
4. In the Default Forecast Fact object, add a custom field called Location with a lookup to the Location object.
    
    ![Forecast Fact object location lookup field](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-manufacturing-264-0-0-production-enus/71a7997a-6330-43f9-81ad-0e7c8f13997c/manufacturing/images/forecast_fact_add_field.png)
5. Configure the Default Forecast Set to include the Location dimension. To show the forecast data with products for each location, change the display order for the Product dimension to 2 and enter the display order for Location as 1.
    
     
    | Field Name | Description |
    | --- | --- |
    | Name | Location |
    | Forecast Fact Dimension Field | Location\_c |
    | Display Order | 1 |
6. Open the out-of-the-box Generate Account Forecast Data Processing Engine definition.
7. Click **Save As**, and then save the definition as Custom Generate Account Forecast.
8. Add two data source nodes called Location and Product Location Mapping. For the Product Location Mapping node, in the object, select the Location and Product fields and add an alias for the two fields.
    
     
    | Field Name | Alias |
    | --- | --- |
    | Product | PLMProductId |
    | Location | PLMLocationId |
    
    ![Generate DPE add data sources](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-manufacturing-264-0-0-production-enus/71a7997a-6330-43f9-81ad-0e7c8f13997c/manufacturing/images/dpe_data_sources.png)
    
    ![Product location mapping alias for fields](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-manufacturing-264-0-0-production-enus/71a7997a-6330-43f9-81ad-0e7c8f13997c/manufacturing/images/plm_alias_fields.png)
9. Add an Inner join called Generate Account Forecast Fact Join Product Location Mapping, with the source node as Compute IsActive Attribute On Account Forecast Fact and target node as Product Location Mapping. Map the product field of the source node (ProductId) to the target node (PLMProductId).
    
    ![Product Location mapping node field mappings](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-manufacturing-264-0-0-production-enus/71a7997a-6330-43f9-81ad-0e7c8f13997c/manufacturing/images/inner_join_plm_field_mapping.png)
10. Add an inner join called Generated Account Forecast Fact Join Location with the source node as Generate Account Forecast Fact Join Product Location Mapping and target node as Location. Map the location fields: PLMLocationId to LocationId.
    
    ![Location inner join node field mappings](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-manufacturing-264-0-0-production-enus/71a7997a-6330-43f9-81ad-0e7c8f13997c/manufacturing/images/dpe_location_node_mapping.png)
11. Download the Custom Generate Account Forecast data processing engine definition file.
12. Open the file in a JSON editor, and then replace the API name of the source node for the Upsert Account Forecast Fact Record writeback node by the API name of the Generated Account Forecast Fact Join location node.
    
    ![Writeback node source field API name](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-manufacturing-264-0-0-production-enus/71a7997a-6330-43f9-81ad-0e7c8f13997c/manufacturing/images/json_writeback_update.png)
13. Upload the modified JSON file to your org.
14. Update the Upsert Account Forecast Fact Record writeback node to include a source field (PLMLocationId) and Target (Location\_c), and then save the definition.
    
    ![Writeback node new field mapping](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-manufacturing-264-0-0-production-enus/71a7997a-6330-43f9-81ad-0e7c8f13997c/manufacturing/images/dpe_custom_writeback_field_mapping.png)