SuperAPI AI Directory

linkfox-sorftime-walmart-product-analysis

General & other

View repository

Updated 10-16 06:24

About this skill

Walmart Product Analysis

Use Sorftime to find Walmart US products by a natural-language name or inspect one product's detail, historical trend, or daily sales-volume series.

Core Concepts

  • Send exactly one operation per request. Never call all four operations as a default workflow.
  • Use searchByName to discover related products, detail for the current product summary, trend for historical product changes, and salesVolume for dated sales rows.
  • Every request uses a flat JSON body. searchByName requires name; the other operations require string productId. operation values are case-sensitive.
  • A follow-up operation or a different date range is another paid call. Reuse the 24-hour cache for identical JSON.

Operation Routing

Intent operation Parameters Sorftime Request
Find related products by name searchByName name, optional pageIndex 2
Current product details detail productId 1
Historical product trend trend productId 2
Daily/variant sales rows salesVolume productId, optional dates/page 1

Read references/api.md before calling for exact date and pagination rules.

Parameter Guide

  • Always treat productId as a string, even when it contains digits only.
  • searchByName accepts a natural-language product name and returns up to 100 related products per page; pageIndex defaults to 1.
  • salesVolume accepts optional queryDate and queryEndDate in yyyy-MM-dd. With neither, it returns the recent 30-day range; with only queryDate, the end defaults to the current day.
  • pageIndex applies to searchByName and salesVolume, starts at 1, and defaults to 1.
  • The current available historical range is controlled by Sorftime; do not promise a fixed earliest date.

How to Call

  • API Endpoint:POST /sorftime/walmart/productAnalysis(for full parameters/responses/error codes, see references/api.md)
  • Python Script:python scripts/sorftime_walmart_product_analysis.py '<JSON 参数>' [--inline]
  • Cost Constraints: This tool consumes compute; by default, the same parameter combination is called only once per session, and the script has a 24h local cache. On failure/empty results, do not automatically switch keywords, paginate, or change the zip code to probe repeatedly; if further retrieval is needed, first explain to the user that additional consumption will be incurred.

Output Strategy (Script Default Behavior):

  • Alwayswrite the full response to <cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-sorftime-walmart-product-analysis-<timestamp>.json(<cwd> is the working directory when the script is executed, which in Claude Code is the current project directory;<session> is taken from the environment variable SESSION_ID, automatically aggregated according to the user's task;writing to /tmp is prohibited, and if the current directory is not writable, report an error)
  • Response body ≤ 8 KB: after writing to disk, print the full JSON to stdout
  • Response body > 8 KB: after writing to disk, stdout outputs only a summary (top-level fields, common counts such as total/costToken, length of the largest list field + first 3 samples)
  • Add --inline to force full printing to stdout (also written to disk)

Data Reading Suggestions: First look at the summary to determine whether it is sufficient; when specific fields are needed, prefer to use jqorConvertFrom-Json to extract on demand from the saved json file, avoiding bringing the entire JSON into context.

Resolving Authentication and Compute Issues

When the following abnormal situations occur, use references/onboarding.md to guide resolution:

  • API Key not configured: the environment variable is not configured LINKFOX_AGENT_API_KEY, and LINKFOXAGENT_API_KEY
  • Response 401 or 402 status code
  • Response indicates insufficient compute or balance: the message contains "insufficient compute balance/insufficient billing/insufficient balance/quota exceeded/insufficient balance/package expired/recharge required/please recharge" or similar meaning

Usage Examples

python scripts/sorftime_walmart_product_analysis.py '{"operation":"searchByName","name":"wireless earbuds","pageIndex":1}'
python scripts/sorftime_walmart_product_analysis.py '{"operation":"detail","productId":"5169493923"}'
python scripts/sorftime_walmart_product_analysis.py '{"operation":"trend","productId":"5169493923"}'
python scripts/sorftime_walmart_product_analysis.py '{"operation":"salesVolume","productId":"5169493923","queryDate":"2026-07-01","queryEndDate":"2026-07-31","pageIndex":1}'

Display Rules

  1. State the operation and supplied product name or product ID, and show returned requestConsumed, costCredit, and costToken. If _cache.hit=true, make clear that the cached values describe the original live request and no new production charge occurred.
  2. For searchByName, label results as related products rather than exact matches and report the requested page.
  3. For detail, present only fields returned by the ProductSummeryObject; do not infer missing attributes.
  4. For trend, identify time fields and units from the response before summarizing changes.
  5. For salesVolume, interpret rows as [date, sales, type]; type=2 marks yesterday's sales record.
  6. Label estimates or observed values accurately; do not present them as guaranteed Walmart transactions.

Important Limitations

  • This integration targets Walmart US only.
  • The API accepts one product name or one product ID and one operation per call.
  • Sorftime controls historical coverage and data availability.
  • Pagination or a second operation creates another paid call and requires user authorization.
  • searchByName is natural-language related-product discovery, not a multi-filter product database or category-market query.

User Expression & Scenario Quick Reference

Applicable: finding Walmart products from a natural-language product name, or queries centered on a known ProductId and its details, trend, or sales history.

Not applicable: category market research, keyword metrics/reverse lookup, or multi-condition product filtering.

Boundary judgment: Use searchByName only when the user needs related products from a name; use detail for a current snapshot, trend for historical attributes, and salesVolume only for dated sales rows.

Compute Consumption Rules

Billed according to dynamic rules: a single Sorftime Request is currently shown as 6 compute; multi-Request operations are calculated by the gateway for the entire order and rounded, and the final amount is subject to the costCredit returned by the entry script; do not simply use requestConsumed × 6 in place of the actual bill.

Users pay fees due to compute consumption. Do not call another operation or the next page without confirmation.

Feedback:

Auto-detect and report feedback via the Feedback API when behavior or results mismatch intent, the user expresses praise or dissatisfaction, or an improvement is apparent. Follow references/api.md without interrupting the user's flow.


For more high-quality, professional cross-border e-commerce skills, visit LinkFox Skills.