Plasma Quote Processor Package Configuration
The below listed chapters represent steps which need to be followed in the given order.
- 1 1. General Setting
- 2 2. Plasma_Quotes_Extractor_Mapping Configuration
- 3 2. Plasma_Config Configuration
- 4 3. Plasma_Quotes_Enrichment_Mapping Configuration
- 5 4. Feeder Configuration
- 6 5. Bound Partition Creation
- 7 6. Currency Exchange Rates
- 8 7. Distiller
- 9 8. Calculation Flows
- 10 9. Advanced Configuration of Plasma_Quotes_Extractor_Mapping
- 11 10. Exceptions
- 12 11. Additional Configuration
1. General Setting
Make sure the following PP tables include data:
Plasma_Country_Region_Mapping
Plasma_OperatorMapping
Plasma_Quotes_Enrichment_Fields
Plasma_Quotes_SequenceControlTable
Plasma_Config
2. Plasma_Quotes_Extractor_Mapping Configuration
The PP table description: https://pricefx.atlassian.net/wiki/spaces/ACCDEV/pages/3769499743/Plasma+Configuation+Tables#Plasma_Quotes_Extractor_Mapping.
Adjust the quote extractor mapping PP table Plasma_Quotes_Extractor_Mapping (optionally).
After the deployment, the Plasma_Quotes_Extractor_Mapping table will be filled with default basic mappings as shown below:
If needed, adjust manually the mappings, specifying Mapping Field, Expression and Extract Level (which defines from which quote level the data field value should be extracted).
To see the advanced options, see the Advanced Configuration of the Plasma_Quotes_Extractor_Mapping chapter below.
2. Plasma_Config Configuration
The PP table description: Plasma Configuration Tables | Plasma_Config.
Plasma_Config general configuration description: https://pricefx.atlassian.net/wiki/spaces/ACCDEV/pages/3842736231/Plasma+General+Configuration#Plasma_Config.
3. Plasma_Quotes_Enrichment_Mapping Configuration
This step is optional and only needed when any additional information needs to be extracted from source other than Quotes. The typical use case is when you do not have the input/output Selling From and Selling To in Quotes and these fields are required in the Plasma_Quotes_Enrichment_Fields PP.
Follow the instructions at https://pricefx.atlassian.net/wiki/spaces/ACCDEV/pages/3769499743/Plasma+Configuration+Tables#Plasma_Quotes_Enrichment_Mapping, using Plasma_Quotes_Enrichment_Mapping PP table with the possible Target Fields values taken from Plasma_Quotes_Enrichment_Fields PP table.
Primary Source and Target will always be the “Plasma_Quotes” DS and mapping should be done for all the target fields.
Extractor name will be “Quotes”.
Example:
4. Feeder Configuration
Description of general Feeder configuration: https://pricefx.atlassian.net/wiki/spaces/ACCDEV/pages/3842736231/Plasma+General+Configuration#Feeder.
The purpose and steps are similar to Plasma Transaction Processor Package Configuration | 4. Feeder Configuration and only used when you configure Plasma_Quotes_Enrichment_Mapping CP in Plasma Quote Processor Package Configuration | 3. Plasma_Quotes_Enrichment_Mapping Configuration.
Open the Data Load “Plasma Quotes Enrichment” of the ‘Calculation’ type.
Go to the “4 Calculation” tab.
Select “Plasma_Data_Extractor_Feeder” as the calculation logic for the Feeder and select the entity (either Product or Customer). The Feeder will inject all the rows from the master table. It can be configured to inject only selected IDs by specifying in the SKUs/CustomerIds input field. In order to use the Feeder, the corresponding master table should be joined in the Plasma_Quotes_Extractor_Mapping table, otherwise it will not work.
4. Configure the Plasma_Config PP table: set the DataPartitionedForLoad field to “Y” and specify the Feeder entity under the FeederEntityFieldInPrimarySource PP (typically CustomerId).
Notes:
To deactivate the Feeder do the opposite.
It is recommended to keep the Feeder activated (or ask for increasing the Maximum In-Memory Count parameter to an appropriate value).
5. Bound Partition Creation
Follow the instructions in the Plasma general configuration page: https://pricefx.atlassian.net/wiki/spaces/ACCDEV/pages/3842736231/Plasma+General+Configuration#Bound-Partition-Creation.
6. Currency Exchange Rates
Follow the instructions in the Plasma general configuration page: https://pricefx.atlassian.net/wiki/spaces/ACCDEV/pages/3842736231/Plasma+General+Configuration#Currency-Exchange-Rates.
To run this step, open the “Plasma_Quotes_Exchange” Data Load and select “Run now”. To test this, open PA logic “Plasma_Quotes_Exchange”, select DS Context, select the “Plasma_Quotes” DS, select one row and execute.
7. Distiller
Distiller creates the output data (rolled up monthly) and does not need any configuration.
It rolls up the quotes data for each month, all sellingFrom/sellingTo combinations.
To run it, open the “Plasma Output Quotes Load” Data Load and select “Run now”. To test this, open PA logic “Plasma_Quotes” and execute.
8. Calculation Flows
Deploy the Calculation Flows “Plasma_Quotes_Sequencer” and “Plasma_Quotes_Sequencer_Reset“ to be active.
Click “Deploy” for both “Plasma_Quotes_Sequencer” and “Plasma_Quotes_Sequencer_Reset”.
This starts the sequencing of all the Data Loads (Quote Extractor and Distiller). The progress can be seen in the “Plasma_Quotes_SequenceControlTable” configuration table shown below:
The Plasma_Quotes_SequenceControlTable works like this: When the status is empty, it processes every row in the order provided. Once the process is completed for that row, its status changes to DONE and it starts processing the next row. If any row fails, its status changes to ERROR and the processing stops. If that row needs to be reprocessed, manually update the status to empty. If the full sequence needs to be reprocessed, manually update the status of all rows to empty.
9. Advanced Configuration of Plasma_Quotes_Extractor_Mapping
The extractor needs a string or map which defines what to get from which level. If a level is not specified, the extractor will search for all levels by the configured order ["Q","QLI","QLI_INPUT","QLI_OUTPUT", "W"] and will return the first found.
Below is a description of how the values for the particular fields can be specified.
Expression
Specifies the key to get data in a map-like structure (Q, QLI, W).
Key
Predefined keys for the Workflow level:
ApprovedDateTime – Date time of the last approved step
SubmittedDateTime – Submitted date time
DeniedDateTime – Denied date time
DenyStep – Name of the denied step
ApprovedSteps – List of approved steps
DeniedSteps – List of denied steps
ApprovalSteps – List of approval steps
NumberOfApprovalSteps – Number of approval steps
ApprovalProcessing – Shows if the workflow is processed or not (Boolean)
Predefined keys for the Quote level:
ConvertedToDealDateTime – When a quote was converted to deal.
MarkedAsLostDateTime – When a quote was marked as lost.
RevokedDateTime – When a quote was revoked.
NeedApproval – Shows if a quote needs an approval or not (Boolean).
Dot Expression (.)
Specifies the sub-key to find in a multiple level map structure.
def mapping = [
submitDateTime:[expression:"activeStep.stepHistory.date",level:"W"], /* get date from Workflow :[
activeStep:[
stepHistory:[date:"01-01-2014"],
...
],
...
] */
....
]
Multiple Keys Searching
Specifies multiple keys to try, the first found is returned.
def mapping = [
quantity:[[expression:"quantity",level:"QLI_INPUT"],[expression:"Quote Quantity",level:"QLI_INPUT"]], //get quantity or "Quote Quantity" from Quote lineitem input
....
]
Brackets Expression
Specifies a search formula (evaluated using the FormularEvaluator library) or an index to get data in a list structure or using the last/first keyword (to get the last item / first item in a list).
def mapping = [
submitDateTime1:[expression:"activeStep.stepHistory.history.[0].date",level:"W"], //get date of first history from workflow
submitDateTime:[expression:"activeStep.stepHistory.history.[status=='INITIALIZED'].[0].date",level:"W"], /* get date from Workflow :[
activeStep:[
stepHistory:[
[status:"INITIALIZED",date:"01-01-2014"],
[status:"SUBMITTED",date:"01-01-2014"],
...
],
...
],
...
] where status is INITIALIZED */
....
]
Configuration Type: Calculation
Returns the calculated value from an expression using the FormularEvaluator library. The calculation type is calculated after all data are extracted from the quotes.
String
A mapping can be specified as mapping as a String. The extractor will use the string as a key to search for all levels, the first found is then returned.
10. Exceptions
Mapping Change
If Plasma_Quotes_Extractor_Mapping changes (the values set there are different to those which were present during the previous run of Plasma Data Loads) while the incremental mode is active, then:
The below listed DataSources/Datamarts need to be truncated:
Plasma_Quotes DS
Plasma_Quotes DM
Plasma_Output_Quotes DM
The last incremental load date in every respective Data Loads needs to be reset (set to null):
Plasma_Quotes_Extractor
Plasma_Quotes_Enrichment
Plasma_Quotes_Exchange
Plasma_Output_Quotes_Load
If Plasma_Quotes_Enrichment_Mapping changes (the values set there are different to those which were present during the previous run of Plasma Data Loads) while the incremental mode is active, then:
The last incremental load date in every respective Data Loads needs to be reset (set to null):
Plasma_Quotes_Enrichment
This way it is guaranteed that there is no data inconsistency in the Data Sources and all the included data meet the criteria specified in the PP tables.
11. Additional Configuration
Follow the instructions in the Plasma general configuration: https://pricefx.atlassian.net/wiki/spaces/ACCDEV/pages/3842736231/Plasma+General+Configuration#Additional-Configuration.