Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Expand
titleTable of Contents
Table of Contents
maxLevel3
stylenone
typelist

You’re using Pricelist logic Price list logics are used when you need to:

  • build Build input field definitions for the a price list.

  • calculate Calculate results of the for price list items

...

  • .

Logic Selection

When a pricelist price list item is about to be calculated, the engine will select the selects a logic based on certain criteria. Besides the standard things, like factors (if the logic is active and valid for a target date), there are also the following rules, which logic will be used (. (If more logics satisfy the criteria, the first one available will be is used.)

  1. product Product specific logic

    • if If the product has a logic defined (in the Product table), this one will be it is used. Using of this type of logic can be switched off by advanced configuration option doNotUsePerProductFormulasInLists

    logic selected in Pricelist definition.
  2. Logic selected in the price list definition

    • This logic can be pre-filled from the PricelistType Price List Type (if it was used by user),.

    • but could It can be also set by a user.

  3. default Pricelist Default price list logic

    default
  4. Default generic logic

Logic API

  • Logic Nature: default

    • Logic Type: Calculation/Pricing

  • Execution Types:

    • Syntax Check - to define – Defines the input fields for the Pricelist price list (i.e. NOT on the item).

    • Standard - to calculate – Calculates the results (e.g. prices) and provide provides warnings and alerts for each item.

  • Information provided to the logic:

    • in In the Syntax Check mode:

      • sku SKU in the logic context

    • in In the Standard mode:

      • sku SKU in the logic context

      • values Values of all inputs provided by the user

      • currentItem CurrentItem has PricelistItem, but only in the 2nd (and next) passes of the multi-pass calculation. I.e. in normal calculation, it will have nothingnot contain it.

      • api.global - contains – Contains data placed to api.global by previous execution of this logic for the another line (within one pricelist price list calculation process).

  • Expected logic execution outcome:

    • from From Syntax Check mode - input :

      • Input field definitions

    • from From Standard mode execution:

      • result Result values (and formatting) of the visible logic elements will be copied by the system to the attributeX fields of the PricelistItem.

      • api.global - data – Data stored here will persist until the next execution of this logic for another line (within one pricelist price list calculation process within one node).

Common Logic Structure

  1. build Build input field definitions.

  2. abort Abort on syntax check.

  3. calculate the Calculate prices and other values.

Mapping of

logic results to Pricelist

Logic Results to Price List Item (PLI)

When the item logic finishes the calculation, the element results of the elements are mapped and copied to the PLI.

To be able to use the logic result on the PLI:

  • the The logic element must have Display Mode set to Everywhere (or to Pricelist Price List).

Output Elements Mapped to Attribute# Fields

  • the The business user selects which visible elements they want to map to PLI - when creating the Pricelist on the New Price list Definition dialog on a new price list (step Parameters, in part section Output Elements).

  • if If you need to enforce that certain elements to be are always mapped (i.e. so the user cannot unselect them), use the advanced configuration option mandatoryPLElementsThe mapping Advanced Configuration Option mandatoryPLElements.

  • Mapping of selected element results to the PLI’s PLI attribute# fields is done automatically, but if you need, you can set specific elements to be mapped to specific attributes - see advanced configuration option calculableObjectPreferredMapping– see Advanced Configuration Option calculableObjectPreferredMapping.

Special Logic Results Mapping

On In the dialog New Price List Definition , step dialog in the Set Parameters step, the user can also specify , which element result will end up in PLI’s fields:

  • calculatedResultPrice - setting Result Price

  • unitOfMeasure - setting Dynamic UOM

  • currency - setting Dynamic currency