# Sap Commerce Hac

> Use when investigating live SAP Commerce data through HAC with read-only FlexibleSearch, SQL, or Groovy. Trigger for cart/customer/order/address lookup, routing and delivery checks, model-field verification, and repeatable HAC automation from terminal workflows.

- Skill: `commerce-cloud-integrations/sap-commerce-hac` (Agent Skill, multi-file: 11 files)
- Install (CLI): `npx skillmds@latest add commerce-cloud-integrations/sap-commerce-hac`
- Raw SKILL.md: https://api.skillmd.com/api/skills/commerce-cloud-integrations/sap-commerce-hac/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- Author: commerce-cloud-integrations (https://skillmd.com/u/commerce-cloud-integrations)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/commerce-cloud-integrations/sap-commerce-hac

---


# SAP Commerce HAC

## Overview

Use this skill for live-data investigation through HAC while keeping operations read-only and reproducible.

## Trigger Checklist

Use this skill when one or more are true:

- you need current environment truth from HAC (not static config assumptions)
- you need read-only FlexibleSearch/SQL lookup for carts, customers, orders, addresses, routes, or delivery modes
- you need Groovy to navigate model relations that are awkward in joins
- you need a repeatable headless HAC run from terminal tooling

## Safety Rules

- Use read-only operations unless the user explicitly asks for writes.
- Use Groovy in rollback mode.
- Do not run ImpEx imports, model saves, updates, deletes, or direct writes.
- Verify actual model qualifiers before querying.

## Progressive Disclosure

Load only what the task needs:

- `references/query-playbook.md` for investigation flow patterns
- `references/flexible-search-patterns.md` for query structure
- `references/groovy-patterns.md` for model-navigation scripts
- `references/model-gotchas.md` for qualifier/relation pitfalls
- `scripts/hac_run_groovy.sh` for headless execute-once Groovy runs

## Investigation Workflow

1. Verify type/qualifier names from code before querying.
2. Start with the narrowest exact lookup (code/uid/email/zip/store).
3. Expand scope only if exact lookup fails.
4. Prefer Groovy when relation traversal is complex.
5. Separate candidate discovery from rule evaluation.
6. Return concise conclusions with supporting identifiers.

## Reporting Style

- Lead with conclusion first.
- Explain root cause before mechanics.
- Include concrete valid/invalid examples when relevant.
- Keep uncertainty explicit and minimal.

