スキル一覧に戻る
stateset

commerce-checkout

by stateset

StateSet iCommerce

1🍴 0📅 2026年1月24日
GitHubで見るManusで実行

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:

  1. Cart Lifecycle - Creation, modification, completion
  2. Checkout Flow - Address, shipping, payment, confirmation
  3. Recovery Patterns - Abandoned cart handling

Cart States

StateDescriptionTransitions
activeCart is being modified→ ready_for_payment, cancelled, abandoned, expired
ready_for_paymentAll info collected→ payment_pending, cancelled
payment_pendingPayment in progress→ completed, failed
completedOrder createdTerminal state
cancelledUser cancelledTerminal state
abandonedMarked for recovery→ active (if recovered)
expiredCart timed outTerminal 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

FieldDescription
subtotalSum of item totals
taxAmountCalculated tax
shippingAmountShipping cost
discountAmountApplied discounts
grandTotalFinal amount due

Formula:

grandTotal = subtotal + taxAmount + shippingAmount - discountAmount

Payment Methods

MethodDescription
credit_cardVisa, Mastercard, Amex
paypalPayPal checkout
cryptoCryptocurrency payment
bank_transferACH/Wire
buy_now_pay_laterAffirm, Klarna

Fulfillment Types

TypeDescription
shippingShip to customer address
pickupCustomer pickup at location
digitalDigital delivery

Cart Expiration

  • Default: 24 hours
  • Custom: Set expiresInMinutes on 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:

  1. get_abandoned_carts - List recovery candidates
  2. Send reminder email (external)
  3. User returns and resumes checkout
  4. Or create new cart with recovered items

Common Errors

ErrorCauseSolution
Cart not foundInvalid IDCheck cart ID
Cart expiredTimed outCreate new cart
Empty cartNo itemsAdd items first
Missing addressNo shippingSet address
Invalid paymentBad tokenRetry payment

Best Practices

  1. Save cart ID - Store for session continuity
  2. Validate incrementally - Check each step
  3. Handle failures gracefully - Preserve cart state
  4. Show clear totals - Break down all charges
  5. 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

レビュー

💬

レビュー機能は近日公開予定です