Compile a Pricing Plan from the Command Line

Perform this task to compile a pricing plan from the command line so you can deploy the pricing plan to the pricing database. The compiler validates the pricing schema during compilation time and returns any errors that occur.

About this task

Perform this task on the server hosting My MATRIXX.

Procedure

  1. Go to the /tmp directory.
    cd /tmp
  2. Enter the following command to compile the pricing plan and save it to the local directory:
    get_pricing.py mtx_pricing_file compilerURL username password domain time

    Where:

    • mtx_pricing_file is the name of a pricing XML or ZIP file to compile.
    • compilerURL is the HTTP web address for the pricing compiler on the My MATRIXX host server. One of:
      • Pricing XML configuration file – http://ip_address:8080/matrixx/data/admin/compile
      • Development ZIP file file – http://ip_address:8080/matrixx/data/admin/compilejar
      • Production ZIP file file – http://ip_address:8080/matrixx/data/admin/productionjar
    • username is the login name of the user whose workspace is used to compile the pricing configuration file.
    • password is the My MATRIXX password for the username specified.
    • domain is the name of the domain in the user's workspace that has the pricing plan to compile.
    • time is an optional parameter that enables you to specify the number of old pricing revisions to compile into the configuration file. This parameter overrides the configuration setting in My MATRIXX for compiling revisions. The value is an ISO date in the format yyyy-mm-ddThh:mm:ss that specifies what date to produce a pricing file from. All revisions that became inactive before this date are filtered out. A pricing revision is active until its next revision starts.
    For example, the following command compiles a production version of the pricing plan and omits all pricing revisions before January 1, 2012.

    get_pricing.py my_pricing.zip http://ip_address:8080/matrixx/data/admin/productionjar UserA UserA_pwd myCompany 2012-01-01T00:00:00

    The following command compiles a development version of the pricing plan and has the amount of pricing revisions that are specified in the configuration settings for My MATRIXX.

    get_pricing.py my_pricing.zip http://ip_address:8080/matrixx/data/admin/compilejar UserA UserA_pwd myCompany

Results

The file is saved to the local directory with the name, mtx_pricing_domain_username_date_timestamp.ext, where date is in the format YYYYMMDD, timestamp is in the format HHMMSS, and ext is XML or ZIP, depending on the file format compiled.

For example: mtx_pricing_xyzCorp_admin1_20121031_083025.zip

If you generated the pricing XML file and operation fails, any formatting violations and errors are listed in the XML file. If you generated a ZIP file and the compilation fails, this information is saved to the errors.txt file inside the ZIP file. Use these messages to troubleshoot the failure. For example, errors are displayed if a balance template is missing balance units or if the unit type specified for a balance template is incompatible with the unit type of the balance class. For more information, see the discussion about configuring pricing validation.