...
Logic API
Logic Nature: default
Logic Type: Calculation/Pricing
Execution Types:
Syntax Check - to define the input fields for the Pricelist (i.e. NOT on the item)
Standard - to calculate the results (e.g. prices) and provide warnings and alerts for each item
Information provided to the logic
in the Syntax Check mode
sku in the logic context
in the Standard mode
sku in the logic context
values of all inputs provided by the user
currentItem has PricelistItem, but only in the 2nd (and next) passes of the multi-pass calculation. I.e. in normal calculation, it will have nothing.
api.global
- contains data placed to api.global by previous execution of this logic for the another line (within one pricelist calculation process)
Expected logic execution outcome
from Syntax Check mode - input field definitions
from Standard mode execution -
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 stored here will persist until next execution of this logic for another line (within one pricelist calculation process within one node)
Common Logic Structure
build input field definitions
abort on syntax check
calculate the prices and other values
...