Commerce Customer Service
Coordinate cross-domain customer support workflows.
How It Works
- Identify the customer and related orders or carts.
- Resolve the request using orders, returns, inventory, or checkout tools.
- Confirm outcomes and provide next steps.
- Document any exceptions or manual follow-up.
- Tag the interaction with resolution codes for reporting and playbook refinement.
Status Flows
- Ticket: open -> in_progress -> awaiting_customer -> resolved -> closed
- Return: requested -> approved -> items_received -> refunded
- Refund: pending -> processing -> completed | failed
Usage
- CLI: use
stateset in natural language with --apply for writes.
- MCP tools span customers, orders, products, inventory, returns, and carts.
Permissions
- Read: lookups across customers, orders, returns, carts — no
--apply needed.
- Write:
returns create, refund issue, ticket updates — requires --apply.
Examples
stateset "look up order ORD-123 for customer cust_456"
stateset returns create --order ORD-123 --reason "wrong size" --apply
stateset refund issue --order ORD-123 --amount 49.99 --apply
stateset tickets list --status open --customer cust_456
Output
{"status":"resolved","customer_id":"cust_123","order_id":"ord_123","resolution_code":"refund_issued","agent":"auto","elapsed_ms":1240}
Present Results to User
- Actions taken across domains.
- Key identifiers (customer, order, return, cart).
- Any remaining follow-up required.
- Resolution code and total handling time.
Troubleshooting
- Missing identifiers: ask for email, order number, or cart ID.
- Conflicting statuses: verify latest order or return state before acting.
resolution_code empty: ensure the playbook maps the issue type to a code in customer-service-playbooks.md.
- MCP tool timeout: retry with
--timeout 30000; check stateset daemon health via stateset status.
Error Codes
CS_MISSING_IDENTIFIER: Customer email, order number, or cart ID is required to proceed.
CS_RESOLUTION_UNMAPPED: The issue type has no mapped resolution code in the playbook.
CS_TICKET_CONFLICT: Ticket status conflicts with the requested action; verify current state.
Related Skills
- commerce-orders -- look up or transition order status during support.
- commerce-customers -- resolve customer identity and profile data.
- commerce-sync -- verify event delivery when a customer reports missing updates.
- commerce-autonomous-engine -- check scheduled jobs that auto-resolve common tickets.
References
- references/customer-service-playbooks.md
- /home/dom/stateset-icommerce/cli/.claude/agents/customer-service.md
1---2name: commerce-customer-service3description: Handle customer service operations for iCommerce. Use when managing tickets, order issues, returns, refunds, or support playbooks.4---56# Commerce Customer Service78Coordinate cross-domain customer support workflows.910## How It Works11121. Identify the customer and related orders or carts.132. Resolve the request using orders, returns, inventory, or checkout tools.143. Confirm outcomes and provide next steps.154. Document any exceptions or manual follow-up.165. Tag the interaction with resolution codes for reporting and playbook refinement.1718## Status Flows1920- **Ticket:** open -> in_progress -> awaiting_customer -> resolved -> closed21- **Return:** requested -> approved -> items_received -> refunded22- **Refund:** pending -> processing -> completed | failed2324## Usage2526- CLI: use `stateset` in natural language with `--apply` for writes.27- MCP tools span customers, orders, products, inventory, returns, and carts.2829## Permissions3031- Read: lookups across customers, orders, returns, carts — no `--apply` needed.32- Write: `returns create`, `refund issue`, ticket updates — requires `--apply`.3334## Examples3536```bash37stateset "look up order ORD-123 for customer cust_456"38stateset returns create --order ORD-123 --reason "wrong size" --apply39stateset refund issue --order ORD-123 --amount 49.99 --apply40stateset tickets list --status open --customer cust_45641```4243## Output4445```json46{"status":"resolved","customer_id":"cust_123","order_id":"ord_123","resolution_code":"refund_issued","agent":"auto","elapsed_ms":1240}47```4849## Present Results to User5051- Actions taken across domains.52- Key identifiers (customer, order, return, cart).53- Any remaining follow-up required.54- Resolution code and total handling time.5556## Troubleshooting5758- Missing identifiers: ask for email, order number, or cart ID.59- Conflicting statuses: verify latest order or return state before acting.60- `resolution_code` empty: ensure the playbook maps the issue type to a code in `customer-service-playbooks.md`.61- MCP tool timeout: retry with `--timeout 30000`; check `stateset` daemon health via `stateset status`.6263## Error Codes6465- `CS_MISSING_IDENTIFIER`: Customer email, order number, or cart ID is required to proceed.66- `CS_RESOLUTION_UNMAPPED`: The issue type has no mapped resolution code in the playbook.67- `CS_TICKET_CONFLICT`: Ticket status conflicts with the requested action; verify current state.6869## Related Skills7071- **commerce-orders** -- look up or transition order status during support.72- **commerce-customers** -- resolve customer identity and profile data.73- **commerce-sync** -- verify event delivery when a customer reports missing updates.74- **commerce-autonomous-engine** -- check scheduled jobs that auto-resolve common tickets.7576## References77- references/customer-service-playbooks.md78- /home/dom/stateset-icommerce/cli/.claude/agents/customer-service.md