Versions Compared

Key

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

...

  • Binding variables provided to the logic:

    • api – Provides access to the instance of PublicGroovyAPI to be able to perform various operations within Pricefx.

    • out – Access to resulta of previous elements within the same logic.

    • libs – Access to Groovy libraries.

    • inputs – Values provided by the user.

  • Accessible via PublicGroovyAPI:

    • api.global – Access to data which survive across multi-item calculations.

    • api.targetDate() – Date for which we perform the calculation. This date determines which version of logic will be used, and has impact on selection of table versions to be used – e.g. which Company Parameters will be looked up. This target date is always available, but its value depends on the actual use case, for example, for quotes it contains an Effective Date, i.e. the first date of validity of the quote.

    • api.product(“sku”) – ID of a product which is currently calculated. This is used only in certain executions, for example for pricelist item calculation, quote item calculation, etc.

    • api.currentItem() – In “item” logics, it is commonly used to provide content of the object being calculated, but in some executions it is also used to provide metadata information; some other executions might not get the information at all.

    • api.isInputGenerationExecution() (isSyntaxCheck before version 10.0) – Flag defining if the execution is of this special type “input generation”. Used only for some types of logics, commonly to provide information that the logic is now expected to build input fields definitions.

    • api.isDebugMode() – Flag defining if the execution is performed in a testing mode – e.g. typically from Pricefx Studio. This information is commonly used to mock input values from the user which are not available during the test mode, but would be available in a real execution.

    • api.getDatamartContext() – Access to an object which allows to perform queries to Analytics tables.