Results Step (Optimization - Negotiation Guidance)

This step first optimizes the segments and the transactions in the scope of the model. The optimization is composed of two parts: the first one, optional, is the alignments of the segments; in the second part, the floor, target, and ceiling percentile values are applied to the source data to simulate the optimization strategy on the historical data. Once the calculations have run, six tabs are displayed. They provide different views on the optimization results. Last, but not least, two evaluations are available: they are ways to use the optimization results from any other part of the partition, such as Quotes, Price Lists etc.

Alignment and Optimization Calculations

When you arrive at the Results step from the Segmentation step, the model first runs the alignments of the segments, then the optimization calculation of each segment. It may take some minutes, depending on the size of the model. It is a sequence of six calculations, so the interface may display an advancement of n over six (it may be less, at the beginning of the process, or if no alignments are set).

First, an Optimization Engine is triggered, then change of the optimization target values (margin rate or discount rate) in order for some segments to be aligned with the gap defined previously. Then, the percentile values entered as the floor, target, and ceiling, are applied to the aligned optimization target values in each segment, with the defined strategy coefficients. Refer Segmentation Step (Optimization - Negotiation Guidance) | Selection Alignments and Segmentation Step (Optimization - Negotiation Guidance) | Optimization Setup for more details.

Impact Tab

This dashboard displays the optimization result for the strategy floor-target-ceiling. Refer to the paragraph Segmentation Step (Optimization - Negotiation Guidance) | How the Percentile Values Are Used? for more explanations.

The left panel allows you to choose the granularity of the bar charts and the overall realization dashboard.

  • Segmentation level – All the transactions of the scope are aggregated at this level to provide the bar charts of the projected revenue and profit. The global overview and the profit potential matrix are not impacted by this input value.

  • Overall Realization % – The optimization strategy is the best to have. You can simulate with this input the fact that only a certain percentage of the optimization target is reached. The value must be between 0 and 100 and will impact all the dashboard portlets.

Tree View

This view is the same as Segmentation Step (Optimization - Negotiation Guidance) | Tree View but now more results are provided when clicking on a segment. The Price Recommendation section provides the score, target percentile, values of the optimization metric for the given percentiles, and projections of metrics based on the optimization strategy defined in the previous paragraph.

Tree view and Price Recommendation section for the segment S000042, after the optimization calculation.

Note: Floor, target and ceiling displayed here use the alignment if any is defined.

There is also a new chart, to compare the historical values and the optimized ones: Aggregated Distribution:

 

image-20240913-124350.png
Example of Aggregated Distribution chart

 

Recommendations Tab

Recommendations and Metrics per Segment

This portlet provides the segments table with all the optimized values for each segment. In particular, the optimization values are provided for the revenue, quantity, and optimization metric.

List of the fields:

Field name

Description

Alignment impact of the values

Field name

Description

Alignment impact of the values

Name and the levels of segmentation

Define each segment.

No impact of the segments definition.

#Transactions, #Products, #Customers

Number of distinct transactions, products, and customers inside the segment.

No impact

SSE

Sum of squared errors in the segment, based on a hypothesis of a constant value of the optimization metric.

It is calculated before the alignments. Alignments should not impact it.

Divergence to normal distribution

Measures the difference between a perfectly normal distribution and the actual distribution of the target metric in the segment. The smaller the value, the more the segment distribution is close to a normal distribution.

It is calculated before the alignments. Alignments should not impact it.

CoV or Weighted CoV

Coefficient of variation of the optimization metric, depending on the use or not of a Weight field, i.e. the standard deviation divided by the average.

It is calculated before the alignments. Alignments should not impact it.

Target std or Weighted Target std

 

The standard deviation of the target metric.

It is calculated before the alignments. Alignments should not impact it.

Initial Target avg or Weighted Target avg

 

The average of the target metric.

It is calculated before the alignments.

Target avg

The average of the target metric after the alignements.

It is calculated after the alignments.

Revenue

Sum of the transactions revenues in the segment.

It is calculated before the alignments.

List price

Sum of the extended list prices in the segment (provided if the optimization target is set to Discount% only).

It is a fixed value during the alignments, same value before and after.

Margin

Sum of the transaction margins in the segment.

It is calculated before the alignments.

Margin Rate

Division of Revenue by Margin.

It is calculated before the alignments.

Quantity

Sum of the quantities revenues in the segment.

It is a fixed value during the alignments, same value before and after.

Parenting Level

Number of levels from the segment to the leaves of the segmentation tree.

No impact

Scoring Method and Score

Explained in Segmentation Step (Optimization - Negotiation Guidance) | Score Calculation.

No impact. The score is either fixed, depending on two parameters, or depending on the CoV.

Floor Percentile, Target Percentile, Ceiling Percentile

Explained in Segmentation Step (Optimization - Negotiation Guidance) | How the Percentile Values Are Used?.

No impact. They are either fixed or depending on the score value.

Initial Floor, Inital Target, Initial Ceiling

Values of the optimization metric before alignments

They are calculated before the alignments.

Floor, Target, Ceiling

Values of the optimization metric for each of the defined percentiles.

They are calculated after the alignments.

Price Δ%, Margin% Δ, Target Metric Δ, Target Metric Δ%

Deltas between the actual values and the ones that you would have if you used the optimizations rules to the floor/target percentiles.

Based on the optimization rules and percentiles before the alignments. Those deltas do not take the alignments into account.

Elasticity Parameters

Parameters of the elasticity curve fitted on the segment, in a JSON format, to make it usable by another piece of code outside of the model.

Fitted before the alignments.

Optimal Target Metric, Optimal Target Metric For Revenue, and Optimal Target Metric For Profit

Values that maximize the profit or revenue curves built using the elasticity formula. The global optimal target value is a pondered average of the profit optimum (2/3) and the revenue one (1/3).

These values are based on the elasticity parameters, so before the alignments.

Then many metrics are projected, based on these optimal target metrics, and the deltas between the actual values and the optimized ones are also presented: quantity, margin, revenue.

These values are based on the optimal target metrics, so before the alignments.

Dimension Alignment Portlets

For each dimension alignment set in the calculation, a corresponding portlet is displayed. They are tables where a row is an alignment rule. The current, requested, and achieved gaps are provided. It is a global view to check if the requested gaps were reached, or how far the optimized results are for the requests.

Evaluation Tab

This tab simulates a call of the query_segment evaluation of the model, which can be called from any other part of the partition (such as price lists or quotes). The goal is mainly for an advanced user to test the logics, or to see what the inputs and outputs of the model evaluation are.

Alignment Review tab

In this dashboard, a boxplot chart is displayed for each alignment set in the optimization.

 

Each value of the dimension displays two boxes: one for the current values (before alignment, in light grey) and one for the optimized ones (after alignment). Each box represents a summary of the optimization target values corresponding to the given dimension value. On the chart above, for instance: the summary of all the discount rates in the scope of the model, where the Customer Type value is, for instance, Distributor. We can see in this example that to reach the requested alignments, the Distributor discounts globally increased and the Industry discounts globally decreased.

The last chart, Comparison between Current and Optimal, displays a sample of product-customer pairs and their optimization target variation due to the alignment work. It is the only portlet of the dashboard affected by the set of left panel user entries. At most 100 product-customer pairs are displayed: the most impacted ones. The horizontal bars show the range of the change.

Glassbox Tab

This tab is a set of advanced charts to understand how the optimization engine works. It is for mostly for advanced users. Refer to Glassbox Dashboards for more details.

Still, it is interesting to check quickly how good the alignments are satisfied, from current situation to the recommendations. In this example, all alignments are satisfied or at least acceptable (meaning getting close to the alignment that has been defined)

 

Model Evaluation from Another Part of the Solution

If you need to call the model evaluation from any Pricefx module, two different evaluations are available: query_segment and batch_query. The general way to query a model is explained in Query Optimization Engine Results | Using the Evaluator.

Query Segment

The user provides the segmentation levels and gets all the outputs corresponding to this specific segment. It is useful and quick to get the optimization values for one specific set of data. The command is:

def model = api.model("TheModelUniqueName") def results = model.evaluate( “query_segment”, [ segmentationLevel1: "someValue", // keys depend on the segmentation //... ]).results def target = results['Target'] // or any other output

Batch Evaluation

It is a way to get a large bunch of optimization results in one command. The user provides an input query and a fields mapping and the evaluation returns a SQL query. It is an advanced feature, that provides a quick result for a large bunch of data in one command. The usage is:

def dmCtx = api.getDatamartContext() DatamartContext.Query myQuery = dmCtx.newQuery(dmCtx.getFieldCollection("DM.myDM")) .selectAll(true) .where(Filter.equal("Country", "France")) DatamartContext.SqlQuery batchSqlQuery = api.model("myNegotionGuidanceModel").evaluate( "batch_query", [ sourceQuery: myQuery, mapping: [ quantity: 'myQuantityField', optimization_target: 'marginPct', segmentationLevels: ['productFamily', 'channel', 'country'], otherFields: ['product', 'customer_id'], ] ] )['AsBatchQuery'] api.getDatamartContext().executeSqlQuery(batchSqlQuery)

This model evaluation can be called from any place of Pricefx, based on an existing model that has run. The inputs are:

  • Query that fetches data to evaluate from a Negotiation Guidance point of view.

  • Some mapping information to detect which fields are the quantity, the elasticity based-on variable, the segmentation levels, and the fields to output. The order of the segmentation levels is important. The required keys of the mapping map are quantity, optimization_target, segmentationLevels, otherFields.

The output is an SQL query that can be executed to get, for each row of the executed input query:

  • All the fields defined in the mapping argument.

  • name – The name of the associated segment.

  • Some NG results relative to the segment, corresponding to the elasticity and the optimization thresholds: ElasticityParameters, elasticity, normalization_coefficient, target_avg, weighted_target_avg, target_std, weighted_target_std, floor_value, target_value, ceiling_value (if the names have not been changed in NG_Lib.ParametersLib).

Note: this batch evaluation requires a datamart (or data source or a model table) as an input, this is mandatory how the way this function works, in doubts, you should use the datamart that is defined in the first step of this Negotiation Guidance model.