Configuration Package

Configuration Package is a set of folders and files, which represent the configuration of the partition. The configuration package contains Logics and their groovy code, definitions of tables and their fields, etc.

This package structure is used across several Pricefx tools, which deal with partition configuration - Studio, Packaging Tool and Platform Manager.

The Design Principles as described at the end of the article.

Structure

Below is the complete structure of folders and files, which can be found in the Configuration Package.

Legend: Names are constant or use brackets from Utility Conventions: square brackets [optional], angle brackets <required>, curly brackets {default values}, parenthesis (miscellaneous info).

AdvancedConfiguration <key>.txt CalculatedFieldSet <label>[+<targetDate.format("yyyy-MM-dd")>].json CalculationFlow <uniqueName>+<Draft|Deployed>.json CalculationLogic <uniqueName>+<validAfter.format("yyyy-MM-dd")>[+<simulationSet>] elements (directory) elem1.groovy (.groovy files for groovy FUNCTION expressions) elem2.formula (formula expression) logic.json (entity JSON with formula expression) ContractTermType [<uniqueName>.json] ContractTermTypeAttribute [attribute1-30.json] [formulaName.json] [label.json] [waterfallElement.json] CustomerAttribute [attribute1-30.json] [customerId.json] [isParent.json] [name.json] [parentId.json] CustomerExtension <label> attributes (directory) [<attributeName>.json] extension.json Dashboard <uniqueName>.json DataLoad <target>+<type>+<label> dataload.json schedules.csv DataMart <uniqueName> fields <customAttribute>.json <systemAuxilaryAttribute>.json datamart.json ranks.csv DataSource <uniqueName> fields <customAttribute>.json <systemAuxilaryAttribute>.json source.json ranks.csv MessageTemplate [languagesForMsgTemplates.json] [<templateKey>_<locale>.html] [<templateKey>_<locale>.txt] Preference <preferenceType> <preferenceName>.json PriceRecordAttribute [<attributeName>.json] PricingParameter <uniqueName>+<validAfter.format("yyyy-MM-dd")>[+<simulationSet>] parameter.json (entity JSON) matrix (directory of matrix column definitions) <field>.json (matrix field definitions) data_simple.csv (data of simple type, requires -withData option) data_range.csv (data of range type, requires -withData option) data_matrix.csv (data of matrix type with 1 key, requires -withData option) data_matrix<2|3|4|5|6>key.csv (data of matrix type with 2-6 keys, requires -withData option) tree.csv (structure of the tree) ProductAttribute [attribute1-30.json] [currency.json] [label.json] [sku.json] [unitOfMeasure.json] ProductExtension <label> attributes (directory) [<attributeName>.json] extension.json RebateAgreementTemplate [<uniqueName>.json] RebateAgreementTemplateAttribute [attribute1-30.json] [formulaName.json] [label.json] [lastUpdateDate.json] [uniqueName.json] RebateRecordAttribute <RebateRecordSetLabel> (usually Default) [<attributeName>.json] RebateType [<uniqueName>.json] RebateTypeAttribute [attribute1-30.json] [formulaName.json] [label.json] [waterfallElement.json] SavedChart [chartDefinition.json] Security BusinessRole [<uniqueName>.json] User [<loginName>.json] users.csv (use to import passwords, CSV header line is then "loginName,password", more columns for user fields can be added as well) userGroups.csv WorkflowFormula <uniqueName>+<validAfter.format("yyyy-MM-dd")> elements (directory) <elemementName>.groovy (.groovy files for groovy FUNCTION expressions) logic.json (entity JSON with formula expression) .info (information about export version and possibly more)

Design Principles

Naming Conventions for Folders and files:

  • Singular and camel case are used.

  • Files have extensions, directories do not.

Folder Structure Convention:

  • The first level directories represent particular configuration type, the directory name is self-describing.

    • Data and metadata are stored in these directories; data are always optional.

    • For simple types, the directory contains only files with metadata.

    • For more complex structures, nested directories are created. 

    • Nested files/directories are named after the entity business key whenever possible.

Exported files:

  • JSON files are created:

    • Pretty printed with indentation of 2 spaces.

    • With canonical serialization (the JSON tree is fully sorted in alphabetical order).

    • UNIX LF

  • CSV files when created:

    • Always have a header line.

    • Sorted by the business key (depends on the exported data).

    • UNIX LF, comma-separated fields.

  • References to other entities used in files are expressed with a business key, database ID is never used.

Found an issue in documentation? Write to us.