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
-
get the UAT token for your company. UAT token must have access to:
- product_view
- workorder_create
- workorder_view
-
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 providewo_reference
: BO_PO_Number-SKU(s)sku
: Product SKU which is used to assign to this WOcode_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
-
Run the script with
wo_create.exe --source "WO CSV.csv" --server api.scantrust.com --token <UAT-TOKEN>
-
example output:
========================
5 WOs in the CSV.
5 WOs have been created:
======================== -
If you're stuck, run
wo_create.exe --help
How the script works
- Creates a workorder for each line in the CSV file
- 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
- 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!