Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You’re using Pricegrid logic Price Grid logic is used when you need to:

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

  • calculate Calculate results of the for price grid items.

Logic API

  • Logic Nature: default

    • Logic Type: Calculation/Pricing

  • Execution Types:

    • Syntax Check - to define the – Defines input fields for the Pricegrid a price grid (i.e. NOT on the itemfor items).

    • 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

      • input - values – Values of all inputs provided by the user. Or values passed into the calculation , when it’s it is executed from Calculation Flow, via the method withFormulaParameters().

      • api.currentItem() has PricegridItem - in – In this case, unlike the case of Pricelistwith a price list, the current item is available all the time , because the item is already created already before the logic is executed.

      • api.global - contains – Contains data placed to api.global by the previous execution of this logic for the another line (within one pricegrid price grid 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 PricegridItem.

      • api.global - data – Data stored here will persist until the next execution of this logic for another line (within one pricegrid price grid 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.