# Create, edit, and delete a record

**Flow key:** `create-edit-delete-record`

## Outcome

An authorized user creates one valid record, can find and edit its current version, and deletes/restores it according to lifecycle and audit policy.

## Actors

- Authorized user
- Record service
- Search/index/cache
- Collaborators or automation

## Preconditions and entry points

- A synthetic tenant and role exist.
- Required fields, uniqueness, ownership, relations, and deletion policy are known.

## Required test data

Use synthetic, isolated, resettable data. Never use real credentials, payment instruments, private customer records, or production notifications.

| Data | Canonical valid seed | Critical variations |
|---|---|---|
| Record | name `CARBON Record 001`, status `Draft` | empty, boundary, emoji/emoticon, RTL, markup canary |
| Relations | owner current user, parent `CARBON-PARENT-001` | missing, deleted, unauthorized, other tenant |
| Versions | initial version then second-tab stale copy | concurrent edit, automation update |
| Lifecycle | active then archive/delete | restore, permanent purge, retention hold |
| Permissions | creator/editor | viewer, removed member, admin, other tenant |

## Canonical steps

Treat this as the ordinary successful path inferred from common product behavior. Adapt it to observed labels, business rules, APIs, and implementation evidence; do not invent a requirement.

| Step | User or system action | Expected evidence |
|---:|---|---|
| 1 | Open the creation entry point. | Defaults, required fields, ownership, and destination are accurate. |
| 2 | Enter valid fields and relations. | Validation is timely and preserves intended Unicode/content. |
| 3 | Submit once. | One record with stable ID, timestamps, owner, version, audit, and index state is created. |
| 4 | Find and open the record. | List/search/detail representations agree. |
| 5 | Edit from the current version. | One update commits; concurrent/stale conflicts are explicit. |
| 6 | Delete/archive and restore if supported. | Access, relations, indexes, notifications, retention, and audit follow the lifecycle policy. |

## Alternate paths

- Quick create
- Full form create
- Duplicate/template create
- Bulk edit
- Archive/soft delete/hard delete

## Failure and recovery paths

- Duplicate submit
- Uniqueness race
- Related record deleted
- Index lags write
- Delete partly fails or conflicts with automation

## Completion oracle

- The stated outcome is true in visible UI and authoritative persisted state.
- Exactly one intended business result and no unintended side effect occurred.
- Identity, tenant, authorization, money/data, lifecycle, notifications, integrations, analytics, and audit agree where applicable.
- Refresh, retry, back/forward, and a second authorized read do not reveal a contradictory result.
- Any partial, delayed, canceled, failed, or unknown outcome is labeled truthfully and has a safe recovery path.

## Evidence to capture

- Entry context, actor, tenant, role, feature flags, locale, time zone, and initial identifiers/state.
- Step-level screenshots or DOM state plus request/response, correlation, job, event, and stable business IDs where available.
- Before/after authoritative records, versions, totals, permissions, lifecycle states, and downstream side effects.
- Notifications, audit events, integration deliveries, retries, deduplication, latency, and recovery evidence.
- Untested branches, unsafe-to-run cases, product decisions, and evidence tier.

## Product decisions to resolve

- Exact eligibility, required data, authorization, and validation rules.
- Which steps are synchronous, asynchronous, optional, skippable, reversible, or irreversible.
- Idempotency, concurrency, timeout, retry, cancellation, and compensation semantics.
- Retention, privacy, notification, audit, performance, accessibility, and localization commitments.

## Related CARBON items

- [record integrity](../../items/records/record-integrity.md)
- [create](../../items/actions/create.md)
- [update](../../items/actions/update.md)
- [delete](../../items/actions/delete.md)
- [archive restore](../../items/actions/archive-restore.md)

[Back to Productivity and collaboration flows](index.md)
