Rate Shopping

作者 goshippocf8e96532f24无许可证3 个星标收录于 2026年10月8日更新于 2026年10月8日仓库2周前更新

Compare multi-carrier shipping rates, find cheapest/fastest options, and get shipping recommendations via the Shippo API

仅含说明Business & Finance
AI 生成的概览

通过 Shippo API 比较多家承运商的运费,并推荐最便宜、最快或最具性价比的方案。

功能
指导智能体收集寄件信息、验证地址,并调用 Shippo 的 CreateShipment 获取运费数组,再以表格形式呈现承运商、服务等级、价格和预计天数。内容涵盖按速度筛选、指定币种运费、结账行项目运费、运费有效期以及国际运费问题。它还会计算最便宜、最快和最具性价比的选项,并说明它们之间的取舍。
适用场景
当用户想比较不同承运商的寄送方案、寻找最便宜或最快的配送方式,或需要针对包裹的寄送建议时使用。也适用于排查未返回运费的情况。
运行要求
需要访问 Shippo API 及其创建运单、地址验证、实时运费和币种运费等操作。不附带脚本,仅为说明文档。国际运费部分引用了海关指南文件(shippo/references/customs-guide.md)。
<!-- ⚠️ DO NOT EDIT. Auto-generated from skills/rate-shopping/SKILL.md by scripts/sync.js Edits here will be overwritten on the next sync. To change this content, edit the canonical source and re-run the sync script. -->

Rate Shopping and Comparison

Get Rates for a Shipment

  1. Collect: origin address, destination address, parcel (length, width, height, distance_unit, weight, mass_unit). All dimension and weight values must be strings (e.g., "10" not 10).
  2. Optionally validate both addresses with ValidateAddress (see Address Validation).
  3. Call CreateShipment with address_from, address_to (as inline address objects using v1 field names -- street1, city, state, zip, country -- not object IDs), and parcels.
  4. The response rates array contains available options. Present a table: carrier, service level, price, estimated days.
  5. Note: the same carrier may return duplicate rates from multiple carrier accounts. Present the best rate per carrier/service combination.
  6. Each rate carries an object_id. To buy a label, pass the chosen rate's object_id to the purchase flow (see Label Purchase); you do not re-send the address or parcel.

Rate Expiration

Rates expire after 7 days. If a user tries to purchase a rate that was retrieved more than 7 days ago, create a new shipment to get fresh rates.


Filter by Speed

Map user requests: "overnight" = estimated_days 1, "2-day" = estimated_days <= 2, "within N days" = estimated_days <= N. Filter the rates array accordingly. If nothing matches, show the fastest available option.


International Rates

Some carriers may return international rates without a customs declaration, but others will not. If no rates are returned, try attaching a customs declaration to the shipment. Some carriers also require a phone number on the destination address for international rate retrieval. Inform the user that customs will be required at label purchase time regardless. See shippo/references/customs-guide.md for customs details.


Checkout Rates (Line Items)

Call CreateLiveRate instead of CreateShipment. Accepts address_from, address_to, and line_items (each with title, quantity, total_price, currency, weight, weight_unit).


Rates in a Specific Currency

Call ListShipmentRatesByCurrencyCode with the preferred ISO currency code (USD, EUR, GBP, CAD, etc.).


Recommendation

Identify the cheapest (lowest amount), fastest (lowest estimated_days), and best-value options from the rates array. These are not API fields -- compute them by sorting the rates array yourself. State the trade-off: "Option A is $X cheaper but takes Y more days than Option B."


Troubleshooting: No Rates

  • Verify both addresses passed validation (most common cause).
  • Confirm parcel dimensions are reasonable (not zero, not exceeding carrier limits).
  • Shippo provides managed carrier accounts by default for major carriers. If no rates are returned, the issue is more likely address validation, unsupported route, or parcel dimensions -- not missing carrier accounts. You can verify with ListCarrierAccounts if needed.
  • Rates expire after 7 days. If stale, create a new shipment to get fresh rates.

Quick Reference

Get rates: (optional) ValidateAddress (x2) -> CreateShipment (with inline addresses) -> read rates array

来源与署名

来源:goshippo/ai位于providers/claude/plugin/skills/rate-shopping提交cf8e965

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架

更多来自 goshippo/ai 的技能

Upgrade Shippo

goshippo

指导 Shippo API 版本变更、Webhook 负载版本管理,以及托管 Shippo MCP 服务器的故障排查。

Software Development32周前更新

Tracking

goshippo

通过 Shippo API 跨承运商追踪包裹,包括物流轨迹和追踪 webhook。

Productivity & Workflow32周前更新

Shippo Support Ticket

goshippo

Generate a complete, auto-classified, ready-to-paste Shippo support ticket for a single shipment or label. Use when a support agent or customer needs to escalate a shipping issue (lost/delayed package, unused-label refund, billing/rate adjustment, address exception, customs hold, carrier-account, or tracking-webhook problem). Given a tracking number + carrier, a transaction (label) ID, or a shipment ID, it classifies the issue, runs the right read-only Shippo MCP lookups, computes the triage timeline, and emits both a copy-paste support message and a routing-tagged JSON block so the ticket lands in the right pipeline first time.

待分类32周前更新

Shippo Best Practices

goshippo

Guides Shippo integration decisions, choosing between Rates at Checkout vs. full Shipments+Transactions vs. Batch processing, address validation strategy (v1 vs v2 fields), domestic vs international workflows (customs declarations, incoterms), label format selection, and webhook setup. Use when planning, building, or reviewing any Shippo integration, including building checkout flows, bulk fulfillment pipelines, address validation, label generation, package tracking, customs handling, or webhook subscriptions.

待分类32周前更新

Shipping Analysis

goshippo

通过 Shippo API 分析运费、比较承运商、优化包裹尺寸并审查历史运费支出。

Business & Finance32周前更新

Label Purchase

goshippo

指导通过 Shippo API 购买国内、国际及退货运输标签,涵盖报关与退款。

Business & Finance32周前更新