dist/codex/salesforce-commerce/skills/sf-customers/SKILL.md
Manage Salesforce Commerce customers — B2C (customer objects, customer groups, segmentation, SLAS authentication, wishlists) and B2B (Account/Contact, buyer groups, buyer permissions, self-registration). Both platforms share Data Cloud for unified customer profiles and consent management.
npx skillsauth add orcaqubits/agentic-commerce-claude-plugins sf-customersInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
CRITICAL: Always fetch live documentation BEFORE implementing customer management features.
B2C Commerce Customer APIs
SLAS Authentication
B2B Commerce Buyer Management
Data Cloud Integration
Why: Customer API versions, SLAS token flows, B2B permission models, and Data Cloud connector capabilities evolve frequently. Live docs ensure correct schemas and compliance with GDPR/CCPA.
| Object | Description | |--------|-------------| | Customer Profile | Registration data, preferences, custom attributes for personalization | | Addresses | Billing and shipping addresses with validation and default selection | | Payment Instruments | Tokenized payment methods (cards, wallets) -- never raw card data | | Order History | Past orders, returns, order status tracking | | Wishlists | Multiple product lists per customer; public, private, or shared visibility | | Custom Attributes | Extended profile fields for segmentation and personalization |
| Concept | Description | |---------|-------------| | Dynamic Groups | Auto-assigned based on attributes (VIP status, location, lifetime value) | | Static Groups | Manually assigned membership for targeted campaigns | | Group-based Pricing | Price books assigned to specific customer groups | | Group-based Promotions | Exclusive offers for specific segments | | Customer Segments | Rule-based segments for dynamic targeting and promotion qualification | | Customer Lists | Curated lists for marketing campaigns and email targeting |
| Flow | Purpose | |------|---------| | Guest Login | Anonymous shopper sessions for browsing and checkout | | Registered Login | Authenticated sessions with username/password | | Social Login | OAuth integration (Google, Facebook, Apple) | | Token Refresh | Session extension via refresh tokens | | Session Merge | Basket merge when guest converts to registered customer |
Token lifecycle: Access tokens have short TTL; refresh tokens extend the session. The Commerce SDK handles token refresh transparently. Store tokens securely (httpOnly cookies preferred over localStorage).
| Operation | Description | |-----------|-------------| | Profile CRUD | Create, read, update customer profiles | | Address Management | Add, update, delete, set default addresses | | Payment Instruments | Tokenize and store payment methods | | Password Management | Reset and update passwords | | Authentication | Login, logout, token refresh |
Fetch live docs for current SCAPI endpoint versions and request/response schemas before implementing.
| Feature | Description | |---------|-------------| | Multiple Lists | Customers can create and name multiple wishlists | | Item Operations | Add, remove, move items between lists | | Sharing | Share via email or link with configurable privacy | | Visibility | Public, private, or shared list settings |
| Object | Description | |--------|-------------| | Business Accounts | Company entities with tax IDs, credit terms, parent/child hierarchies | | Contacts | Individual users associated with accounts, with roles (purchaser, approver) | | Buyer Groups | Control product entitlements, catalog visibility, and price book access | | Buyer Permissions | Browse, add-to-cart, checkout, approval workflow, and budget controls | | Self-Registration | Portal user registration with account request workflow and verification | | Account Teams | Sales reps and support teams assigned to accounts |
| Permission | Controls | |------------|----------| | Browse | Product and price visibility | | Add to Cart | Ability to build orders | | Checkout | Ability to complete purchases | | Approval | Order approval for certain users/amounts | | Budget | Spending limits per user or group | | Quote Request | Ability to request quotes from sales |
Parent/child account relationships model enterprise structures. Child accounts inherit default settings from parents but can override pricing, catalog visibility, and shipping preferences. Contact roles (decision maker, influencer, purchaser) provide sales intelligence.
| Capability | Description | |------------|-------------| | Profile Unification | Merge B2C and B2B data into a single customer view via identity resolution | | Consent Management | GDPR/CCPA compliance -- capture, respect, and audit consent across categories | | Bi-directional Sync | Real-time for critical updates; batch for historical data loads | | Data Mapping | Field mapping between Commerce Cloud and Data Cloud schemas | | Conflict Resolution | Handle concurrent updates from multiple systems | | Profile Enrichment | Append third-party data to customer profiles |
| Category | Purpose | |----------|---------| | Marketing | Email, SMS, push notification consent | | Analytics | Browsing behavior and usage tracking | | Personalization | Product recommendations and content targeting | | Data Processing | General GDPR data processing consent |
All consent changes must be logged with timestamps for audit trail compliance. Honor right-to-be-forgotten requests with complete data deletion workflows.
Fetch the SCAPI Shopper Customers reference, SLAS authentication guide, B2B buyer management docs, and Data Cloud connector documentation for exact API schemas, token flows, and configuration before implementing.
development
Build with Spree's headless Next.js storefront — the official `spree/storefront` repo (Next.js 16 App Router with Server Actions and Turbopack, React 19 Server Components, Tailwind CSS 4, TypeScript 5, `@spree/sdk`, Sentry), server-only auth (httpOnly JWT cookies + publishable key), MeiliSearch faceted catalog, one-page checkout with Apple/Google Pay/Klarna/Affirm/SEPA, multi-region market routing, GA4 + JSON-LD SEO, and Vercel/Docker deployment. Use when forking or customizing the storefront, or evaluating headless adoption.
tools
Build Spree extensions as Rails engines — gem scaffolding, `bin/rails g spree:extension`, mounting routes/migrations/assets, the modern `prepend` decorator pattern (`*_decorator.rb` with `self.prepended(base)`), generators (`spree:model_decorator`, `spree:controller_decorator`), the four customization surfaces in preference order (Events > Webhooks > Dependencies > Decorators), Spree::Dependencies for swapping service objects, gem release/versioning, and the deprecated Deface engine. Use when building a reusable Spree extension or adding non-trivial customization to an app.
development
Build with Spree's event bus and Webhooks 2.0 — `Spree::Events` publication, `Spree::Subscriber` DSL with `subscribes_to` and `on`, wildcard matching, lifecycle events (`{model}.created/.updated/.deleted` via `publishes_lifecycle_events`), the canonical event catalog (order.*, payment.*, shipment.*, product.*), Webhooks 2.0 endpoints, HMAC-SHA256 signing (`X-Spree-Webhook-Signature`), exponential-backoff retries, and Sidekiq job orchestration. Use when wiring event-driven business logic, building webhook consumers, or replacing ActiveSupport callback chains.
tools
Cross-cutting Spree development patterns — the customization preference hierarchy (Events > Webhooks > Dependencies > Decorators), `Spree::Dependencies` service-object swapping, the `_decorator.rb` + `prepend` + `self.prepended` idiom, idempotent subscribers and webhook receivers, multi-store scoping discipline, prefixed IDs, calculator polymorphism (shipping/promotion/tax share the base), service-object composition with `dry-monads` or simple results, why to avoid `class_eval` reopening and Deface, and Spree-on-Rails idioms (Hotwire/Turbo Stimulus, ActiveStorage, Action Cable, Sidekiq). Use when designing the architecture of a Spree extension or solving cross-cutting concerns.