Log in
Linked Applications
Loading…
Spaces
Glossaries
Create
Create
Hit enter to search
Announcement Banner
Help
Online Help
Keyboard Shortcuts
Feed Builder
What’s new
Available Gadgets
About Confluence
Log in
Cash Collection Wiki
Pages
Cash Collection Wiki Home
Realized Sales Section for Opportunity Product Forecasting
Realized Sales Section for Opportunity Product Forecasting
search
attachments
weblink
advanced
image-effects
image-attributes
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
Colour picker
More colours
Formatting
Strikethrough
Subscript
Superscript
Monospace
Clear formatting
Bullet list
Numbered list
Task list
Outdent
Indent
Align left
Align center
Align right
Page layout
Link
Table
Insert
Insert content
Files and images
Link
Markup
Horizontal rule
Task list
Date
Symbol
Insert macro
User mention
Jira Issue/Filter
Info
Add Lucidchart Diagram
draw.io Diagram
Embed draw.io Diagram
draw.io Board Diagram
Status
Gallery
Table of Contents
Google Drive Live Link
Embedded Google Drive Folder
Embedded Google Drive File
Google Drive Search Result
Other macros
Page layout
No layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard shortcuts help
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account.
This page is also being edited by
. Your changes will be merged with theirs when you save.
<h3><strong>1. Overview</strong></h3><p>The <strong>Realized Sales</strong> section is part of the Opportunity Product Forecasting functionality, aimed at capturing and managing realized sales for products associated with opportunities. It supports the creation, update, and synchronization of realized sales records (ORSY), linking opportunity line items to forecasted product sales for specific years.</p><p>The purpose of this document is to provide an overview of the functionality and design for managing realized sales, including creation, update, and deletion processes based on product forecasts.</p><hr /><h3><strong>2. Scope</strong></h3><p>This functional design covers the <strong>Realized Sales</strong> section, focusing on the following features:</p><ul><li><strong>Opportunity Realized Sales Year (ORSY) Management</strong>: Creation and update of ORSY records based on OpportunityLineItems and <code>SLV_Product_Forecast__c</code>.</li><li><strong>Financial Management</strong>: Handling realized sales, prices, volumes, and contribution margins for opportunity products.</li><li><strong>Synchronization</strong>: Processes to keep ORSY records up to date based on changes in product forecasts.</li></ul><hr /><h3><strong>3. Functional Requirements</strong></h3><h4><strong>3.1 Realized Sales Data Creation</strong></h4><p>The system automatically creates <code>Opportunity_Realized_Sales_Year__c</code> (ORSY) records when a product forecast (<code>SLV_Product_Forecast__c</code>) is created or updated. ORSY records track realized sales for a given opportunity product over a specific year.</p><h5><strong>Inputs:</strong></h5><ul><li><strong>Product Forecast (<code>SLV_Product_Forecast__c</code>)</strong><ul><li>Opportunity (<code>SLV_Opportunity__c</code>)</li><li>Product (<code>SLV_Product__c</code>)</li><li>Forecast Year (<code>SLV_Year__c</code>)</li><li>Forecast Volume and Price</li><li>Contribution Margin</li><li>Currency (<code>CurrencyIsoCode</code>)</li></ul></li></ul><h5><strong>Outputs:</strong></h5><ul><li>A new ORSY record is created with the following fields:<ul><li><strong>Opportunity</strong> (<code>Opportunity__c</code>): The opportunity to which the realized sales relate.</li><li><strong>Opportunity Product</strong> (<code>Opportunity_Product_Id__c</code>): The specific product line item associated with the opportunity.</li><li><strong>Forecast Year</strong> (<code>Year__c</code>): The year the realized sales are tracked for.</li><li><strong>Product</strong> (<code>Product__c</code>): The product being forecasted.</li><li><strong>Currency</strong> (<code>CurrencyIsoCode</code>): The currency of the forecasted and realized sales.</li></ul></li></ul><hr /><h4><strong>3.2 Synchronization of ORSY Records</strong></h4><p>ORSY records are synchronized with their associated opportunity and product line items based on the product forecasts. When changes occur in the forecast data, the corresponding ORSY records must be updated or created.</p><h5><strong>Trigger Events:</strong></h5><ul><li><strong>Creation or Update of Product Forecast (<code>SLV_Product_Forecast__c</code>):</strong><ul><li>When a product forecast is created, updated, or deleted, the ORSY records associated with the forecast are synchronized. If a new year or product is forecasted, new ORSY records are created. If a forecast is deleted, the corresponding ORSY records are also deleted.</li></ul></li></ul><h5><strong>Process Flow:</strong></h5><ol><li><strong>Mapping Forecast to Opportunity Line Items:</strong><ul><li>The system matches each forecast to an <code>OpportunityLineItem</code> based on the opportunity and product fields.</li></ul></li><li><strong>ORSY Record Creation:</strong><ul><li>For each opportunity line item, an ORSY record is created for each forecast year.</li></ul></li><li><strong>Handling Duplicates:</strong><ul><li>The system checks for existing ORSY records for the same opportunity product and year to avoid duplication. If an existing record is found, it may be updated, not recreated.</li></ul></li></ol><h5><strong>Data Synchronization Logic:</strong></h5><ul><li>ORSY records are linked to <code>SLV_Product_Forecast__c</code> and <code>OpportunityLineItem</code> records.</li><li>The key fields for mapping and synchronization are:<ul><li><strong>Opportunity</strong> (<code>Opportunity__c</code>)</li><li><strong>Opportunity Product</strong> (<code>Opportunity_Product_Id__c</code>)</li><li><strong>Year</strong> (<code>Year__c</code>)</li><li><strong>Product</strong> (<code>Product__c</code>)</li></ul></li></ul><hr /><h4><strong>3.3 Updates to Realized Sales Data</strong></h4><p>The system supports updates to ORSY records based on changes in the product forecast. Key financial fields, such as price, volume, and contribution margin, are updated if modified in the forecast.</p><h5><strong>Updatable Fields:</strong></h5><ul><li><strong>Price (<code>SLV_Price__c</code>)</strong>: Updated from product forecast.</li><li><strong>Volume (<code>SLV_Volume__c</code>)</strong>: Updated from product forecast.</li><li><strong>Contribution Margin (<code>SLV_Contribution_Margin__c</code>)</strong>: Updated based on changes in the forecast contribution margin.</li></ul><h5><strong>Non-Updatable Fields:</strong></h5><ul><li><strong>Year (<code>Year__c</code>)</strong>: Cannot be updated after creation. If the forecast year changes, a new ORSY record is created for the new year.</li><li><strong>Opportunity and Opportunity Product (<code>Opportunity__c</code> and <code>Opportunity_Product_Id__c</code>)</strong>: These fields are static once the ORSY record is created. A change in product or opportunity will lead to the creation of a new ORSY record rather than updating the existing one.</li></ul><hr /><h4><strong>3.4 Deletion of ORSY Records</strong></h4><p>ORSY records are deleted when the corresponding product forecasts are removed. This ensures that orphaned ORSY records do not remain in the system.</p><h5><strong>Deletion Logic:</strong></h5><ul><li>When an <code>SLV_Product_Forecast__c</code> is deleted, the system identifies and deletes the associated ORSY records.</li><li>The deletion process involves querying the <code>Opportunity_Realized_Sales_Year__c</code> records linked to the deleted product forecast and performing a bulk delete operation.</li></ul><hr /><h3><strong>4. Process Diagrams</strong></h3><h4><strong>4.1 ORSY Creation Process</strong></h4><p><br /><code><span class="hljs-built_in">Product</span> <span class="hljs-variable">Forecast</span> <span class="hljs-punctuation">(</span><span class="hljs-type">SLV_Product</span><span class="hljs-type">_Forecast</span><span class="hljs-type">__c</span><span class="hljs-punctuation">)</span> <span class="hljs-variable">Created</span> <span class="hljs-variable">or</span> <span class="hljs-variable">Updated</span> <span class="hljs-operator">|</span> <span class="hljs-variable">v</span> <span class="hljs-variable">Match</span> <span class="hljs-variable">Forecast</span> <span class="hljs-variable">to</span> <span class="hljs-variable">Opportunity</span> <span class="hljs-built_in">Line</span> <span class="hljs-built_in">Item</span> <span class="hljs-punctuation">(</span><span class="hljs-variable">OLI</span><span class="hljs-punctuation">)</span> <span class="hljs-operator">|</span> <span class="hljs-variable">v</span> <span class="hljs-variable">Create</span> <span class="hljs-variable">or</span> <span class="hljs-built_in">Update</span> <span class="hljs-variable">ORSY</span> <span class="hljs-variable">Records</span> <span class="hljs-variable">for</span> <span class="hljs-variable">the</span> <span class="hljs-variable">Forecast</span> <span class="hljs-variable">Year</span><span class="hljs-punctuation">(</span><span class="hljs-variable">s</span><span class="hljs-punctuation">)</span> <span class="hljs-operator">|</span> <span class="hljs-variable">v</span> <span class="hljs-built_in">Insert</span> <span class="hljs-variable">or</span> <span class="hljs-built_in">Update</span> <span class="hljs-variable">Financial</span> <span class="hljs-variable">Data</span> <span class="hljs-variable">in</span> <span class="hljs-variable">ORSY</span> </code></p><h4><strong>4.2 ORSY Deletion Process</strong></h4><p>mathematic<br /><code><span class="hljs-built_in">Product</span> <span class="hljs-variable">Forecast</span> <span class="hljs-punctuation">(</span><span class="hljs-type">SLV_Product</span><span class="hljs-type">_Forecast</span><span class="hljs-type">__c</span><span class="hljs-punctuation">)</span> <span class="hljs-variable">Deleted </span></code></p><p><span class="hljs-built_in" style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;">Find</span><span style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;"> </span><span class="hljs-variable" style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;">Related</span><span style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;"> </span><span class="hljs-variable" style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;">ORSY</span><span style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;"> </span><span class="hljs-variable" style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;">Records</span><span style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;"> </span><span class="hljs-punctuation" style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;">(</span><span class="hljs-type" style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;">Opportunity_Realized</span><span class="hljs-type" style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;">_Sales</span><span class="hljs-type" style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;">_Year</span><span class="hljs-type" style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;">__c</span><span class="hljs-punctuation" style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;">)</span><span style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;"> </span></p><p><span class="hljs-variable" style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;">Bulk</span><span style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;"> </span><span class="hljs-built_in" style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;">Delete</span><span style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;"> </span><span class="hljs-variable" style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;">ORSY</span><span style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;"> </span><span class="hljs-variable" style="font-family: SFMono-Medium , "SF Mono" , "Segoe UI Mono" , "Roboto Mono" , "Ubuntu Mono" , Menlo , Courier , monospace;letter-spacing: 0.0px;">Records</span></p><hr /><h3><strong>5. Validation and Error Handling</strong></h3><ul><li><strong>Validation on Forecast Update</strong>: The system prevents updates to realized sales data for closed-won opportunities where the forecast year is less than or equal to the current year.</li><li><strong>Error Messages</strong>:<ul><li>"You can't update the Business Potential for years less than or equal to [Year] when the opportunity is Closed Won."</li><li>"You can't update the Business Potential when the opportunity is Closed Lost."</li></ul></li></ul><hr /><h3><strong>6. Assumptions</strong></h3><ul><li>Product forecasts will always have valid opportunities and products linked.</li><li>There will be no direct user input into ORSY records; they will be generated based on product forecasts.</li><li>Financial fields such as price and volume will always be valid upon creation or update.</li></ul>
Edit
Preview
Save
Close
{"serverDuration": 76, "requestCorrelationId": "60a502a873c48c30"}