Practical configuration for the Record runtime node (builder label: dataDatabase) covering CRUD, environment setup, idempotency, and operational safeguards.
When driver is `remote`, configure `RECORDS_REMOTE_BASE_URL`, optional `RECORDS_REMOTE_API_KEY`, and optional `RECORDS_REMOTE_TIMEOUT_MS` (default 5000).
`collectionSchema` supports field-level validation such as `required`, `enum`, `email`, and `phone`.
`uniqueKey` enables duplicate-safe writes and deterministic upsert behavior.
Choose the unique key by business object: `phone` for one profile per person, `appointmentId` or `bookingId` for repeated bookings, `orderId` for payments.
`idempotencyKey` provides replay-safe `create` and `upsert` flows (max 160 chars).
`encryptPii=true` with `piiFields` encrypts sensitive fields before storage.
`softDelete=true` retains deleted rows for recovery and audit workflows.
Role policy baseline: read for `OWNER|ADMIN|MEMBER|AGENT`; write for `OWNER|ADMIN|MEMBER`.
Runtime outcomes and guardrails
Route outcomes are `success`, `not_found`, `duplicate`, `validation_failed`, and `failed`.
These outcomes are available at `outputVar.status` for branch conditions.
`idempotencyKey` is validated for `create` and `upsert` only.
Always include tenant/workspace context from authenticated runtime state; never hardcode tenant IDs in node config.
For `find`, `update`, `upsert`, and `delete`, always pass a non-empty `where` filter to avoid validation failures.
Keep read limits bounded and set explicit sorting for high-volume list operations.
Prefer soft delete for reversible operations and keep audit logs enabled for mutating actions.
If you need multiple appointments per user, do not reuse the same phone-based unique key across every booking.
Operational Checklist
OKNode uses type `record` with valid action and collection.
OKEnvironment variables are configured for selected repository driver.
OKCollection schema exists and `uniqueKey` rules are consistent.
OKIdempotency key is used only for create/upsert and remains under 160 chars.
OKWhere filters are present for find/update/upsert/delete.
OKOutputVar is defined and tested in runtime debug.
OKRoute branches are connected for success, duplicate/not_found, validation_failed, and failed.