Version | Date | Description | Author |
V1.0 | 22/03/2023 | Original version | Anton Solomin |
Description | Document Link |
Abbreviation | Definition |
CRM | Customer Relationship Management |
This is the documentation for the CORE's Pricing campaign module
The purpose of this document is to explain the purpose of system components, behavior and it's structure for the Pricing Campaign module.
<Include all actions performed by Users Or System that will trigger System Actions to run (Workflows, triggers, flows, assignment rules, approval processes, email notification, Account Locks, components), if the process is too complex to describe in one diagram only, you can split it by Feature, or Phase, ...
Something Similar to the screenshot below (for the Actions refer the type of solution implemented including the names, example: Action: Update Account is being done by system using Apex, For Apex implementation: include what is being done before Insert/Update after Insert/Update
<include rationale of the technical decision, for example, we are using 2 RT, why we need a first one, and a Second One>
![Pricing Front End - 11240 > TD - [core] Pricing Campaign > image2022-12-13_11-43-7.png](/download/attachments/822150697/image2022-12-13_11-43-7.png?version=1&modificationDate=1679332975963&api=v2)
It is agreed with the platform that Pricing Campaign CPC trigger is a 'heavy' object therefore we are not mixing flow triggers, process builders, workflows etc. with apex triggers. All related logic needs to be executed in the Apex trigger.
Context | Method | Description | |
|---|---|---|---|
Before insert | PP_Pricing_Campaign_CPC_Helper.doSetDuplicationRuleUniqueField | Set a duplication rule helper to prevent duplicate CPCs. | |
PP_Pricing_Campaign_CPC_Helper.doSetCommittedPrice | Set committed price & committed price in local currency. | ||
| PP_Pricing_Campaign_CPC_Helper.doSetAccountManagerReview | Set account manager review field. | ||
| PP_Pricing_Campaign_CPC_Helper.doSetShipToRegion | Find and set ship-to region. | ||
| PP_Pricing_Campaign_CPC_Helper.doCheckUtilities | Is the current user doesn't have bypass validation rules flag - validate utility lookups. | ||
| PP_Pricing_Campaign_CPC_Helper.doCheckRegionMarketPricing | Is the current user doesn't have bypass validation rules flag - validate RMPs lookups. | ||
| PP_Pricing_Campaign_CPC_Helper.doCheckIfProductIsAllowedOnQuote | Is the current user doesn't have bypass validation rules flag - validate whether the product is allowed on the quote. | ||
| PP_Pricing_Campaign_CPC_Helper.doPriceUpdate | |||
After insert | PP_Pricing_Campaign_CPC_Helper.doProcessQueue | Start a queueable method to update CPCs in an asynchronous manner to save the platform resources. This can only be used when updating the fields that we don't need to see immediately after update. | |
| doSetContractProduct | Set the contract product on the CPC. | ||
| doSetSoldToRegion | Set the sold to region on the CPC. | ||
| doSetFields | Set the owner, corporate sold-to, region-country-city and product level 2 fields on the CPC. | ||
| doSaveLogs | Save the results of the queueable transaction on error in SLV5_1_App_Log__c so that they can be inspected later. | ||
Before update | PP_Pricing_Campaign_CPC_Helper.doSetDuplicationRuleUniqueField | Set a duplication rule helper to prevent duplicate CPCs. | |
PP_Pricing_Campaign_CPC_Helper.doSetPriceSettingsUpdated | Set a flag that notifies the user that prices have changed. | ||
| PP_Pricing_Campaign_CPC_Helper.doSetCommittedPrice | Set committed price & committed price in local currency. | ||
| PP_Pricing_Campaign_CPC_Helper.doSetAccountManagerReview | Set account manager review field. | ||
| PP_Pricing_Campaign_CPC_Helper.doSetShipToRegion | Find and set ship-to region. | ||
| PP_Pricing_Campaign_CPC_Helper.doCheckUtilities | Is the current user doesn't have bypass validation rules flag - validate utility lookups. | ||
| PP_Pricing_Campaign_CPC_Helper.doCheckRegionMarketPricing | Is the current user doesn't have bypass validation rules flag - validate RMPs lookups. | ||
| PP_Pricing_Campaign_CPC_Helper.doCheckIfProductIsAllowedOnQuote | Is the current user doesn't have bypass validation rules flag - validate whether the product is allowed on the quote. | ||
| PP_Pricing_Campaign_CPC_Helper.doSetFields | Set the owner, corporate sold-to, region-country-city and product level 2 fields on the CPC. |
There's a number of LWC components that were created sometimes to extend the standard functionality and sometimes to accommodate completely custom logic not possible in standard. Here's an overview of LWC that are used in the Campaigns module:
| LWC Name | Nested | Nested | Description | Why not standard (description for not standard at the time of implementation) |
|---|---|---|---|---|
| customLookup | A custom lookup component that is used to let the user select a lookup field based on a given logic. Used in several places in the application. | There's a standard lookup component, but there's no way to filter and sort the results. | ||
| customSelect | A custom select component that is used to display to the user a given set of options. | There's not a standard picklist with a search functionality. | ||
| gen_dictionary | A resource to hold final front-end variables. | A collection of static strings. Not possible in standard. | ||
| pp_newOneQuoteBase | This is the base component for the CPC to Quote flow. | This flow requires functionality that is not possible in standard. | ||
| pp_newOneQuoteLineItemTable | A table that lets you select the CPCs that you want for a new Quote. | This is a standard data-table. | ||
| pp_newQuoteRecordForm | This is the Quote form for the CPC to Quote flow that lets you set the fields. | This is a standard form with some custom functionality. Not possible in a completely standard form. | ||
| pp_newExistingOneQuoteLineItemTable | A table that lets you select the One Quote Line Items from an Existing quote for a new Quote. | This is a standard data-table. | ||
| pp_pricingCampaignBase | This is the base component to present campaign's CPCs to the user. This is used on the flexipage for the pricing campaign. | This flow requires functionality that is not possible in standard. | ||
| pp_pricingCampaignReportRedirection | A component to display a link to redirect the user to the appropriate report. | A custom redirect hypertext. | ||
| pp_pricingCampaignFilters | This is a component that allows the user to filter through the CPCs to find the ones they need. Some values come preselected. When one value changes, all the other available values are updated. The CPCs with the applied filters are displayed below in the table. | No standard component available. | ||
| pp_pricingCampaignCurrencyBox | This is component to display to the user the currency conversion between different records. It uses some currency that are listed in the metadata that this LWC reads. | No standard component available. | ||
| searchPickList | Generic Custom Dropdown with Search LWC. | There's not a standard picklist with a search functionality. | ||
| pp_pricingCampaignRow | This is a base component that displays all the CPC related fields on a single table 'line'. | This flow requires functionality that is not possible in standard. | ||
| pp_pricingCampaignOutputField | This is a component that displays a field. | This is a standard field output with extended functionality. | ||
| pp_pricingCampaignConversionOutput | A way to display to the user converted currency. | There's not a standard picklist with a search functionality. | ||
| pp_pricingCampaignPagination | Custom pagination to improve usability of the page | No standard component available. | ||
| pp_pollQueueableResult | Poll results of the queueable job to process up to 200 OQLIs. | No standard component available. | ||
| pp_cpcRecommendedPriceUpdaterBase | Update multiple CPCs with recommended price | No standard component available. |
![Pricing Front End - 11240 > TD - [core] Pricing Campaign > New Quote button flow LWC structure.png](/download/attachments/822150697/New%20Quote%20button%20flow%20LWC%20structure.png?version=1&modificationDate=1679482625501&api=v2)
![Pricing Front End - 11240 > TD - [core] Pricing Campaign > image2023-3-22_12-52-23.png](/download/attachments/822150697/image2023-3-22_12-52-23.png?version=1&modificationDate=1679489543250&api=v2)
![Pricing Front End - 11240 > TD - [core] Pricing Campaign > image2023-3-22_12-52-42.png](/download/attachments/822150697/image2023-3-22_12-52-42.png?version=1&modificationDate=1679489562559&api=v2)
![Pricing Front End - 11240 > TD - [core] Pricing Campaign > image2023-3-22_12-52-59.png](/download/attachments/822150697/image2023-3-22_12-52-59.png?version=1&modificationDate=1679489579884&api=v2)
![Pricing Front End - 11240 > TD - [core] Pricing Campaign > Pricing campaign table LWC structure.png](/download/attachments/822150697/Pricing%20campaign%20table%20LWC%20structure.png?version=1&modificationDate=1679485051052&api=v2)
![Pricing Front End - 11240 > TD - [core] Pricing Campaign > image2023-3-22_12-51-59.png](/download/attachments/822150697/image2023-3-22_12-51-59.png?version=1&modificationDate=1679489519823&api=v2)
![Pricing Front End - 11240 > TD - [core] Pricing Campaign > Update With Recommended Price button flow LWC structure.png](/download/attachments/822150697/Update%20With%20Recommended%20Price%20button%20flow%20LWC%20structure.png?version=1&modificationDate=1679487717984&api=v2)
![Pricing Front End - 11240 > TD - [core] Pricing Campaign > Безымянный.png](/download/attachments/822150697/%D0%91%D0%B5%D0%B7%D1%8B%D0%BC%D1%8F%D0%BD%D0%BD%D1%8B%D0%B9.png?version=5&modificationDate=1679489422145&api=v2)
| Custom Permission | Description |
|---|---|
| PP_canRefreshCPCCustomSettings | Enables the user to refresh CPC price settings. |
| PP_canEditCampaignEndDate | Enables the user to edit campaign end date. |
| PP_abilityToMassCreateRMPs | Enables the user to see the button to mass create RMPs & volume brackets |
| Custom Permission | Description |
|---|---|
| PP_WideModalCss | CSS to display OQLIs table |
| API Name | Label | Where is it used | Description |
|---|---|---|---|
| PP_WideModalCss | CSS to display OQLIs table |