Imported from stateset/icommerce-skills (
skills/commerce-customers/SKILL.md). Install upstream withnpx skills add stateset/icommerce-skills --skill commerce-customers. Copyright stays with the author.
Commerce Customers
Manage customer identity and profile data used across orders, carts, and analytics.
How It Works
- Find customers by email or ID.
- Create or update customer records.
- Use customer IDs for orders and carts.
- Report counts or segments as needed.
- Merge duplicate profiles and propagate the canonical ID to linked entities.
Status Flows
- Customer: lead -> active -> inactive -> archived
- Profile Merge: duplicate_detected -> merge_pending -> merged
Usage
- CLI:
stateset "list customers"orstateset-direct customers <action> - Writes require
--apply. - MCP tools:
list_customers,get_customer,create_customer.
Permissions
- Read:
list_customers,get_customer— no--applyneeded. - Write:
create_customer,merge_customers— requires--apply.
Examples
stateset customers list --limit 10
stateset customers get cust_123
stateset customers create --email jane@example.com --name "Jane Doe" --apply
stateset customers search --email jane@example.com
Output
{"status":"ok","customer_id":"cust_123","email":"customer@example.com","name":"Jane Doe","created_at":"2026-03-20T14:00:00Z"}
Present Results to User
- Customer identifiers and key fields updated.
- Any validation or deduping performed.
- Next steps (orders, carts, or segmentation).
- Merge actions taken and resulting canonical
customer_id.
Troubleshooting
- Customer not found: verify email or ID and search again.
- Duplicate email: merge or update the existing record via
merge_customerstool. create_customerfails: check required fieldsemail,namein the payload.- Stale profile data: run
sync_pullto fetch the latest from the sequencer.
Error Codes
CUSTOMER_NOT_FOUND: No customer record matches the given ID or email.DUPLICATE_EMAIL: A customer with this email already exists.MERGE_CONFLICT: Cannot merge; one or both profiles have pending orders.
Related Skills
- commerce-orders -- attach orders to the correct customer profile.
- commerce-customer-service -- resolve support tickets tied to a customer.
- commerce-sync -- ensure customer records are synchronized across nodes.
- commerce-embedded-sdk -- manage customers programmatically from app code.
References
- references/customer-commands.md
- /home/dom/stateset-icommerce/examples/cli-reference.md
- /home/dom/stateset-icommerce/cli/src/tools/customers.js