agentleFS
wake-engineeringwake-engineering/ai-plugin/skills/wake-checkout-flow/SKILL.md

wake-checkout-flow

Skill4 starsChanged 8 months agoMITView on GitHub

Wake Commerce checkout mutation sequence. Use when implementing or debugging checkout, shipping, payment, or order completion. Triggers on: checkout flow, createCheckout, checkoutComplete, shipping selection, payment selection, Wake checkout.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No checkoutId: Create checkout first via createCheckout.

    line 84
  2. Very specific:

    Missing address: Call checkoutAddressAssociate before shippingQuotes (useSelectedAddress requires address).

    line 87

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Wake Checkout Flow

Forbidden: api.fbits.net (and any *.fbits.net). Canonical source: https://wakecommerce.readme.io/docs/schema

Full checkout mutation sequence for Wake Commerce headless storefronts. Covers createCheckout through checkoutComplete per processo-de-fechamento-de-pedido.

When to Use

  • Implementing checkout flow from cart to order
  • Debugging shipping or payment selection
  • Understanding mutation order and dependencies
  • Adding pickup store or delivery schedule

Ordered Sequence

Execute in this order. Do not skip steps; each depends on the previous.

StepOperationTypePurpose
1createCheckout(products)MutationCreate cart; returns checkoutId
2checkoutCustomerAssociateMutation(Optional) Associate logged-in customer
3checkoutAddressAssociateMutationSet delivery address
4shippingQuotes(checkoutId)QueryGet available shipping options
5checkoutSelectShippingQuoteMutationSelect shipping (or pickup, schedule)
6checkoutAddCouponMutation(Optional) Apply discount coupon
7paymentMethods(checkoutId)QueryGet available payment methods
8checkoutSelectPaymentMethodMutationSelect payment + installment
9checkoutCompleteMutationFinalize order

Step Details

1. createCheckout

mutation($products: [CheckoutProductItemInput]) {
  createCheckout(products: $products) {
    checkoutId
    products { productVariantId quantity }
  }
}

Input: products: [{ productVariantId, quantity }]. Returns checkoutId (Uuid). Use this for all subsequent calls.

2. checkoutCustomerAssociate (Optional)

Required only when customer is logged in. Pass customerAccessToken from login. Omit for guest checkout.

3. checkoutAddressAssociate

Requires addressId from customer addresses. Use customerAddressCreate if address is new. Pass checkoutId, addressId, customerAccessToken (if logged in).

4. shippingQuotes

Query with checkoutId and useSelectedAddress: true. Returns list of shippingQuoteId, name, type, value, deadline. See references/shipping.md.

5. checkoutSelectShippingQuote

Pass checkoutId, shippingQuoteId. For pickup store, add additionalInformation: { document, name }. For delivery schedule, response includes deliverySchedule. See references/pickup-store.md, references/delivery-schedule.md.

6. checkoutAddCoupon (Optional)

Pass checkoutId, coupon, customerAccessToken (if logged in). Fails for invalid or expired coupons—handle errors and inform user.

7. paymentMethods

Query with checkoutId. Returns id, name, imageUrl. See references/payment.md.

8. checkoutSelectPaymentMethod

Pass checkoutId, paymentMethodId. Response includes installments; select installment if applicable.

9. checkoutComplete

Pass checkoutId, paymentData (method-specific, e.g. CPF/phone for boleto), comments (optional), customerAccessToken (if logged in). Returns orders with orderId, orderStatus, payment (invoice, pix, etc.).

Error Handling

  • No checkoutId: Create checkout first via createCheckout.
  • Guest checkout: Skip checkoutCustomerAssociate; omit customerAccessToken where optional.
  • Invalid coupon: checkoutAddCoupon fails; surface user-friendly message; do not retry silently.
  • Missing address: Call checkoutAddressAssociate before shippingQuotes (useSelectedAddress requires address).

References

  • Shipping: shippingQuotes, checkoutSelectShippingQuote
  • Payment: paymentMethods, checkoutSelectPaymentMethod
  • Pickup store: additionalInformation
  • Delivery schedule: agendamento
  • Wake Commerce: processo-de-fechamento-de-pedido

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.