From 844be42151adcc8aa87ea11065ee656797acc421 Mon Sep 17 00:00:00 2001 From: Andy Grunwald Date: Sun, 24 May 2026 11:26:52 +0200 Subject: [PATCH] Document boolean and numeric CSV value typing The preceding commits taught the import worker to coerce custom CSV column values into JSON booleans and numbers via `coerceCustomValue` in `apps/api/src/jobs/import-processor.ts`. Without a corresponding docs update, users can't predict whether a cell like `01234` lands as a string or as the number `1234`, or which segment-filter operators a field will expose after import. Add two bullets to the existing "Rules and limits" list in the contact-import guide, adjacent to the **Date columns** bullet that already documents value typing for ISO 8601 dates. The bullets mirror that style and brevity: one names the boolean keyword set and the toggle it unlocks in segment filters, the other names the numeric pattern, the `gt`/`lt` operators it unlocks, and the deliberately preserved-as-string forms (leading zeros, `+`-prefixed, scientific notation) so users keep their IDs, zip codes, and phone numbers intact. No other content is touched. Closes the documentation gap for useplunk/plunk#390. Co-Authored-By: Claude Opus 4.7 (1M context) --- apps/wiki/content/docs/guides/importing-contacts.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/wiki/content/docs/guides/importing-contacts.mdx b/apps/wiki/content/docs/guides/importing-contacts.mdx index 2950fd6..82b9f07 100644 --- a/apps/wiki/content/docs/guides/importing-contacts.mdx +++ b/apps/wiki/content/docs/guides/importing-contacts.mdx @@ -37,6 +37,8 @@ In this example, every imported contact ends up with `data.firstName`, `data.pla - **Email column**: must be present and valid. Rows with missing or invalid emails are reported back as errors. - **Reserved column names**: `id`, `subscribed`, `createdAt`, `updatedAt`, and the auto-generated URL variables (`unsubscribeUrl`, etc.) are silently filtered out. Don't include them as columns. - **Date columns**: use ISO 8601 (`2026-05-06T12:00:00Z`) so they're typed as dates and become usable with `within` / `olderThan` segment operators. +- **Boolean columns**: `true`, `false`, `yes`, `no` (case-insensitive) are stored as booleans and get the boolean toggle in segment filters. +- **Numeric columns**: plain integers and decimals (`42`, `3.14`) are stored as numbers and become usable with `gt` / `lt` segment operators. Leading-zero values (`01234`), `+`-prefixed numbers, and scientific notation stay strings so IDs, zip codes, and phone numbers aren't corrupted. - **Existing contacts**: if a row's email matches an existing contact, the import **updates** the contact (merging the CSV's columns into `data`). It doesn't create a duplicate or overwrite the whole record. ## Importing your CSV