Migrate Pricing Algorithms from Test to Production

You can extend a pricing algorithm to meet your specific business requirements, then use export and import to move it between environments.

You typically develop your algorithms in a test environment. You finish testing then use the Export and Import actions to move it to your production environment. You can also use export to backup your extended algorithms.

use the Export and Import actions to move it to your production environment

Export Your Algorithms

Assume you develop and test algorithms in an environment named Test. You finish testing, then need to export all your algorithms, including predefined ones, into an environment named Production.

  1. Sign into your Test environment with the privileges that you need to administer pricing.

  2. In the Pricing Administration work area, click Tasks > Manage Algorithms.

  3. On the Manage Algorithms page, click Actions > Export All.

    Action

    Description

    Export Selected

    • This action exports only the algorithms you select.

    • It exports all versions of each algorithm you select. For example, if the Calculate Shipping Charges algorithm has versions 0, 1, 2, 3, 4, 5, 6, and 7, and if you select only version 3 of Calculate Shipping Charges, then the export exports all versions of Calculate Shipping Charges.

    • You can't export only one version or only some versions of an algorithm.

    Export All

    Exports all versions of all algorithms.

    Import

    • Imports one or more algorithms from the zip file you create when you use the Export Selected or Selected All action.

    • You can't import only some versions of an algorithm.

    • If the zip file contains more than one algorithm, you must import all of them. You can't pick and select.

  4. In the dialog that displays, select the Save File option, click OK > Save.

    • You can use the predefined ExportedAllAlgorithms.zip file name, or change it, but you must save the file as a zip file type.

    • Make a note of the location where you save the file. For this example, assume you created a folder named my_algorithms, and you save the zip file on your local computer at c:\my_algorithms.

    • You can use this file as a backup. For example, if your server suffers a catastrophic failure, then you can import the file into a new environment, and pick up where you left off.

Import Your Algorithms

  1. Sign out of your Test environment, then sign into your Production environment.

  2. Navigate to the Manage Algorithms page, then click Actions > Import All.

  3. In the dialog that displays, navigate to c:\my_algorithms, locate the ExportedAllAlgorithms.zip file you exported earlier, select it, then click OK.

    • The import replaces algorithms that currently exist in Production with the algorithms that you exported from Test.

    • If the zip file that you import from Test contains more than one version of an algorithm, then the import removes all versions of the algorithm in Production except for versions 0 and 1, and replaces them with the versions from Test. The import doesn't mess with Versions 0 and 1 in Production. They remain the same.

Assume you import Algorithm_1, Algorithm_2, and Algorithm_3_Custom. 1 and 2 are predefined. 3 is the one you created.

Algorithm Name

Versions in Test

Versions in Production Before You Import

Versions in Production After You Import

Algorithm_1

Version 0, 1, 2, 3 (inactive), 5

Version 0, 1, 2

Version 0, 1, 2, 3 (inactive), 5

Algorithm_2

Version 0, 1, 6, 7 (inactive), 9, 10, 11, 12

Version 0, 1, 2, 3, 6

Version 0, 1, 6, 7 (inactive), 9, 10, 11, 12

Algorithm_3_Custom

Version 1, 2

The export exports all versions above version 0 for each algorithm that you create.

Version 1, 2, 3, 4

Version 1, 2

Learn how versions work. For details, see Promote Pricing Algorithms Into the Latest Update and Manage Modifications Through Updates.