{"schema_version":"2.0","record_type":"article","canonical_url":"https://marketingwiki.ai/articles/csv-email-field-type-fixture","id":"csv-email-field-type-fixture","slug":"csv-email-field-type-fixture","title":"Preserve Contact Field Meaning Through CSV Import","description":"Test leading zeros, date-like identifiers, quoted commas and custom-column mapping before imported fields shape Migma email audiences.","dek":"Compare raw CSV, mapping preview and stored values before audience use.","category":"Email Data","topics":["Migma","CSV import","contact fields"],"publishedAt":"2026-09-14","updatedAt":"2026-09-14","lastVerifiedAt":"2026-09-14","readingMinutes":4,"author":"Marketing Wiki Research Automation","reviewer":null,"featured":false,"sources":[{"title":"Migma: CSV import","url":"https://docs.migma.ai/audience/csv-upload?utm_source=marketingwiki&utm_medium=referral&utm_campaign=csv-email-field-type-fixture"}],"wordCount":691,"body":"Before importing contacts into Migma, prove that the CSV path preserves the meaning of custom fields. A member code that loses its leading zeros or a custom column that maps to a standard field can produce the wrong audience or personalization even when the email address imports successfully.\n\n> **Editorial disclosure:** Prepared by Marketing Wiki Research Automation under standing direct-publication authorization and not independently reviewed. Product capabilities are vendor-documented unless labeled otherwise; sources were refreshed on September 14, 2026.\n\nMigma's [CSV guide](https://docs.migma.ai/audience/csv-upload?utm_source=marketingwiki&utm_medium=referral&utm_campaign=csv-email-field-type-fixture) documents automatic column mapping, custom fields and an import preview. We recommend using that review stage with deliberately difficult synthetic rows. The documentation does not guarantee that every source application and every custom value preserves the type your business intended.\n\n## Define meaning before opening the file\n\nTreat identifiers as identifiers. A membership code may contain only digits and still require every leading zero. A date-like reference may be a literal business label rather than a calendar date. A blank value may mean unknown rather than false.\n\nWrite the intended meaning next to each field before exporting it. This is especially useful when the file passes through an application that guesses types. Reopening a saved CSV can be a transformation step, not merely a way to inspect it.\n\nThe original fixture below uses reserved example addresses and contains no real contacts. It is for offline inspection first; importing it is a separate account action requiring your normal authorization.\n\n```csv\nemail,member_code,region_label,plan_code,source_note\nfixture1@example.com,00127,North,1E10,\"Workshop, morning\"\nfixture2@example.com,00004,South,03-04,\"Café visitor\"\nfixture3@example.com,,West,STANDARD,\"No member code supplied\"\n```\n\nFor this fixture, `00127`, `00004`, `1E10` and `03-04` are literal strings. Their business meaning does not depend on how a viewer chooses to display them.\n\n## Compare three stages\n\n| Stage | Evidence to preserve | Failure to catch |\n| --- | --- | --- |\n| Raw export | Exact file bytes and field contract | Lost zeros, damaged accents or broken quoted commas |\n| Mapping preview | Chosen field names and sample values | Custom column mapped to a standard field |\n| Stored contact | Actual saved values after an authorized test | Coercion, truncation or unexpected empty handling |\n\nMigma documents aliases for standard columns and says unrecognized names become custom fields. A source column called `name` should not be assumed to become a custom membership label. Give business-specific fields unambiguous names and review the mapping rather than trusting an apparently familiar header.\n\nThe guide says the preview shows the first five rows. Put a representative set of difficult values at the beginning of a dedicated test fixture. A clean first page of ordinary names does not exercise a comma, accent, leading zero or blank field found later in the real file.\n\n## Keep a lossless offline assertion\n\nA standard CSV parser can establish that the file itself still contains the intended strings:\n\n```python\nimport csv\nwith open(\"fixture.csv\", encoding=\"utf-8\", newline=\"\") as file:\n    rows = list(csv.DictReader(file))\nassert rows[0][\"member_code\"] == \"00127\"\nassert rows[0][\"plan_code\"] == \"1E10\"\nassert rows[0][\"source_note\"] == \"Workshop, morning\"\nassert rows[1][\"source_note\"] == \"Café visitor\"\nassert rows[2][\"member_code\"] == \"\"\n```\n\nThose assertions were executed locally against the exact synthetic fixture. They prove only the offline parser round-trip. They do not prove Migma storage behavior, a spreadsheet application's export behavior or successful audience segmentation.\n\n## Do not use a reimport as an assumed repair\n\nMigma's guide says existing contacts are skipped rather than updated during this CSV import path. If an authorized test already created an incorrect value, uploading a corrected file may not change it. Inspect the existing record and use the appropriate supported edit process instead of interpreting a completed import as a successful correction.\n\nAfter a stored-value check passes, test the specific use of the field. A string comparison for a member code and a numeric comparison for a purchase amount require different contracts. Do not force a business identifier into numeric form simply to make a filter convenient.\n\nThis guide addresses data shape. The [validation and permission matrix](/articles/email-validation-permission-state-matrix) addresses whether a contact may receive marketing. Passing this fixture grants no sending permission. Start with the custom field whose corruption would cause the most consequential wrong message, and trace it through all three stages."}