Lister can be integrated with a Packsize machine in order to cut custom shipping boxes for your products. This guide explains how to set up that integration.
Summary of the workflow afterwards
Once you've completed this guide, this is what your organization's workflow may look like.
Posters will create products like they did before. On the New Product page, make sure to fill in both the product dimensions and choose a box padding. Lister will then calculate these fields and expose them on the product report:
shipping_length
shipping_width
shipping_height
You will write a custom script that makes a call to a Lister REST endpoint to retrieve the product report. This script runs every night. For each product, it sends a job to the Packsize machine that includes these 3 dimension fields, plus the product SKU. These jobs will be waiting in the queue, so Packsize won't produce the box yet.
Once an order comes in, the packer will print the pack sheet for the product. At the Packsize station, the packer will scan the product SKU barcode on the pack sheet. This instructs Packsize to release the cut job for that SKU, and the box begins to print/cut.
Step 1, make a test REST call to retrieve products
All REST calls must supply an X-Authorization header with your generated API token. You can generate these keys from the Admin - Developer settings . Here's an example API call. Make sure you can make a similar REST call and get a response with data.
โ
curl --location -g --request GET 'https://app.uprightlabs.com/api/reports/products?created_at[]=2021-03-01T19:29:42Z&created_at[]=2021-03-03T19:29:42Z' \
--header 'X-Authorization: your_api_key_here' \
Example response:
{
"data": [
{
"product_id": 3198908,
"created_at": "03/03/2021 14:19:40",
"title": "Bulk LEGO Assorted Building Bricks 8 lbs",
"sku": "7952",
"<...other fields...>": null,
"shipping_length": "6.0",
"shipping_width": "6.0",
"shipping_height": "6.0"
}
]
}
If parsing CSV is easier for you, you can change api/reports/products?
to api/reports/products.csv?
to get a response like
โ
product_id,created_at,recycled_at,title,sku,length,width,height,weight,shipping_weight,price,is_draft,supplier,inventory_location,shipping_box,category,poster,manifest,carrier,shipping_length,shipping_width,shipping_height
3198908,03/03/2021 14:19:40,,Bulk LEGO Assorted Building Bricks 8 lbs,7952,2.0,3.0,4.0,8.0,8.0,,false,McLean,Bin-1,6 Cube,Toys/Dolls/Games > LEGO,theadmin,,FedEx,6.0,6.0,6.0
3198753,03/03/2021 14:08:43,,Dell Computer,7951-A,,,,0.0,,,true,McLean,,,,theadmin,7951,,,,
Step 2, write a script to create Packsize jobs
Using whatever scripting language you prefer, write a script that makes this REST call above.
Note the timestamp params. These are in ISO 8601 format. If you plan to run the script every day, consider retrieving a few days worth of products. This helps avoid edge cases, and helps avoid missing data if your script doesn't run one day. In this example above, we retrieved roughly the past 48 hours worth of data.
Extract these fields from the data:
shipping_length
shipping_width
shipping_height
sku
Use these fields to create a Packsize job. The shipping_ fields correspond to the shipping dimensions of the box. Pass these fields into the Packsize length/width/height params when creating a Packsize job. The "sku" field (stock keeping unit) uniquely identifies the product, so use it as the Packsize job ID.
Step 3, schedule the script
Schedule the script to run on whatever schedule you prefer. Running it daily will ensure that any product created yesterday will be ready for shipping today. If you manage to create products and ship them on the same day, then you may want to run the script more frequently.