Retrieve the signed-in user's Walmart order history or My Items collection, or inspect Walmart's direct order-tracking page when delivery status is requested. Distinguish authenticated content from login, consent, bot, or blocked pages.
Use Cases
Use when the caller asks to see Walmart orders, order history, delivery status, or My Items. Use /orders for authenticated order history, /track for Walmart's direct tracking flow when the caller has the required tracking or order details, and /my-items when the caller specifically requests saved or favorited items. This skill assumes the browser session is already authenticated for /orders and /my-items. If authentication is required, stop and report it.
Automation Flow
- For authenticated order history or a known order already associated with the account, navigate directly to
https://www.walmart.com/ordersin the existing authenticated session. Do not visit the homepage or account page first. - For a delivery-status request where the caller has the information Walmart's tracking form requires, navigate directly to
https://www.walmart.com/track. Do not invent or expose order, tracking, or payment values; fill only caller-supplied values through the secure runtime if the page requests them. - If the caller specifically requests My Items rather than orders, navigate directly to
https://www.walmart.com/my-items. - Run the appropriate extractor below on the loaded page. For
/ordersor/my-items, use the authenticated collection extractor. For/track, use the tracking-page extractor. - If the page redirects to login, identity verification, consent, CAPTCHA, or
/blocked, report that state instead of treating the page as an empty order history or as a delivery result. A consent or interstitial dialog must be handled only when its action is unambiguously non-transactional, such as continuing shopping; do not submit order or payment actions automatically.
Authenticated order/My Items extractor (run with evaluate() on the loaded page):
(() => {
const clean = s => (s || '').replace(/\s+/g, ' ').trim();
const url = location.href;
const body = clean(document.body?.innerText || '');
const authRequired = /(?:account\/login|identity\.walmart\.com|verifyitsyou)/i.test(url) || /sign in|log in|enter your password|verify it'?s you/i.test(body);
const challenge = /captcha|verify you are human|access denied|blocked/i.test(body);
const pageType = /\/my-items(?:[/?#]|$)/i.test(location.pathname) ? 'my-items' : /\/orders(?:[/?#]|$)/i.test(location.pathname) ? 'orders' : 'other';
const textOf = el => clean(el?.innerText || '');
const titleOf = el => clean(el?.querySelector('h1,h2,h3,h4,[data-testid*="title" i],[data-automation-id*="title" i]')?.innerText || el?.querySelector('[aria-label]')?.getAttribute('aria-label') || textOf(el).split(/\n+/)[0]);
const records = [], seen = new Set();
const add = (type, el, href = '') => {
if (!el) return;
const text = textOf(el).slice(0, 1200);
if (!text) return;
const key = type + '|' + (href || text);
if (seen.has(key)) return;
seen.add(key);
const idMatch = href.match(/\/orders\/(\d[\d-]{4,})/) || text.match(/order\s*(?:number|#)\s*:?\s*([\d-]{5,})/i);
records.push({type, title: titleOf(el), orderId: idMatch?.[1] || null, href: href || null, text});
};
for (const link of [...document.querySelectorAll('a[href*="/orders/"]')]) {
const card = link.closest('[data-testid*="order" i],[data-automation-id*="order" i],article,li') || link;
add('order', card, link.href);
}
for (const node of [...document.querySelectorAll('[data-testid*="order" i],[data-automation-id*="order" i],article')]) {
if (/order|total|delivered|shipped|placed|arrives|delivery/i.test(textOf(node))) add('order', node, node.querySelector('a[href*="/orders/"]')?.href || '');
}
if (pageType === 'my-items') {
for (const link of [...document.querySelectorAll('a[href*="/ip/"]')]) {
const card = link.closest('[data-testid*="item" i],[data-automation-id*="item" i],article,li') || link;
add('item', card, link.href);
}
}
return {url, pageType, authRequired, challenge, authenticatedContent: !authRequired && !challenge && records.length > 0, records, visiblePageText: body.slice(0, 2000)};
})()Tracking-page extractor (run with evaluate() on the loaded /track page):
(() => {
const clean = s => (s || '').replace(/\s+/g, ' ').trim();
const url = location.href;
const body = clean(document.body?.innerText || '');
const blocked = /captcha|verify you are human|access denied|blocked/i.test(body) || /\/blocked(?:[/?#]|$)/i.test(location.pathname);
const loginRequired = /(?:account\/login|identity\.walmart\.com|verifyitsyou)/i.test(url) || /sign in|log in|enter your password|verify it'?s you/i.test(body);
const consent = [...document.querySelectorAll('[role="dialog"],dialog')].map(clean).filter(Boolean).slice(0, 5);
const fields = [...document.querySelectorAll('input,select,textarea')].map(el => ({type: el.type || el.tagName.toLowerCase(), name: el.name || null, id: el.id || null, label: clean(el.getAttribute('aria-label') || document.querySelector(`label[for="${CSS.escape(el.id || '')}"]`)?.innerText || '')})).filter(x => x.type !== 'hidden');
const lines = [...new Set(body.split(/\n+/).map(clean).filter(Boolean))];
const statusLines = lines.filter(x => /order|tracking|delivery|shipped|delivered|arrives|package|pickup|estimated/i.test(x)).slice(0, 40);
const links = [...document.querySelectorAll('a[href]')].map(a => ({text: clean(a.innerText), href: a.href})).filter(x => /track|order|delivery|shipment/i.test(x.text + ' ' + x.href)).slice(0, 30);
return {url, pageType: /\/track(?:[/?#]|$)/i.test(location.pathname) ? 'track' : 'other', blocked, loginRequired, consent, fields, statusLines, links, visiblePageText: body.slice(0, 2500)};
})()Possible Friction Points
- Walmart exposes direct authenticated routes at
/ordersand/my-items;/accountis an intermediate account page and is unnecessary for this task. - Walmart's direct tracking entry point is
https://www.walmart.com/track. It may require caller-supplied order or tracking information and may show an interstitial before the tracking form. /ordersis the shortest route for account order history./my-itemsis the alternate route for saved or favorited products.- Order cards may expose detail links under
/orders/; use those links when available rather than guessing order identifiers. - Walmart may render an authenticated page with no order records for a genuinely empty history. Distinguish that from login, identity verification, consent, CAPTCHA, or blocked content using the returned flags and visible text.
- A navigation to
/blocked, an access-denied message, or a CAPTCHA is an execution-environment outcome, not evidence about delivery status. - Tracking and delivery text can be location-, account-, and fulfillment-dependent. Report only visible status evidence and do not infer a delivered date from an absent field.
- Do not expose or persist order identifiers, tracking numbers, payment credentials, cookies, or tokens beyond what is needed to return the requested status. Never treat a redacted or unavailable value as a usable identifier.
- Order-card selectors and markup may change. The extractors prefer order-specific data attributes and order-detail links, then fall back to article elements and visible text.
- The browser must retain the caller's authenticated session and configured proxy or stealth context when required.
Example Result
{
"url": "https://example.com/track",
"pageType": "track",
"blocked": false,
"loginRequired": false,
"consent": [
"Example dialog"
],
"fields": [
{
"type": "text",
"name": "tracking",
"id": "tracking-input",
"label": "Tracking number"
}
],
"statusLines": [
"Example order arrives soon"
],
"links": [
{
"text": "Track order",
"href": "https://example.com/track/order"
}
],
"visiblePageText": "Example order\nTracking information\nExample order arrives soon"
}