/
Plasma Transactions Testing Steps

Plasma Transactions Testing Steps

Extractor

Unit Test Extractor Logic (optional)

In order to test the Extractor (Plasma_Data_Extractor) logic, make sure the configuration tables “Plasma_Transactions_Extractor_Mapping” and “Plasma_Config” are configured. If the feeder needs to be enabled, then uncomment two lines in the element “DataPartitionValue” (shown below). This will act as the feeder and inject the entity record. Replace the customerId value with the value to be tested.

//For Unit Testing Start// api.local.dataPartitionEntity = api.find("C", 0, Filter.equal("customerId","101090"))[0] return api.local.dataPartitionEntity //For Unit Testing End//

If the feeder entity is Product, then replace the typecode to “P” and field name to “sku”.

When testing the logic, “Generate Parameters” and enter Extractor name as “Transactions”. The results will be printed in the Data_Query element.

Test Extractor Data Load

In order to test the Extractor logic, make sure the configuration tables “Plasma_Transactions_Extractor_Mapping” and “Plasma_Config” are configured. There is no need to create a Data Load, as it comes in the repository. Select the “Plasma_Transactions” Data Load of the Calculation type with the target “DMDS.Plasma_TX”. Configure the feeder if needed. Run the Data Load and wait for it to complete. Then verify the results in the target data source “Plasma_TX”.

Check Extractor Audit Logs

(Check audit logs only from version 1.4 onwards, in version 1.3 a bug occurred)
Even when the Data Load is successful, there can be errors in the Extractor or some rows might be omitted for some reason. The audit logs can be found in the “Plasma_Audit” PP table and they provide date, status, message, additional info, and omitted rows if any. See an example:

Distiller

These steps do not need any configurations - each of them is executed from “Plasma_Transactions_SequenceControlTable” automatically. The points below are only for understanding how each of them works and how they can be triggered separately.

Distiller comprises of three steps:

  1. Calculation of previous prices
    Previous prices are calculated on top of the “Plasma_Transactions” Datamart. They are calculated per row. To run this step, open the “Plasma_Transactions_PreviousPrice” Data Load and select “Run now”. To test this, open PA logic “Plasma_Transactions_SequenceControlTable”, select DM Context, select “Plasma_Transactions” DM, select one row and execute.

  2. Currency Exchange Conversion
    This step converts the MONEY fields from source currency to “USD”. This is calculated per row. The currency exchange preferred source is “ccy” DS. If “ccy” DS does not have corresponding exchange rates, then “Plasma_Currencies” DS exchange rates will be used. To run this step, open the “Plasma_Transactions_Exchange” Data Load and select “Run now”. To test this, open PA logic “Plasma_Transactions_Exchange”, select DS Context, select “Plasma_TX” DS, select one row and execute. The element names are the fields of the target. Check the results on each element. PricingDate and Currency are mandatory in Plasma Transaction Extractor, so all the rows in Plasma_TX DS will have PricingDate and Currency.

  3. Creation of output data (rolled up monthly)
    This step is the heart of the Distiller – it rolls up the transaction data for each month, sellingFrom, sellingTo combination. To run it, open the “Plasma_Output_Creation” Data Load and select “Run now”. To test this, open PA logic “Plasma_Transactions_Creation” and execute.

  4. Enrichment of output data.
    This step populates the output data which needs more calculation. This is calculated per row. To run this, open the “Plasma_Output_Enrichment” Data Load and select “Run now”. To test this, open PA logic “Plasma_Transactions_Enrichment”, select DM Context, select “Plasma_Output_Transactions” DM, select one row and execute.

Other Steps

When all DLs run completely and successfully, you can check data in:

Plasma_Transactions DM:

  • Standard fields (required and not required)

  • PreviousLocalListPricePU

  • PreviousInvoicePricePU

  • PreviousNetPricePU

  • PreviousRealizedPricePU

  • PreviousMarginPU

  • PreviousPricingDate

  • InvoicePricePU

  • LocalListPricePU

  • NetPricePU

  • RealizedPricePU

  • MarginPU

  • DeltaLocalListPrice

  • DeltaInvoicePrice

  • DeltaNetPrice

  • DeltaRealizedPrice

  • DeltaMargin

  • ListPriceChangeCounter

  • ListPriceUpliftCounter

Plasma_Output_Transactions DM:

  • UniqueId

  • Dem_End_Deliverable_Type_Product

  • Dem_End_Deliverable_Type_Service

  • Dem_Year

  • Dem_Quarter

  • Dem_Month

  • Dem_Region_Selling_From

  • Dem_Region_Selling_To

  • Dem_Business_Unit

  • Total_Sales_HC_TTM

  • Total_Sales_HC_This_Month

  • Total_Sales_HC_TTM_Region

  • Total_Sales_HC_This_Month_Region

  • Total_Accounts_TTM

  • Total_Accounts_This_Month

  • Total_Accounts_TTM_Region

  • Total_Accounts_This_Month_Region

  • Total_Products_TTM

  • Total_Products_This_Month

  • Total_Products_TTM_Region

  • Total_Products_This_Month_Region

  • Number_Account_Negative_Margin

  • Number_Account_Positive_Margin

  • Number_Product_Negative_Margin

  • Number_Product_Positive_Margin

  • Total_Number_Transaction

  • Number_Transaction_Negative_Margin

  • Number_Transaction_Positive_Margin

  • Sum_Realized_Price

  • Number_Local_List_Price_Change

  • Number_Local_List_Price_Uplift

  • Number_Customers_10%..90%_Revenue_Decile

  • Number_Products_10%..90%_Revenue_Decile

Currency Exchange Conversion Test Scenarios

 

  • A conversion factor of 1 should be applied for all source rows whose currency is USD.

  • Test with the exchange rates present both in “ccy” DS and “Plasma_Currencies” DS. It should prioritize to pick from “ccy” DS.

  • Test with the exchange rates does not present in “ccy” DS but in “Plasma_Currencies” DS. It should pick from “Plasma_Currencies” DS.

  • If exchange rates are not available for a pricingdate/currency combination, all the money fields for such rows are not added in Plasma_Transactions DM. Then, the exception via Warning Manager is thrown in DL with Status = ERROR in Plasma_Transactions_SequenceControlTable PP at the 3rd Order.

  • Test the incremental load. It should only process the source rows which has lastUpdateDate greater than the incrementalLoadDate.

 

Related content

Plasma Quotes Testing Steps
Plasma Quotes Testing Steps
More like this
Plasma Transaction Processor Package Configuration
Plasma Transaction Processor Package Configuration
More like this
Plasma General Configuration
Plasma General Configuration
More like this
Plasma Transactions Technical Documentation
Plasma Transactions Technical Documentation
More like this
Plasma Data Extractor Feeder
Plasma Data Extractor Feeder
More like this
Plasma Quotes Technical Documentation
Plasma Quotes Technical Documentation
More like this