The Scenario
You are an operations coordinator at a subscription e-commerce brand. Yesterday a payment processor outage caused 40 orders to charge incorrectly. The finance team issued refunds this morning. Your job: cancel the 40 ShipEngine shipments before labels are purchased at the end of the day.
The shipment IDs are already in a Google Sheet, column A, pulled from the order management system. You have until 3 PM.
The bad version of this afternoon:
- Log into ShipEngine's dashboard
- Find shipment one by ID using the search bar
- Click Cancel
- Confirm
- Repeat 39 more times
- Get 15 minutes in and have the dashboard time out
- Log back in, lose your place
- Finish at 3:45 PM. Labels were purchased at 3:00.
The fast version is one prompt.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your spreadsheet that reads the shipment IDs and cancels each one via the ShipEngine API, writing the result back for your records.
Open the SheetXAI sidebar and type:
Cancel every ShipEngine shipment whose ID is listed in column A of my Cancellations sheet — write 'cancelled' in column B for each success and the error message for any failure.
SheetXAI reads the column, calls ShipEngine's cancel endpoint per row, and writes the outcome back into column B. Forty cancellations done before the 3 PM label run.
What You Get
Column B updated for all 40 rows:
- 'cancelled' — the shipment was voided in ShipEngine successfully
- Error message — if ShipEngine could not cancel (already labelled, already voided, ID not found), the reason is written here
The failures are visible immediately. If three shipments were already labelled before you ran the prompt, column B tells you which three so you can decide whether to intercept them.
What If the Data Is Not Quite Ready
Cancellation lists from order management systems have predictable gaps. SheetXAI handles the edge cases in the same prompt.
When the list has duplicate shipment IDs
The export ran twice and some shipment IDs appear in the sheet more than once.
Deduplicate the Cancellations sheet by the shipment ID in column A, keeping the first occurrence of each. Then cancel each unique shipment ID in ShipEngine and write 'cancelled' or the error message into column B.
When some rows should be skipped based on a status flag
Column C has a status column from the order system. Rows marked "DO NOT CANCEL" should be left alone.
Skip any rows in the Cancellations sheet where column C contains 'DO NOT CANCEL'. Cancel all other shipment IDs in column A via ShipEngine and write the result into column B.
When you want to confirm each shipment's current status before cancelling
You are not sure if some shipments were already labelled and therefore cannot be cancelled.
For each shipment ID in column A of the Cancellations sheet, first check the current ShipEngine status. If the shipment is in a cancellable state, cancel it and write 'cancelled' into column B. If it has already been labelled, write 'ALREADY LABELLED — cannot cancel' into column B. For any other status, write the status into column B.
When you need to cancel the shipments, log the outcome, and send a summary to the ops director in one pass
The ops director wants to know what happened before she leaves at 5 PM.
Cancel each ShipEngine shipment ID in column A of the Cancellations sheet and write the result into column B. Then write a summary into cell D1: total shipments cancelled, total that could not be cancelled because they were already labelled, total errors, and the timestamp of when the cancellation run completed.
The pattern: cancel and summarize in one prompt so the ops director has an accurate count without a follow-up email chain.
Try It
Get the 7-day free trial of SheetXAI and open any sheet with a list of ShipEngine shipment IDs you need to void, then ask it to cancel them and write the results back. The ShipEngine integration is included in every SheetXAI plan. For related workflows, see how to update shipment addresses before a label run or the ShipEngine in Google Sheets overview.
