create-dispatch-orders-from-zero-paid-invoices-for-opslisted
Install: claude install-skill zapier/awesome-zaps
# Create dispatch orders from zero-paid invoices
The Zap's code lives at https://github.com/zapier/awesome-zaps/tree/main/zaps/create-dispatch-orders-from-zero-paid-invoices-for-ops. Read the files there if this skill was installed on its own.
## What it does
1. **Trigger:** a Xero sales invoice is updated to status `paid` (`xero`, `updated_invoice_v2`).
2. **Filter (plain code):** the run stops unless the invoice is paid and its total is between 0 and `MAX_INVOICE_TOTAL`. Invoices whose reference contains a configured branch indicator are skipped.
3. **CartonCloud** creates an outbound (sale) order. The invoice number is the order reference. The contact name and address lines go to the delivery address, each invoice line becomes an item (product code and quantity), and the invoice PDF is attached when Xero provides one.
4. **Gmail:** if the CartonCloud step fails, one failure notice goes to the IT address with the invoice number and the error.
The Zap only creates orders and sends the IT notice. It never changes the invoice in Xero.
## Ask the user
Each `REPLACE_…` value is set per person. Resolve names to IDs with the user's own connections; don't ask them to paste an ID you can look up.
| Setting | Where | What goes there |
| ------------------------------ | ----------------------------------------------------