Versions Compared

Key

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

...

Logic API

  • Logic Nature: default

    • Logic Type: Calculation/Pricing

  • Execution Types:

    • Syntax Check Input Generation - to define the input fields.

    • Standard - to calculate the results (e.g., prices) and provide warnings and alerts.

  • Information provided to the logic:

    • Standard

      • sku in context - Only for objects with sku field (e.g. tables Products, Product Extension, Manual Pricelist)

      • input.Customer - Contains customerId. Only for objects with customerId field (e.g. tables Customer and CustomerExtension).

      • api.currentItem() - The data of row being enriched.

      • api.global - Contains data placed to api.global by the execution of this logic for the previous record (within one CFS calculation process).

      • Allow object modification - true. This process can update data in tables (e.g., via api.update()).

  • Expected logic execution outcome:

    • From Syntax Check Input Generation mode - input field definitions.

    • From Standard mode execution:

      • Result values of visible elements can be mapped to fields of the enriched object. If they’re mapped, then such result value will be stored in a field of the enriched record.

      • api.global - Data stored here will persist until the next execution of this logic for another record (within one CFS calculation process within one node).

...

Common Logic Structure

  1. Build input fields.

  2. Abort on syntax checkinput generation.

  3. Read the current field values of the record.

  4. Read the necessary data from any tables available.

  5. Calculate new values.

  6. Expose the values via visible elements.

...