Skip to main content

Create Workorder Tool

This tool is used to automatically create workorders on behalf of a brand owner based on a CSV file.

Requirements

Use a pre-compiled version:

Download Create Workorder tool for your Operating System:

Binary files

steps to run

  1. get the UAT token for your company. UAT token must have access to:

    • product_view
    • workorder_create
    • workorder_view
  2. get the file with your workorders in it. By default it checks for the file workorders.csv but you can pass in any file with the --source option. This file MUST have a header which includes:

    • wo_template_id : ST to provide
    • wo_reference : BO_PO_Number-SKU(s)
    • sku : Product SKU which is used to assign to this WO
    • code_quantity : Number_of_label * (1 + wastage %). Number of codes needed in order to deliver the number of labels required.
    • remarks : Optional remarks to be included in the WO
  3. Run the script with wo_create.exe --source "WO CSV.csv" --server api.scantrust.com --token <UAT-TOKEN>

  4. example output:

       ========================
    5 WOs in the CSV.
    5 WOs have been created:
    ========================
  5. If you're stuck, run wo_create.exe --help

How the script works

  1. Creates a workorder for each line in the CSV file
  2. Checks all the products in the wo file. If any of the products cannot be found, the script is aborted and NO workorders are created
  3. Checks all the wo_template_id in the wo file. If any of the templates cannot be found, or if any template doesnt have a printing partner, the script is aborted and NO workorders are created

CSV example

wo_template_id,sku,wo_reference,code_quantity,remarks
1,CH-01,reference ch-01,10,remarks 1
...

Optional Parameters

--server

The Scantrust server domain. Defaults to api.scantrust.com

--token

UAT token to login from the Scantrust portal. This token will take precedence over user/pass authentication.

--verbose

Run the tool with extra output, handy to debug errors.

--help

There's no shame in needing help!