Create sales order
Skill skuio/sku-skills/dist/claude/orders/create-sales-order
Open-source e-commerce agent skills for the SKU.io API — authored once, generated for Claude, OpenAI, and Gemini.
npx -y skills add skuio/sku-skills --skill create-sales-orderAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 27 days oldThe repository was created 27 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Create a new sales order in SKU.io with one or more line items. Use this to place an order for a customer — capturing the order status, order date, optional customer and store, and the SKUs, quantities, and unit prices being sold. Resolve products first with find-product so each line references a real product.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
4.9 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
Create a Sales Order
Use this skill to create a sales order — the record of something being sold to a customer, with
line items. It maps to POST /api/sales-orders (scope orders:write).
Before you post
- Resolve every product. For each thing being sold, run the find-product skill to get a
real
product_id(or exactsku). A line can referenceproduct_idorsku; a line with neither is a free-text/non-product line and still needs adescriptionandamount. - Decide the status. Use
order_status: "draft"while assembling — a draft may have zero lines. Any non-draft status requires at least one line. If unsure which non-draft status this account uses, create it as a draft first. - Have the money right.
amounton each line is the unit price, not the line total.quantity×amountis the line value; SKU.io computes totals.
Required fields
order_status— string (see above).order_date— a date; if you omit it the client defaults to now.sales_order_lines— required unless the order is a draft. Each line needs:description(required, max 255)quantity(required, ≥ 0)amount(required unit price)product_idorskuto link a catalog product (optional but recommended)warehouse_id(optional; required if you set awarehouse_routing_methodofwarehouse)
Useful optional header fields: customer_id, store_id, sales_channel_id,
customer_po_number, shipping_method_id, shipping_address_id, billing_address_id,
ship_by_date, memo_for_customer, sales_rep_name.
Request
curl -sS -X POST "https://$SKU_TENANT.sku.io/api/sales-orders" \
-H "Authorization: Bearer $SKU_PAT" \
-H "Content-Type: application/json" -H "Accept: application/json" \
-d '{
"order_status": "open",
"order_date": "2026-07-09",
"customer_id": 4821,
"customer_po_number": "PO-99123",
"sales_order_lines": [
{ "product_id": 1567, "description": "Blue Widget", "quantity": 10, "amount": 12.50 },
{ "sku": "GADGET-RED-02", "description": "Red Gadget", "quantity": 3, "amount": 29.00 }
]
}'
See examples/request.json for the same body as a file.
Handle the response
-
201/200→ the created sales order (with itsid) is returned. Capture theid, then output the direct link to the sales order so the user can click straight into it:https://{tenant}.sku.io/v2/orders/sales-orders/{id}Always end by giving the user this URL along with the SO number and order status — a sales order buried in a table search or filter is easy to miss.
-
422→ validation failed. Theerrorsmap names the offending fields with dot-notation for lines, e.g.sales_order_lines.0.quantity. Fix those specific fields and resubmit — never blind-retry the same body. Seeshared/errors.md. -
403→ the token lacksorders:write. Mint a token with that scope.
Guardrails
- Don't invent
customer_id,product_id, orstore_idvalues — resolve them first, or omit the optional ones. - Creating an order is not idempotent: a retry after an ambiguous timeout can create a
duplicate. On timeout, list recent orders (or search by
customer_po_number) before re-posting.
API operations
| Method | Path | What it does |
|---|---|---|
POST | /api/sales-orders | Create a sales order with header fields and an array of line items. |
Authentication
Every request authenticates with a SKU.io Personal Access Token sent as a Bearer token:
Authorization: Bearer <YOUR_SKU_PAT>
- Base URL:
https://{tenant}.sku.io(replace{tenant}with your account subdomain) - Required scopes:
orders:write,products:read
Mint a token under Settings → Developer → Personal Access Tokens in the SKU.io web app.
See shared/authentication.md for the full flow.
Improve this skill
Did this skill fall short—an unclear step, a wrong endpoint, or something it couldn't finish? Don't just work around it: capture what was off and open a pull request so the next agent does better.
- Repo: https://github.com/skuio/sku-skills
- Edit the canonical skill under
skills/<domain>/<name>/(not this generated file), then runnpm run buildand open a PR. External contributors: fork the repo and PR from the fork. - The full agent workflow is in
AGENTS.md.
Your agent can do this end to end. The library gets better every time someone sends a fix.
Gives 0 of the 12 instructions most sales crm skills give in ~1.2k tokens
Counted across 361 of the 361 authors here whose files we hold, read 2026-08-06
- Read product marketing context before writing if it existsin 22 of 361, across 14 files
- keep the ask low-frictionin 16 of 361, across 7 files
- Call RUBE_SEARCH_TOOLS firstin 15 of 361, across 5 files
- personalize every outbound messagein 13 of 361, across 4 files
- confirm connection status is activein 13 of 361, across 4 files
- Keep forwardable blurbs under 100 wordsin 13 of 361, across 4 files
- State if personalization context is missingin 13 of 361, across 4 files
- Cut any sentence that does not drive a replyin 13 of 361, across 4 files
- Use proof instead of adjectivesin 12 of 361, across 3 files
- Use a single, low-friction call to actionin 12 of 361, across 4 files
- Calibrate tone to the specific audiencein 12 of 361, across 3 files
- Make each follow-up email add new valuein 12 of 361, across 6 files
Said here and by no other author read
- resolve products via find-product first
- set order status to draft while assembling
- treat line amount as unit price
- include required fields in the request
- output the direct sales order url
- fix specific fields on validation failure
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.