Command Line Interface (CLI)

Price Checker allows you to automate the submission of analysis tasks by using a Command Line Interface (CLI). If you don’t know what that is, think of people hacking away on 80s style terminals. On modern operating systems we’ve now got:

Windows 10: cmd

Mac OS X: Terminal

 

Image courtesy Wikipedia

More info: https://en.wikipedia.org/wiki/Cmd.exe

More info:

https://en.wikipedia.org/wiki/Terminal_(macOS)

Launching cmd

  1. Press ‘Windows'+R to open “Run” box.

  2. Type “cmd

  3. Press Enter or click “OK” to open a regular Command Prompt.

Launching Terminal

  1. Open Applications

  2. Open Utilities

  3. Run ‘Terminal’

OR

  1. Press Command - spacebar to launch Spotlight search

  2. Type “Terminal”

  3. Double click the result

Price Checker must already be running with its window open to be able to correctly accept terminal commands and return from them. See https://pricechecker2.atlassian.net/wiki/spaces/PC2/pages/154304527

To queue a run using the terminal, you basically tell the operating system to run Price Checker again with a couple of special parameters, which tell it which file or link to open and what settings to use. Instead of opening another window it will interpret the command accordingly and queue up a new run instead.

This would allow you, for example, to queue up scans for multiple storefronts without manually opening the https://pricechecker2.atlassian.net/wiki/spaces/PC2/pages/139657217, pasting a link, confirming, and repeating.

The most basic command

“C:\Program Files\Price Checker 2.2\PriceChecker2.exe" C:\Users\Thomas\Documents\supplier.xlsx

This, on Windows, would quite simply tell PC2 to open the file C:\Users\Thomas\Documents\supplier.xlsx and show the https://pricechecker2.atlassian.net/wiki/spaces/PC2/pages/360500 dialog for you to check the columns etc before starting the run.

It is equivalent to clicking “Open a File” and selecting that file on the User Interface.

We can also tell it to open a URL, which would be like opening the https://pricechecker2.atlassian.net/wiki/spaces/PC2/pages/139657217 and opening that page, then hitting “check page for products” and “select this page” one after the other:

C:\Program Files\Price Checker 2.2\PriceChecker2.exe https://www.amazon.com/s?k=disney

On Mac OS, the same commands would look something like this:

/Applications/Price\ Checker\ 2.2.app/Contents/MacOS/JavaApplicationStub /Users/Thomas/Documents/supplier.xlsx

/Applications/Price\ Checker\ 2.2.app/Contents/MacOS/JavaApplicationStub https://www.amazon.com/s?k=disney

You can see that the first thing is always the Price Checker executable, while the last parameter following the name of the executable is always the file or link/URL to open.

There are additional parameters that allow you to configure the entire run as if you’d done it on the https://pricechecker2.atlassian.net/wiki/spaces/PC2/pages/360500 screen, and have the job start automatically.

The above are the simplest commands you can run - feel free to try it now.

List of parameters

Parameters are added between the executable and the file or URL.

Common parameters

These apply to both file and browser/URL runs:

Parameter

Description

Run Settings screen equivalent

Default value
if not specified

Parameter

Description

Run Settings screen equivalent

Default value
if not specified

-autostart
or
-auto

Automatically run the file or URL without showing the settings dialog?

Clicking the “start” button

false
(i.e. no)

-costProfile

Name of cost profile to use. The name should be enclosed in double quotation marks, e.g. “Ship NY to UK”

If you have made changes to the single basic profile, use “Default”.
Example: -costProfile “Default”

9. Cost Profile

None

(Standard FBA, and there will be no calculation of prep, VAT, or shipping)

-currency

The output currency.

Example: -currency USD

7. Return Profits in

Marketplace Currency,

(i.e. same as marketplace being analysed)

-grabAllVariations

Whether to enable “Grab all Variations”

Enable the “Grab all Variations” option

false

-keepDuplicates

Turn off duplicate removal

Uncheck the “Remove duplicates” option

Remove duplicates

-outFile
or
-out

Specify the absolute file system path for where to write the results file, enclosing in quotation marks if it contains spaces.

Example: -out “C:\Users\With Space\results.xlsx”

Change Output File and type

Automatically generated filename (input file + -PC2 and current date suffix), in the same folder as the input file.

-outType

Keep PC2’s automated output file naming scheme, but specify the file type (xls, xlsx, csv, tab)

Example: -outType csv

Change Output File and change extension/file type only

xlsx

-reviews

Whether to download Variation Reviews

Enable the “Get Variation Reviews” option

false

-silent

Suppress modal dialogs, e.g. invalid ID warning.

Requires version 2.2.50 or higher

N/A

false

File run specific parameters

These only apply when opening a file:

Parameter

 

Run Settings screen equivalent

Default value
if not specified

Parameter

 

Run Settings screen equivalent

Default value
if not specified

-headers

Does the file contain headers? This will in essence make

Check “File has headers”

auto detected

-idType
or
-it

The type of ID and analysis, i.e.:
ASIN, UPC, EAN, ISBN, SellerSKU, or Keywords
See https://pricechecker2.atlassian.net/wiki/spaces/PC2/pages/142377020

Must be specified for ID column option to take effect

2. Product ID Type

auto detected

-id

The index of the Product ID column, based on a 0 index, i.e.:
Column A = 0, B = 1, etc.

e.g. -id 0

Must be specified for ID type option to take effect

3. Product ID Column

auto detected

-cost

The index of the cost-column, based on a 0 index, as above.

e.g. -cost 1 means 'costs are in column B

Specify a negative number to explicitly set ‘none’
e.g. -cost -1

4. Cost Column

auto detected

-pack

The index of the wholesale packaging column, based on a 0 index, as above.

e.g. -pack 2 means ‘packaging is in column C’

Specify a negative number to explicitly set ‘none’
e.g. -pack -1

5. Supplier Multipack Column

auto detected

-costCurrency

Currency to interpret costs in.

e.g. USD, EUR, GBP, CAD, AUD

6. Costs are in

Marketplace Currency

-mkt

The marketplace to run against.

Example: -mkt DE

 

The most recently used, or US if never.

URL / Browser run specific parameters

Parameter

 

Browser equivalent

Default value
if not specified

Parameter

 

Browser equivalent

Default value
if not specified

-deepScan

Perform deep scan.

Not cancelling the deep scan

Unlike on the User Interface, this is false by default

-visual

Whether to show the browser during the run, which might help with debugging.

-

false

Putting it all together

A file run using all arguments could look like this:

"C:\Program Files\Price Checker 2.2\PriceChecker2.exe"
-headers -it UPC -id 2 -cost 3 -costCurrency EUR -mkt UK
-costProfile ”ABC Shipping Ltd” -currency EUR -grabAllVariations
-auto ”\\SharedDrive\Files\AcmeCorp\PriceList\2020.xls”

Please note that this is displayed over multiple lines just for legibility. It must be on a single line on cmd or Terminal. Remember to replace C:\Program Files\Price Checker 2.2\PriceChecker2.exe with the actual executable on Mac OS or if required.

The above would tell Price Checker to open the file located at \\SharedDrive\Files\AcmeCorp\PriceList\2020.xls, and
-automatically run it against
-mkt UK (UK market) with
-headers in the top row ignored,
-it UPCs found in column -id 2 (counting from 0, so 2 means column C in the file),
costs in -costCurrency EUR found in column -cost 3 (i.e. D),
using the -costProfile named ABC Shipping Ltd,
and also using the -grabAllVariations option.

Locating the Price Checker executable

Windows

Mac OS X

In the default installation the Price Checker 2 executable is found at:

1 "C:\Program Files\Price Checker 2.2\PriceChecker2.exe"

Replace C:\Program Files\Price Checker 2.2 with your actual installation directory if necessary. Note that this is different from the Data Directory.

The default on Mac OS will be:

/Applications/Price\ Checker\ 2.2.app/Contents/MacOS/JavaApplicationStub

If you installed it outside of Applications or changed the app name, just replace /Applications/Price\ Checker\ 2.2.app accordingly.

Please note that the \ is an escaped space character. The alternative is to enclose the entire executable name in quotations marks, just like on windows.