← スキル一覧に戻る

commerce-checkout
by stateset
StateSet iCommerce
⭐ 1🍴 0📅 2026年1月24日
SKILL.md
name: commerce-checkout description: Use when managing shopping carts, checkout flows, or implementing the Agentic Commerce Protocol (ACP).
Commerce Checkout Skill
Domain knowledge for shopping cart and checkout operations using the Agentic Commerce Protocol (ACP).
Agentic Commerce Protocol (ACP)
ACP is a standardized protocol for AI agents to interact with commerce systems. It defines:
- Cart Lifecycle - Creation, modification, completion
- Checkout Flow - Address, shipping, payment, confirmation
- Recovery Patterns - Abandoned cart handling
Cart States
| State | Description | Transitions |
|---|---|---|
active | Cart is being modified | → ready_for_payment, cancelled, abandoned, expired |
ready_for_payment | All info collected | → payment_pending, cancelled |
payment_pending | Payment in progress | → completed, failed |
completed | Order created | Terminal state |
cancelled | User cancelled | Terminal state |
abandoned | Marked for recovery | → active (if recovered) |
expired | Cart timed out | Terminal state |
Checkout Flow
Standard Flow
1. Create Cart
- Guest: email + name
- Customer: customerId
2. Add Items
- SKU, name, quantity, price
- Can add multiple items
3. Set Shipping Address
- firstName, lastName
- line1, line2 (optional)
- city, state, postalCode, country
4. Select Shipping Method
- Get rates based on address
- Choose carrier/service
5. Apply Discounts (optional)
- Coupon codes
- Automatic discounts
6. Set Payment
- Method: credit_card, paypal, crypto
- Token from payment provider
7. Complete Checkout
- Validates all required fields
- Creates order
- Returns orderId, orderNumber
Cart Totals
| Field | Description |
|---|---|
subtotal | Sum of item totals |
taxAmount | Calculated tax |
shippingAmount | Shipping cost |
discountAmount | Applied discounts |
grandTotal | Final amount due |
Formula:
grandTotal = subtotal + taxAmount + shippingAmount - discountAmount
Payment Methods
| Method | Description |
|---|---|
credit_card | Visa, Mastercard, Amex |
paypal | PayPal checkout |
crypto | Cryptocurrency payment |
bank_transfer | ACH/Wire |
buy_now_pay_later | Affirm, Klarna |
Fulfillment Types
| Type | Description |
|---|---|
shipping | Ship to customer address |
pickup | Customer pickup at location |
digital | Digital delivery |
Cart Expiration
- Default: 24 hours
- Custom: Set
expiresInMinuteson create - Expired carts cannot be modified
- Recovery: Create new cart with same items
Abandoned Cart Recovery
Carts become "abandoned" when:
- User navigates away without completing
- Explicit abandon marking
- Inactivity threshold reached
Recovery workflow:
get_abandoned_carts- List recovery candidates- Send reminder email (external)
- User returns and resumes checkout
- Or create new cart with recovered items
Common Errors
| Error | Cause | Solution |
|---|---|---|
Cart not found | Invalid ID | Check cart ID |
Cart expired | Timed out | Create new cart |
Empty cart | No items | Add items first |
Missing address | No shipping | Set address |
Invalid payment | Bad token | Retry payment |
Best Practices
- Save cart ID - Store for session continuity
- Validate incrementally - Check each step
- Handle failures gracefully - Preserve cart state
- Show clear totals - Break down all charges
- Confirm before complete - Final review step
Integration Notes
Creating Cart for Guest
{
customerEmail: "guest@example.com",
customerName: "Guest User",
currency: "USD"
}
Creating Cart for Customer
{
customerId: "uuid-of-customer",
currency: "USD"
}
Cart Item Structure
{
sku: "WIDGET-001",
name: "Premium Widget",
description: "High quality widget",
quantity: 2,
unitPrice: 29.99,
imageUrl: "https://..."
}
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です