# Replay pack — KM client dossier 2026-07-15

Completes the KissMetrics fiche (socid 1) with the full contractual dossier and creates
the principal contact — erp#65 phase 1, triggered by operator direction 2026-07-15
(« il faut ces informations relatives au client KM dans Dolibarr »). Two ops:

1. **`thirdparty_update` socid 1** — identity/address/typology + the contract dossier in
   `note_public` (allowlisted dossier fields only; the op refuses anything ledger-side).
2. **`contact`** — Hendrik Rootering, COO, `hendrik@kissmetrics.io` (idempotent: dedupes
   by email, then lastname+firstname, so a replay can never mint a duplicate).

## Provenance — and the two truth fixes

Source: the operator's prepared payloads in erp trunk `test/kissmetrics_update.json` +
`test/hendrik_contact_fix.json`, cross-checked against the 2026-07-15 contract-facts
extraction (erp#53 comment). Two deliberate deviations from the WIP payloads:

- **The contract is NOT signed.** The WIP note said « contrat cadre signé 2026-04-23 » —
  the repo proves otherwise: the contract is *effect-dated* 2026-04-23 (rétro-daté), the
  eIDAS signature is **in progress** (signable set SAFE TO SIGN 2026-06-28; PR
  kissmetrics_contract_proposal#1 merged 2026-07-15, branch gone → repo state = `main`).
  The note also now carries: invoicing in **USD** (EUR lock 1.1650 removed 2026-06-28),
  the 4 % window = 6 months **post-launch** (not post-signature), CCIP-CA + CMAP dispute
  chain, Kissmetrics Holdings Inc wires, and **« US EIN : à collecter (→ idprof1) »** —
  the EIN is a [HUMAN] item (W-8BEN-E exchange is the natural moment); until then the
  `dolibarr-thirdparty-completeness` audit keeps showing exactly that one gap.
- **`poste`, not `soc2`.** The WIP contact payload carried the job title in `soc2`, which
  is not a Dolibarr field (the API silently drops it). The manifest uses `poste`;
  `contact-create.sh` refuses `soc2` outright.

## How to promote

```sh
cd .claude/skills/dolibarr-sandbox-write
scripts/promote-plan.sh  replay-packs/2026-07-15-km-dossier/manifest.json   # review
scripts/promote-apply.sh replay-packs/2026-07-15-km-dossier/manifest.json --target sandbox  # rehearse
# idempotency proof: apply twice — run 2 must print changed=0 (no-op) + deduped=true
```

**Prod step = the orchestrator's, human-gated — not this pack's job.** The prod replay
(`--target prod`) needs `DOLIBARR_PROD_WRITE_KEY` in the environment (never stored) and
`ARCO_PROMOTE_CONFIRM=I-UNDERSTAND-THIS-WRITES-PROD`, per ADR-0003. Pair with
`dolibarr-data-snapshot` before/after, then re-run `dolibarr-thirdparty-completeness` on
socid 1 — expected result: only the EIN gap remains.

## Rehearsal record (sandbox, 2026-07-15)

Run 1: fiche diff = `changed=1 [note_public]` (the sandbox already carried the WIP
payload — the diff IS the truth fix) + contact Hendrik created (id 3). Run 2:
`changed=0 (no-op)` + `deduped=true` (same id 3). Read-back: all 13 dossier fields
correct; note carries « SIGNATURE eIDAS EN COURS », « US EIN : à collecter »,
« FACTURÉ EN USD ». Full outputs in the phase-1 PR on erp#65.
