Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 53 Current »

Within a Pricefx source directory (package), logics reside in the CalculationLogic and WorkflowFormula directories. Each logic consists of a few script files and metadata.

logic structure

Logic Properties

Metadata for logics are defined by the logic.json file. There are three mandatory properties: uniqueName, validAfter, and status.

uniqueName

Used to reference logics

validAfter

Used to schedule releases

status

Used to activate and deactivate logics

These three properties make up a composite primary key.

Logic Element Properties

The logic.json file also contains a property elements. This property is an array of objects, where each object references one script inside the elements/ directory. These scripts — together with the associated metadata — make up an element.

 Example logic.json
{
  "uniqueName" : "MyLogic",
  "validAfter" : "2021-09-28",
  "status" : "ACTIVE",
  "elements" : [ {
    "elementName" : "Cost",
    ...
  }, {
    "elementName" : "Markup",
    ...
  }, {
    "elementName" : "ListPrice",
    ...
  }, {
    "elementName" : "Margin",
    ...
  } ]
}

There are many other valid properties in the logic.json file. Price Studio helps you to maintain a valid structure by providing a visual editor.

logic json ui
 Example logic.json
{
  "elements" : [ {
    "allowOverride" : false,
    "combinationType" : "FUNCTION",
    "displayOptions" : 0,
    "elementGroups" : [ ],
    "elementName" : "GenerateInputs",
    "elementTimeout" : 0,
    "hideOnNull" : false,
    "hideWarnings" : false,
    "summarize" : false
  }, {
    "allowOverride" : false,
    "combinationType" : "FUNCTION",
    "displayOptions" : 0,
    "elementGroups" : [ ],
    "elementName" : "CalculateResults",
    "elementTimeout" : 1000,
    "hideOnNull" : false,
    "hideWarnings" : true,
    "summarize" : false
  }, {
    "allowOverride" : false,
    "combinationType" : "FUNCTION",
    "displayOptions" : 16,
    "elementGroups" : [ ],
    "elementLabel" : "Currency",
    "elementName" : "Currency",
    "elementTimeout" : 0,
    "formatType" : "TEXT",
    "hideOnNull" : false,
    "hideWarnings" : false,
    "summarize" : false
  }, {
    "allowOverride" : false,
    "combinationType" : "FUNCTION",
    "displayOptions" : 16,
    "elementGroups" : [ ],
    "elementLabel" : "Markup (%)",
    "elementName" : "MarkupPct",
    "elementTimeout" : 0,
    "formatType" : "PERCENT",
    "hideOnNull" : false,
    "hideWarnings" : false,
    "summarize" : false
  }, {
    "allowOverride" : false,
    "combinationType" : "FUNCTION",
    "displayOptions" : 16,
    "elementGroups" : [ ],
    "elementLabel" : "Markup",
    "elementName" : "MarkupAbs",
    "elementSuffix" : "Currency",
    "elementTimeout" : 0,
    "formatType" : "MONEY",
    "hideOnNull" : false,
    "hideWarnings" : false,
    "summarize" : false
  }, {
    "allowOverride" : false,
    "combinationType" : "FUNCTION",
    "displayOptions" : 16,
    "elementGroups" : [ ],
    "elementLabel" : "List Price",
    "elementName" : "ListPrice",
    "elementSuffix" : "Currency",
    "elementTimeout" : 0,
    "formatType" : "MONEY",
    "hideOnNull" : false,
    "hideWarnings" : false,
    "summarize" : false
  } ],
  "status" : "ACTIVE",
  "uniqueName" : "Example_Logic",
  "validAfter" : "2000-01-01"
}
element properties
  • No labels