Link to the diagram: https://app.diagrams.net/#G16eEobBBJKYsb0qsKgIaowv1XS-4hUgJl
iCARe Quote creation and price calculation Epic Links:
Rules for the quote creation:
- Quote Valid To external date must be equal or lower than the Quote Valid To internal date
- Final Consignee is optional. If populated, the quote line items created inside the quote will have the same final consignee
Information to create a quote:
- Quote Valid From and Quote Valid To internal dates is the products that can be included inside the quote (the price of the product must be the same or beyond these two dates)
- Quote Valid To external date
- Region and Currency will drive the price selection for the products added to the quote
Rules to determine the end use and market segment in the OLIs:
On the end_use__c object, the system searches for the account in the quote and product(s) selected.
If there is an end_use__c record matching, the systems gets the market segment and end use values and automatically populate them in the OLI.
The system also displays the values in the screen below as read-only.
If there is no end_use__c record matching the account and products, the system dispkays the fields as editable, so the account manager must select the values manually.
Rules to determine the Pricing market in the OLIs:
The pricing market is the pricing setting selected by the system, based on the Region and Currency in the quote.
The pricing market by default is the generic one (with the market segment empty), named BLANK.
Usually, we have one pricing setting for each region and currency with market segment empty. The system displays it as BLANK.
Additionally, we could also have pricing settings for specific market segments, like in the screen below.
If we have the BLANK market segment and the specific market segment, the account manager is able to select between them.
If we don't have the blank market segment or the price list for the currency and the region, the system presents the pricing market without options and an error is displayed after click on "Add Product"
Rules to add products into a quote:
When the account manager is adding product(s) into the quote, after clicking on Save button, the system should verify the following:
Compare if the Product Pricing Valid From is equal or less than Quote Valid From and Product Pricing Valid Until is equal or greater than the longest date between Quote Valid Until (Internal) and Quote Valid Until external
if yes, do nothing
if no, display an error message n the top of the page saying “The quote validity dates are outside the price list validity dates for [Product Name]. Please contact the PM or update the validity date of this quote“ and hide the button “Send for Approval”
To be able to proceed the account manager should remove the product(s) from the quote or extend the quote valid From and/or Quote Valid To (Internal Only) and Quote Valid To (external) date(s).
From the example below, the quote validity dates in the green rectangle and the opportunity line items below, the opportunity line items allowed in this quote are OLI1, OLI7 and OLI8, because the validity dates are equal or longer than the quote.validity dates.
Rules to add final consignee into the OLIs:
Diagram Flow: https://app.diagrams.net/#G1EyofPlJM7TMbEKk4wHzSSH58p973JI7r
A final consignee is an SAP customer account or distributor that could be assigned to a quote line item, by clicking on the pencil next to the field, as you can see in the screenshot below:
In the final consignee screen, the account manager can search by the name or the PRS Code.
The final consignee could be a non-SAP customer, the account manager can chosse an account without SAP/PRS Code as the final consignee.
However, the CSR will not be able to automatically send the prices to SAP (the "Send to SAP" button will be disabled because the PRS Code is missing).
The final consignee can be assigned in the quote or in the quote line items.
Final Consignee is assigned in the quote:
- when the final consignee is selected during the quote creation => for the products added after the quote creation, the system will automatically populate them with the same final consignee in the quote
- when the final consignee is selected without having products in the quote => same behavior as above
- when the final consignee is selected after adding products into the quote => the system will not update the final consignee on the products, the final consignee remains the same
- when the quote has a final consignee and the products are added after that => all the products added into the quote will be pre-populated with the same final consignee that is in the quote
Final Consignee assigned in the quote line item:
- the quote has no final consignee assigned (the field is blank), so the account manager is allowed to select any final consignee on the quote line item
- the quote has the final consignee A, when account manager assigns the final consignee A in the quote line item, the system allows him to do that
- when the account manager assigns the final consignee B into one quote line item, the system is checking the final consignee in the quote
- if the final consignee is empty or B in the quote => the account manager is allowed to assign any final consignee and no error message is displayed
- if the final consignee is populated in the quote and is not empty and is not B => the account manager will see an error message asking him to remove the final consignee in the quote because the rule is:
- when there are multiple final consignees in the line items, the final consignee in the quote must be blank
- when the final consignee is the same for all the quote line items and in the quote, no message is displayed and the records are saved
- if the account manager adds the same product in the same quote twice:
- if the final consignee in both quote line items is empty => the system will display an error message and the account manager is not allowed to proceed before fix the error
- if the final consignee in both quote line items is the same => the system will display an error message and the account manager is not allowed to proceed before fix the error
- if the final consignee in both quote line items is diffetent (different final consignees or one quote line item without final consignee and the other one with final consignee populated) => the system allows the account manager to proceed
In order to fix the errors above, the account manager should follow the rule:
- in the quote, the system only allows one quote line item with the following combination: account + product + region + currency + final consignee
Rule to determine Opportunity Market Cluster
HOW Is it working ?
Market Cluster is automatically populated based on the end use value. The calculation rules are inside EndUse_TriggerUtility class, on the method getMarketCluster and the possible values assigned to Market Cluster are the following:
- if account Team_Cluster__c is empty then Market_Cluster__c = Not Identified
- if account Team_Cluster__c is Channel Partners then Market_Cluster__c = Channel Partners & Digital Sales
- if End_Use__c from Realized Sales/Opportunity/Opportunity Product record is empty then Market_Cluster__c = Not Identified
There is a configuration matrix called End Use Mapping (End_Use_Maping__mdt) in iCARe that contains all the End Use values + the corresponding Market Cluster. This matrix must be updated every time we update or create new Market Cluster or End Use.
- if End_Use__c from Realized Sales/Opportunity/Opportunity Product record doesn't match the end use value
in the End Use Mapping then Market_Cluster__c = Not Identified
- if End_Use__c from Realized Sales/Opportunity/Opportunity Product record is not empty, check:
- if End_Use__c first 40 characters exists in End Use Mapping then get Market_Cluster__c value
If this condition fails, tries the following:
- if End_Use__c exists in End Use Mapping then get Market_Cluster__c value
Rules to hide Send for Approval button:
Every time there is an error message displayed in red in any OLI or the system displays a warning icon next to the product name, the button Send for Approval is disabled.
Rules to determine the quote line item approver when the price is deviated:
Price deviation might trigger an approval process depending on the quote price after discount amount (available in the column Quote Price (after discount)).
The approval thresholds are configured in the product bracket. Every quote line item is linked to a pricing setting that has product brackets.
The product bracket is pointing the reference price for the product on each quote line item, based on the annual volume filled-in by the account manager.
After having the annual volume, the system determines the product bracket and the pricing setting and displays the reference price.
The account manager can deviate the price proposed on the price list and some scenarios can happen:
- no approval needed when
- the price is below the threshold Product Manager Approval
- the price is equal or above the reference price
- approval is needed when
- the price after discount is equal to or above the Product Manager Approval and below the Sales Director Approval thresholds => requires product manager approval
- the price after discount is equal or higher than the Sales Director Approval threshold => requires regional sales director approval
In a quote, if there is at least one quote line item that requires regional sales director approval, the system assigns all the other quote line items that require approval,
to the same regional sales director, in order to avoid have different people approving the deviations.
The thresolds can be found in the product brackets, as we can see below:
The sales director is determined by the routing matrix - Local Empowerment (Sales QUotes)
Sales director is identified depending on:
- Opportunity line item object: Market_Cluster__c
- Account object: Reporting_Region_ECCO__c
Market Segment is automatically calculated for Opportunity Products (Opportunity_Line_Item__c ) inside Opportunity_Line_Item_TriggerHandler class and is also automatically calculated for Sold and Pending (Sales_Order__c) inside SoldAndPendingTriggerUtility class.
The rules to determine the Market Segment for both are the following:
- if AccountId + Product__c (Match_Type__c = 'Product') matches on End_Use__c object records
OR if AccountId + Product_Hierarchy__c (Match_Type__c = 'Product Hierarchy') matches on End_Use__c object records then get End_Use__c from End_Use__c object to populate End_Use__c from Opportunity_Line_Item__c/Sales_Order__c and get Market_Segment__c from End_Use__c object to populate Market_Segment__c from Opportunity_Line_Item__c/Sales_Order__c
The rules to calculate Market Cluster for Sold & Pending are inside SoldAndPendingTriggerUtility class. They are the following:
- Search the End_Use_Text__c value from S&P record on the End Use Mapping (End_Use_Maping__mdt)
- if End_Use_Text__c exists in End_Use_Maping__mdt then get Market_Cluster__c value from the matrix to update Market_Cluster__c field
The rules to calculate Market Cluster for Realized Sales are inside SalesTriggerUtility class. They are the following:
- Search the End_Use__c value from Realized Sales record on the End Use Mapping (End_Use_Maping__mdt)
- if End_Use__c exists in End_Use_Maping__mdt then get Market_Cluster__c value from the matrix to update Market_Cluster__c field
Market cluster field is automatically populated according to the different scenario below in the priority order:
In case, market cluster= Not identified, the approver would be the Product manager by default.
For all combination between Market Cluster and Reporting ECCO region, a Sales director is identified in the Routing Matrix.
For instance:
- Market Cluster at the OLI level: Channel Partners
- Reporting ECCO region of the Opportunity’s account: EMEA
- Sales director is Dries Steijnen
Rules to determine the approver when the Incoterm is deviated in the quote line item:
Standard incoterm is automatically populated from the pricing setting linked to the OLI. This value can be edited in the “Deviated incoterm” column.
If the incoterm is deviated, the Sales director will be the approver depending on the combination in the routing Matrix.
Rules to calculate the last quoted price:
Documentation:
Diagram Flow: To be done
The last quoted price is calculated by the system for quote line items and opportunity brackets (when release order volume is selected).
For quote line items, the system does the following calculation:
- searches for the quote line items that match the account + product + region + currency + final consignee
- orders the results starting by active quote line items in Closed - Sales Started quotes, inactive line items in Closed - Sales Started quotes, inactive line items in Quotes Expired
- if the system found one ctive quote line items in Closed - Sales Started quotes, this will be the last quoted price displayed, otherwise, continues.
- if the system found an inactive line items in Closed - Sales Started quotes, this will be the last quoted price displayed, otherwise, continues
- if the system found an inactive line items in Quotes Expired, this will be the last quoted price displayed, otherwise, won’t display anything
For opportunity brackets (when the order release volume is selected), the system does the following calculation:
- searches for the quote line items that match the account + product + region + currency + final consignee and Offer Pricing per release order volume? is checked
- if there is one or more matches, the system gets the opportunity brackets linked to the quote line items ordered by active quote line items in: Closed - Sales Started quotes, inactive line items in Closed - Sales Started quotes and finally inactive line items in Quotes Expired
- compares if the From and To volumes in the new opportunity brackets are equal or within the previous quotes volumes
- if there is a match, the system gets the order release price and displays the last quoted price, otherwise, the last quoted price is blank
Last quoted price is saved in the database when OLI is activated, but displayed only when the quote is closed sales started.
Rules to deactivate quote line item:
- when there is an existing quote line item active with the same combinations: account + product + region + currency + final consignee
- when the quote valid until internal date is less than today
Rules to turn the quote into Closed - Expired:
- when all the quote line items are inactive
- when the quote valid until internal date is less than today
- when there is another quote or quotes including the quote line items active for the same combination account + product + region + currency + final consignee
Error handling provided by the system in quotation:
When there is an error in a quote line item, the warning icon is displayed next to the product name, so the account manager can quickly identify that there is one or more errors to fix. The error message appear next to the fields that are in error.
When the error is red, is a blocking error and the system will not allow the account manager to proceed.
When the error is orange, is not a blocking error and the account manager can proceed but is an important alert for an action that needs to be taken as soon as possible.
| Field | Error | Color Code |
| Annual Volume | Enter a quantity above MOQ | Red |
Final Consignee | Multiple line items with same Product and Final Consignee | Red |
Final Consignee | Please click the "Create SAP account" - at the account level - to allow the price to be entered in SAP | Orange |
| Rationale & Description | Rationale is mandatory to fill a Discount Description is mandatory to fill a Discount | Red |
| Order Volume | Is mandatory when Offer pricing per release order volume is ticked | Red |
| Deviated Incoterm | Must be different from Standard Incoterm | Red |
| Order Volume | Must be blank when "Offer pricing per release order volume?” is not ticked | Red |
| Product | Quote validity dates are outside the price list validity dates. Contact the PM to update price validity dates or update the validity dates from this quote Today in UAT, to reduce the amount of text, we have: Pricing dates are not valid | Red |
| Final Consignee in the OLI | In order to proceed with different Final Consignees please remove the final consignee at the quote level | Red |
| Rationale next to Deviated Payment Term | The Payment Term deviation rationale is mandatory. | Red |
| Product | Quote validity dates are outside the price list validity dates. Contact the PM to update price validity dates or update the validity dates from this quote | Red |
| Deviated Payment Term | Deviated payment term and Standard payment term must be different. | Red |
| Justification Comment | If Deviated payment term is “Other (Please Describe)” the Payment term description is mandatory. | Red |



















