Live Preview (Strategy Designer)

The Live Preview function allows you to see the calculated results of your strategy or data lookup in real-time. It also provides useful validation messages in case your workspace is not properly configured. The panel with the Live Preview is located on the right side of the user interface. By default, it is hidden, and you have to expand it by clicking on the arrow button.

 

You can switch between the Preview and Code tabs:

  • Preview – Allows you to perform a simulation of the current strategy.

  • Code – Shows the code generated by the strategy. This tab is for development and debugging purposes only. Business users should not pay much attention to it.

The Preview panel is divided into three main parts:

Inputs

This section contains the inputs required to run the simulation. Some inputs are generated only if the strategy requires them.

  • Product ID – Select a product to simulate the strategy with. Required input, although some strategies and data lookups might not need it.

  • Dependency Level – Select the dependency level to simulate the strategy with. Only independent levels are supported at the moment.

  • Target Date – Select a target date to simulate the strategy with. If not specified, today’s date will be used.

The following inputs are only generated if certain blocks are present in the workspace:

  • Simulated price from the current list – Required if the Get price from the current list block is in the workspace. Because this block triggers a second-pass calculation, it cannot be simulated easily. The value from this input will be used for the simulation of this block’s value.

  • Simulated kit price – Required if the Calculate kit price block is in the workspace. Calculating the kit price also requires a second-pass calculation so we simulate it instead in the live preview.

To calculate the strategy, click the Calculate button. The button will be enabled only if all the required inputs are filled. Once filled, the strategy will be automatically recalculated when the workspace changes.

Result

Shows the calculated result price of the strategy. The price is always rounded to two decimal digits. Hover your mouse over the price to see the non-rounded price.

Intermediate Results

Shows multiple tables with calculated results of each block in the workspace, such as variables, product attributes, PSP attributes, and data lookups. This gives you the possibility to debug your strategy in real-time.

Validation

If the workspace is not properly configured, the Live Preview panel will show validation errors instead of results. In such a case, you will not be able to see the simulated price or the code until you fix the errors.

You can click the eye icon to highlight the offending block in the workspace.