![Pricing Front End - 11240 > FD - [iCARe] Pricing Campaign > image2022-3-18_17-50-35.png](/download/attachments/758818308/image2022-3-18_17-50-35.png?version=1&modificationDate=1647625834517&api=v2)
![Pricing Front End - 11240 > FD - [iCARe] Pricing Campaign > image2022-3-21_17-14-47.png](/download/attachments/758818308/image2022-3-21_17-14-47.png?version=1&modificationDate=1647882886597&api=v2)
User, with the correct profile and permissions, can access to the Pricing Campaign feature through the top menu:
![Pricing Front End - 11240 > FD - [iCARe] Pricing Campaign > image2022-3-16_12-54-49.png](/download/attachments/758818308/image2022-3-16_12-54-49.png?version=1&modificationDate=1647549623785&api=v2)
Otherwise, they can also access to the Pricing Campaigns through the App Launcher:
![Pricing Front End - 11240 > FD - [iCARe] Pricing Campaign > image2022-3-16_12-55-49.png](/download/attachments/758818308/image2022-3-16_12-55-49.png?version=1&modificationDate=1647549624115&api=v2)
A. Table 'Pricing Campaign CPC'
Pricing campaign CPC records are displayed in the LWC below.
![Pricing Front End - 11240 > FD - [iCARe] Pricing Campaign > image2022-3-16_12-57-10.png](/download/attachments/758818308/image2022-3-16_12-57-10.png?version=1&modificationDate=1647549624158&api=v2)
The main goal of these filters on this LWC for users were to be as useful and helpful as possible.
![Pricing Front End - 11240 > FD - [iCARe] Pricing Campaign > image2022-3-16_13-3-37.png](/download/attachments/758818308/image2022-3-16_13-3-37.png?version=1&modificationDate=1647549624202&api=v2)
User must easily find CPCs with key information. Due to this requirement, we implemented logic explained below:
1/ Frozen Column
Two columns have been frozen for helping the user during the navigation of this table from left to right:
2/ Quote History Link
Quote history link redirect the user to a Salesforce report 'Account and Product Price History'
![Pricing Front End - 11240 > FD - [iCARe] Pricing Campaign > image2022-3-18_16-18-1.png](/download/attachments/758818308/image2022-3-18_16-18-1.png?version=1&modificationDate=1647620280789&api=v2)
![Pricing Front End - 11240 > FD - [iCARe] Pricing Campaign > image2022-3-18_16-17-34.png](/download/attachments/758818308/image2022-3-18_16-17-34.png?version=1&modificationDate=1647620253254&api=v2)
3/ Rationale link
Rationale link redirects the user to a google sheet:
![Pricing Front End - 11240 > FD - [iCARe] Pricing Campaign > image2022-3-18_16-21-10.png](/download/attachments/758818308/image2022-3-18_16-21-10.png?version=1&modificationDate=1647620469316&api=v2)
At the bottom of this LWC, Pricing campaign layout is available with Pricing Campaign key information:
![Pricing Front End - 11240 > FD - [iCARe] Pricing Campaign > image2022-3-16_12-58-39.png](/download/attachments/758818308/image2022-3-16_12-58-39.png?version=1&modificationDate=1647549624242&api=v2)
B. Table 'Related'
![Pricing Front End - 11240 > FD - [iCARe] Pricing Campaign > image2022-3-16_13-2-30.png](/download/attachments/758818308/image2022-3-16_13-2-30.png?version=1&modificationDate=1647549624307&api=v2)
E. Filtering and field dependencies
There is the cross option on each filter. When the AM clicks on the cross, the system will clean all the values previously selected for that filter.
![Pricing Front End - 11240 > FD - [iCARe] Pricing Campaign > image2023-6-6_11-5-51.png](/download/attachments/758818308/image2023-6-6_11-5-51.png?version=1&modificationDate=1686053153438&api=v2)
When the AM is opening one filter to select some values, the system must filter on the other filter in the back-end, so when the AM is opening another filter, he is not seeing the values that do not match the first filter(s).
Since the values that didn’t apply are hidden, the list of options is reduced.
After the AM selects the values in a filter, when he opens that filter again, the system should
display the values selected on the top of the filter list, ordered alphabetically
the remaining values from the list, if they exist, should come after, ordered alphabetically
![Pricing Front End - 11240 > FD - [iCARe] Pricing Campaign > image2023-6-6_11-40-11.png](/download/attachments/758818308/image2023-6-6_11-40-11.png?version=1&modificationDate=1686055212998&api=v2)
If Account Manager Review ISCHANGED to Rejected - is not auto-saved, but instead:
Message pop's up: “To Reject this CPC, please provide a Reason for Rejection.”
If the User then changes Reason for Rejection from null to not null:
auto-save and commit both values to database (Account Manager Review = Rejected and Reason for Rejection with whatever value the User chose).
if the User does not change Reason for Rejection from null to not null and instead refreshes the page:
do not save any changes made by the User - returning Account Manager Review to the value it had before it was changed to Rejected.
Alternatively, if the User just changes the Reason for Rejection from null to not null and the Account Manager Review != Rejected, present User with a validation Error:
“Please choose Rejected on Account Manager Review field before providing a Reason for Rejection”.
Do not auto-save Reason for Rejection until User chooses Account Manager Review = Rejected.
Note: If User changes Account Manager Review value from Rejected to Not Yet Reviewed or Committed - the system needs to automatically make Reason for Rejection and Rejection Description = null
The Account Manager can iinputs the Committed Price when the Account Manager Review is Committed . When the Committed Price entered by the Account Manager is equals or less than the last price, the system should automatically Reject the CPC.
When the Recommended Price is equal or lower than the last price, the system should keep the Account Manager Review as Committed.
When the Account Manager is updating the Account Manager Review to Committed or when the CPC Account Manager Review is Committed and the AM is updating the Committed Price, the system will evaluate
if the Committed price is equal or lower than the Last Price, evaluate the following:
if Last Price is greater than the Recommended Price - the system should do nothing
Committed Price <= Last Price && Last Price >= Recommended Price
Committed Price > Last Price
if Last Price is less or equal than the Recommended Price - the system should reject the CPC
Committed Price <= Last Price && Last Price < Recommended Price
The comparision of the values should be done after the system round up the values.
If the condition above is met, the system will automatically fill-in:
The 'Account Manager Review field in the CPC with Rejected value
The 'Reason for Rejection' field with 'Other (Please describe)'
The ‘Reason for Rejection' field with 'Committed Price equal or lower than Last Price''
User is able to create a quote only if at the CPC level:
![Pricing Front End - 11240 > FD - [iCARe] Pricing Campaign > image2022-3-16_13-10-24.png](/download/attachments/758818308/image2022-3-16_13-10-24.png?version=1&modificationDate=1647549624352&api=v2)
one
Pricing_Setting__r.Product_Pricing__r.Product__r.Product_Availability__c != Inactive
AND
Pricing_Setting__r.Product_Pricing__r.Valid_Active__c EQUALS TRUE
AND
Pricing_Setting__r.Region__c EQUALS Pricing_Campaign_CPC__r.Pricing_Region__c
AND
Pricing_Setting__r.CurrencyIsoCode EQUALS Pricing_Campaign_CPC__r.Pricing_Currency__c (only need to compare the first 3 characters of the Pricing Currency field of Pricing Campaign CPC)
Screen below is displayed to the user to explain the reason why a quote cannot be created:
![Pricing Front End - 11240 > FD - [iCARe] Pricing Campaign > image2022-3-17_16-35-59.png](/download/attachments/758818308/image2022-3-17_16-35-59.png?version=1&modificationDate=1647549624397&api=v2)
After clicking the button 'Create Quote' and only if there is a Pricing setting matching, a screen dedicated to create a quote appears:
![Pricing Front End - 11240 > FD - [iCARe] Pricing Campaign > image2022-3-16_13-25-30.png](/download/attachments/758818308/image2022-3-16_13-25-30.png?version=1&modificationDate=1647549624428&api=v2)
Logic has been implemented for the fields below in order to make the quote creation the easiest possible for the user:
SpP wants to transfer the accountability on the figures to Account Managers, so they should be able to edit the forecasted annual volume. The system by default an populate the Forecasted Annual Volume with the MoQ if the Forecasted Annual Volume is below MOQ. The Forecasted Annual Volume can be changed or updated by the account manager if needed (with a value higher than the MOQ).
The Forecasted Annual Volume should be updated in the CPC and in the OLI, to keep consistency.
![Pricing Front End - 11240 > FD - [iCARe] Pricing Campaign > image-20230124-121225.png](/download/attachments/758818308/image-20230124-121225.png?version=1&modificationDate=1686050009461&api=v2)
![Pricing Front End - 11240 > FD - [iCARe] Pricing Campaign > image2023-6-6_10-14-53.png](/download/attachments/758818308/image2023-6-6_10-14-53.png?version=1&modificationDate=1686050095949&api=v2)
When the AM clicks on Add Product button, the system will confirm if the Forecasted Annual Volume in the CPC is below the MOQ from the corresponding Pricing Setting.
if the Forecasted Annual Volume in the CPC is below the MOQ in the Pricing Setting, the system will display:
in edit mode the ‘Forecasted Annual Volume field
in read only the MOQ field according to the selected Pricing Market
the products impacted with Forecasted Annual Volume highlighted in red
an error message at the bottom of the screen, to advise the account manager to edit the Forecasted Annual Volume for the products highlighted in red:
Forecasted Annual Volume < MOQ for the products highlighted in red, please edit the forecasted annual volume (equal or above MOQ) directly in the field to be able to proceed with the creation of the quote'
The AM should change the Forecasted Annual Volume to a value equal or greater than the MOQ shown in the screen and then press the ‘Add Products’ button.
The system will validate again the Forecasted Annual Volume and will allow the AM to save the quote with the selected products. The system will update the Forecasted Annual Volume field in the CPCs linked to the OLis that were updated before.
For the products with Forecasted Annual Volume above MOQ, they will appear in the quote with the original Forecasted Annual Volume value from campaign.
Remarks:
1 - if the AM also updates the Pricing Market along with the MOQ, when he clicks on Add Products, the system will validate the Forecasted Annual Volume against the MOQ again.
Different Pricing Markets can have different MOQ thresholds and the MOQ value provided by the AM could end-up again in error-
The system will run the rules described in the previous slide and, in case of non compliance, the same behavior will be applied.
2 - If the quote is not created from the pricing campaign, if it’s a quote renewal or a quote created from scratch, the Forecasted Annual Volume and MOQ fields are grey out
MOQ is already grey out
Forecasted Annual Volume is empty and grey out when the OLI is not created from a CPC
When the CPC is created and every time the Account or the Product or the End Use are updated to a different Account/Product in the CPC,, the system will:
Get the Account and the Product in the CPC and search for them in the End Use (end_use_c rules) table
If there is one match, populate the end use and market segment in the CPC
Otherwise, leave them blank (if business needs to update the end use or market segment on the CPC, the update must be done at end use rules by updating the rule or creating a new rule. The account manager needs to request the GBU Data Steward to manage the end use rule).
When there is a new end use rule created or updated (end_use_c rules), take all the CPCs from all campaigns with the Account and Product present in the rule and update the End Use and Market segment in the CPC.
When the End Use is updated by the system, the system will: calculate the market cluster, reusing the existing logic:
If Account Team Cluster equals to null/Empty then Market Cluster = "Not Identified" If not, the system goes to the next rule.
If Account Team Cluster equals to ''Channel Partners & Digital Sales" then Market Cluster = ''Channel Partners & Digital Sales". If not, the system goes to the next rule.
If End Use equals to null/Empty then Market Cluster = "Not Identified". If not, the system goes to the next rule.
If End Use not equals to null/Empty then we use the end use mapping to get the Market Cluster for each specific End Use (using End_Use_Maping__mdt.). If not, the system goes to the next rule.
If End Use equals to null/Empty then Market Cluster = "Not Identified"
If the code reaches the last rule, create an app log twith the end use value o alert admins that an end use is missing from the metadata.
When the Account Manager ir creating the quote from CPC in the Market Segment Selection' screen (in the screenshot below), the system should
display the end use and market segment fields as read-only and pricing market as editable.
when the end use or market segment are empty,, all the fields end use, market segment and pricing market must be editable (but the values selected by the account manager will not be copied from the OLI into the CPC)
![Pricing Front End - 11240 > FD - [iCARe] Pricing Campaign > image2023-6-6_10-19-14.png](/download/attachments/758818308/image2023-6-6_10-19-14.png?version=1&modificationDate=1686050357093&api=v2)
Profile Object Permissions - only the Profiles meeting the following criteria should be able to Read Pricing Campaigns:
Profile.User License = Salesforce
Profile.Custom = TRUE
System Administrator, System Admin (Lite) and GBU Data Steward must have full permissions for this object (Read, Create, Edit, Delete, View All and Modify All).
All other Profiles meeting criteria 1 and 2 above should not have anything other than Read permission for this object (no Create, no Edit, no Delete, no View All, no Modify All).
Only Owner can see Pricing Campaign CPC records (Private object).
Grant Access Using Hierarchies = TRUE
no other Sharing Rules will be implemented
Profile Object Permissions - only the Profiles meeting the following criteria should be able to Read and Edit Pricing Campaigns:
Profile.User License = Salesforce
Profile.Custom = TRUE
System Administrator and GBU Data Steward must have full permissions for this object (Read, Create, Edit, Delete, View All and Modify All).
System Admin (Lite) Profile will have access to this object via the z__Object_Permissions_for_AdminLite Permission Set
adjust this permission set to grant Access to Pricing Campaign CPC (Read, Create, Edit, Delete, View All and Modify All).
All other Profiles meeting criteria 1 and 2 above should only have Read and Edit permission for this object (no Create, no Delete, no View All, no Modify All)
The data steward wants to monitor and identify which OLIs were created outside of the campaign, that can match with any CPC inside an active campaign, so he can link the OLI with the matching CPC.
It was created an automation in the system to identify and link Committed CPCs with matching quote line items (OLI), if the AM or KAM is not creating the quote from the Active Pricing Campaign.
To identify OLIs created outside of an active campaign and populate the CPCs with a matching OLI, the system should check for the following criteria:
1 - CPCs included within an active campaign (Quote Valid From (Internal Only) less or equal than today and Quote Valid To (Internal Only) greater or equal than today)
2 - With the status equals to Committed
3 - with the same Account, Product, Region and Currency
4 - with the same Account, Product, Region
The logic is 1 AND 2 AND 3
if no matches found in the logic above, run the logic 1 AND 2 AND 4
If a match is found between OLI and CPC, the field Pricing_Campaign_CPC__c in the Opportunity Line Item is updated with matching CPC ID.
The field Generated Opportunity Line Item in the OLI is updated with CPC ID.
The field Generated Opportunity Line Item in the CPC is not updated by this process.
Important Assumptions:
1 - Sometimes the currency in the CPC is not matching the currency in the OLI, that’s why the system evaluates the rule with and then without currency matching.
2 - Due to the final consignee at the OLI level, we can have multiple OLIs matching one CPC. In the CPC we don’t have the final consignee to add into the criteria for comparison.
If the system finds more than one OLI matching the CPC, we take one of the CPCs randomly.
The field OLI Matching Criteria in the Opportunity Line Item describes how the field Generated Opportunity Line Item was populated in the CPC:
if the quote was created from the campaign tool, the field contains 'CPC created inside an active campaign'
if the quote was created from the quotation tool and the system finds an OLI to match with the Committed CPC, the field contains 'CPC created outside an active campaign'
if the quote was created from the quotation tool and the system finds an OLI to match with the Committed CPC, the field contains CPC 'created outside an active campaign with currency mismatch'
if the system doesn't find any OLI to match with the committed CPC, the field contains 'no active OLI for this CPC'
The report CPCs with or without OLIs was provided to business for them to have this analysis consolidated.
![Pricing Front End - 11240 > FD - [iCARe] Pricing Campaign > image-20221123-133018.png](/download/attachments/758818308/image-20221123-133018.png?version=1&modificationDate=1686058907449&api=v2)
In the transparency dashboard, the OLI will be visible, regardless if the quote was created in the campaign tool or in the quotation tool
The story was moved to production with the following business agreements:
1 - the OLIs (products in the quote) and the CPCs can be linked in both ways
CPC contains a lookup field to the OLI
OLI contains a lookup to the CPC
Actually, when the quote is created from the campaign and the OLI is created from the CPC, the lookup fields are populated in both ways, in the OLI and CPC (is a one-to-one relationship between OLI and CPC).
In this Jira we implemented the rule OLI contains a lookup to the CPC when the quote is created outside the campaign and the OLI is created for the same account, product, region and currency but is not created based on the CPC information. The system is populating the lookup field in the OLI. with the CPC id, In the CPC, the lookup remains empty.
Why we did not implemented the link between CPC and OLI?
Due to the final consignee, we can have two active OLIs for 2 different final consignees that can match with one CPC. Since the CPC doesn’t have Final Consignee, we don’t know the rule to decide which is the correct OLI to assign to the CPC.
However, in the report tat will be provided to the business, for one CPC we will see all the OLIs that can match the CPC and, if needed, the CPCs can be mass uploaded to fill-in them with the correct OLI.
We need the rule to determine which is the correct OLI to link the CPC and implement the first point mentioned
2 - Since we are not populating the the CPC with the OLI, in the transparency dashboard nothing will change. The table used in the transparency is the CPC, and with this Jira we are not changing the CPC.
Jim (@James Flock) also highlighted that, if we link the CPC with an OLI created outside of the campaign, the price in that OLI is not the recommended price or the committed price that we have in the CPC.
When we will link the CPC with the OLI created outside of the campaign, we need to update the CPC with the Quote Price (after discount) listed in the OLI before send the information to the transparency dashboard. Otherwise, we will have misalignments.
When an OLI created outside the campaign is matching the CPC, the system needs to update the Committed Price on the CPC with the value in Quote Price (after discount) in the OLI.