acp-intent-traces

Implement ACP intent traces — structured cart abandonment signals with reason codes for analytics and automated recovery workflows. Use when building abandonment tracking, recovery automation, or conversion optimization.

17 stars

Best use case

acp-intent-traces is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Implement ACP intent traces — structured cart abandonment signals with reason codes for analytics and automated recovery workflows. Use when building abandonment tracking, recovery automation, or conversion optimization.

Teams using acp-intent-traces should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/acp-intent-traces/SKILL.md --create-dirs "https://raw.githubusercontent.com/OrcaQubits/agentic-commerce-skills-plugins/main/acp-agentic-commerce/skills/acp-intent-traces/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/acp-intent-traces/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How acp-intent-traces Compares

Feature / Agentacp-intent-tracesStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Implement ACP intent traces — structured cart abandonment signals with reason codes for analytics and automated recovery workflows. Use when building abandonment tracking, recovery automation, or conversion optimization.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# ACP Intent Traces

## Before writing code

**Fetch live docs**:
1. Web-search `site:github.com agentic-commerce-protocol rfcs intent_traces` for the intent traces RFC
2. Fetch `https://developers.openai.com/commerce/specs/checkout/` for how intent traces integrate with checkout
3. Web-search `site:github.com agentic-commerce-protocol spec json-schema intent` for the schema

## Conceptual Architecture

### What Intent Traces Are

Intent traces are a **built-in ACP extension** that provides structured cart abandonment signals. When a buyer abandons a checkout, the agent sends a trace explaining why — enabling merchants to understand conversion barriers and automate recovery.

### 10 Reason Codes

| Code | Meaning |
|------|---------|
| `price_sensitivity` | Total was too expensive |
| `shipping_cost` | Shipping cost was a barrier |
| `shipping_speed` | Delivery time was too slow |
| `product_fit` | Product didn't match buyer's needs |
| `trust_security` | Buyer didn't trust the merchant/payment |
| `returns_policy` | Return/refund policy was inadequate |
| `payment_options` | Preferred payment method unavailable |
| `comparison` | Buyer is comparison shopping |
| `timing_deferred` | Buyer wants to purchase later |
| `other` | Doesn't fit other categories |

### How It Works

1. Buyer initiates checkout but doesn't complete
2. Agent detects abandonment (session timeout, explicit cancellation, navigation away)
3. Agent sends intent trace via `POST /checkout_sessions/{id}/cancel`, including a single `reason_code` (required enum string, exactly one per trace)
4. Merchant receives the trace and can:
   - Aggregate for analytics
   - Trigger automated recovery (email, discount offer)
   - Adjust pricing/shipping strategy

### Privacy Considerations

- Intent traces contain behavioral signals — handle per GDPR/CCPA
- Only collect traces when the buyer has consented to data collection
- Don't store personally identifiable information in trace metadata
- Aggregate traces for analytics rather than individual tracking

### Extension Negotiation

Like all extensions, intent traces must be negotiated:
1. Agent includes `intent_traces` in `capabilities.extensions[]`
2. Merchant confirms support
3. Only then are traces exchanged

### Use Cases

- Cart abandonment analytics dashboards
- Automated recovery email workflows
- Dynamic pricing based on price sensitivity signals
- Shipping strategy optimization
- A/B testing checkout flows
- Conversion funnel analysis

### Additional Trace Fields

- **`trace_summary`** — Optional free-text summary of the abandonment reason (max 500 characters)
- **`metadata`** — Optional flat key-value map for additional context (string keys and string values only)

### Write-Only Behavior

Intent traces are **write-only** — they are sent on the `POST /checkout_sessions/{id}/cancel` endpoint and are never echoed back in GET responses. This prevents information leakage and ensures traces are used only for analytics and recovery workflows.

### Best Practices

- Send traces on every abandonment — even `other` is better than no signal
- Each trace has a single `reason_code` (required enum string); if the buyer has multiple reasons, choose the most significant one
- Process traces asynchronously — don't block the cancellation flow
- Build aggregate dashboards before automated recovery
- Test trace collection end-to-end with the agent platform
- Respect buyer privacy — anonymize before long-term storage

Fetch the intent traces RFC for exact trace payload structure, reason code definitions, and integration points before implementing.

Related Skills

ap2-intent-mandate

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement the AP2 Intent Mandate — the human-not-present VDC that pre-authorizes agent purchases within defined constraints. Use when building autonomous agent shopping with user-signed intent, TTL, and constraint enforcement.

woo-testing

17
from OrcaQubits/agentic-commerce-skills-plugins

Test WooCommerce extensions — PHPUnit unit/integration tests, WP test suite, WooCommerce test helpers, E2E with Playwright, and WP-CLI test scaffolding. Use when writing tests for WooCommerce plugins or setting up a test environment.

woo-shipping

17
from OrcaQubits/agentic-commerce-skills-plugins

Build WooCommerce shipping methods — WC_Shipping_Method, shipping zones, shipping classes, rate calculation, tracking, and integration with carriers. Use when creating custom shipping integrations or configuring shipping logic.

woo-setup

17
from OrcaQubits/agentic-commerce-skills-plugins

Install WooCommerce, configure the development stack, and set up a local dev environment with WP-CLI, Docker, or wp-env. Use when setting up a new WooCommerce project or development environment.

woo-security

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement WooCommerce security — nonces, capabilities, input sanitization, output escaping, data validation, PCI compliance considerations, and WordPress security best practices. Use when hardening a WooCommerce store or reviewing security posture.

woo-plugin-dev

17
from OrcaQubits/agentic-commerce-skills-plugins

Create WooCommerce extensions/plugins — file structure, main plugin file, activation/deactivation hooks, custom database tables, autoloading, and WordPress plugin API. Use when building new WooCommerce extensions or structuring plugin code.

woo-performance

17
from OrcaQubits/agentic-commerce-skills-plugins

Optimize WooCommerce performance — object caching, transients, HPOS, database optimization, Action Scheduler, lazy loading, and query optimization. Use when improving store performance or diagnosing slowness.

woo-payments

17
from OrcaQubits/agentic-commerce-skills-plugins

Build WooCommerce payment gateways — WC_Payment_Gateway, direct/redirect/hosted integrations, tokenization, subscriptions support, refunds, and PCI compliance. Use when creating custom payment method integrations.

woo-hooks-filters

17
from OrcaQubits/agentic-commerce-skills-plugins

Master the WordPress hook system for WooCommerce — actions, filters, hook priorities, WooCommerce-specific hooks, and extensibility patterns. Use when adding functionality via hooks or understanding the WooCommerce execution flow.

woo-frontend

17
from OrcaQubits/agentic-commerce-skills-plugins

Customize WooCommerce frontend — template overrides, theme integration, shortcodes, hooks for product/cart/checkout display, and WooCommerce block themes. Use when modifying the storefront appearance or building WooCommerce themes.

woo-deploy

17
from OrcaQubits/agentic-commerce-skills-plugins

Deploy WooCommerce — WP-CLI automation, database migrations, zero-downtime updates, staging workflows, environment configuration, and CI/CD patterns. Use when deploying WooCommerce stores or setting up deployment pipelines.

woo-data-stores

17
from OrcaQubits/agentic-commerce-skills-plugins

Work with WooCommerce CRUD data stores — WC_Product, WC_Order, WC_Customer, WC_Coupon data objects, custom data stores, HPOS migration, and getters/setters. Use when creating or modifying WooCommerce data objects or implementing custom data stores.