Consent Docs

Consent import file

Columns, value formats, limits and every row outcome and reason when you import consent from a CSV file or with collectedAt.

Reference5 min readFor anyone looking something up

What a file for Records โ†’ Import CSV must hold, and what each row's result means. The task is in Import consent from a file.

File rules#

Rule Detail
Encoding UTF-8, with or without a byte order mark. A file that does not read as UTF-8 is refused: save it as CSV UTF-8.
Header The first row names the columns. Every later row is one person.
Delimiter A comma, semicolon or tab, whichever occurs most in the header row.
Quotes Double quotes around a cell that holds the delimiter or a line break. "" inside quotes is one quote. A quote never closed stops the file.
Apostrophes An apostrophe before =, +, - or @, written by a spreadsheet to stop a formula, is removed.
Size Up to 50 MB and 100,000 rows.
Where it is read In your browser. Only the mapped values reach the server, in batches of 250 rows. The file is not stored.

Columns#

Field Required Holds
Identifier Yes The person's customer id, email address, phone number or device id. You choose the type.
More identifiers No Up to five more columns, each with its type. The record can be found, withdrawn and erased by any of them.
Consent date Yes When the person consented, in the chosen date format.
One field for each purpose that is not always on Yes The answer, or Granted for every row or Refused for every row.
Expiry date (optional) No When the consent ends. Without it, the record expires after the form's term, counted from the day of import.
Last activity (optional) No When the person last used your service. Without it, the day of import. Used by Erase after inactivity.
Language (optional) No A language tag, or one language for every row.
Country (optional) No A two-letter country code, or one country for every row. It decides the law named on the record.
Notice reference (optional) No The notice each person saw, or the reference set for the whole file. The SHA-256 of the Notice file (optional) chosen with the file is sealed only on rows whose reference is empty or the same as the reference set for the whole file. A row naming another notice is sealed without a SHA-256.

Column names such as cif, customer id, email, mobile, consent date, expiry date, language, country and the purpose's key or name are matched for you. You can change every match.

Phone numbers must be in international format, + then 7 to 15 digits, such as +919876543210.

Answer values#

Read as Values, in any case
Granted yes, y, true, 1, granted, allowed, agreed
Refused no, n, false, 0, refused, declined, denied

Any other value is reported as UNREADABLE_ANSWER, never guessed.

Date formats#

Format Example
YYYY-MM-DD 2019-03-14
DD/MM/YYYY 14/03/2019
DD-MM-YYYY 14-03-2019
MM/DD/YYYY 03/14/2019
ISO 8601 with time 2019-03-14T10:00:00+05:30
  • A time after the date is read as HH:mm or HH:mm:ss.
  • A date without its own offset is read in the time zone you choose, UTC+05:30 (India) unless you change it.
  • The same format and time zone apply to the expiry and last activity columns.

Row outcomes#

Outcome Shown as Meaning
CREATED New records A new record is written.
UPDATED Records that get a newer answer The person's record gets this newer answer.
SKIPPED Skipped The records already say more. Nothing is written.
FAILED Cannot be imported The row has a problem. Nothing is written.

Download problem rows gives every skipped and failed row with its original columns, plus row, outcome, reason and message. It never holds rows that were written.

Reasons#

Reason What it means What to do
CONSENT_WITHDRAWN_ON_RECORD The person withdrew on this form. An earlier answer never replaces a withdrawal. Nothing. If they consented again, record it as a new answer.
CONSENT_ALREADY_ON_RECORD An answer with this exact date is on record: the row was imported before. Nothing.
CONSENT_NEWER_ON_RECORD A newer answer is on record. Nothing.
CONSENT_ERASED_ON_RECORD The person was erased at or after this date. Nothing. Do not bring them back.
CONSENT_HELD_UNDER_OTHER_IDENTIFIER Under an identifier the row names or one linked to it, the person withdrew or has the same or a newer answer. Nothing.
PHONE_NOT_E164 A phone number is not in international format. Write it as +919876543210.
SPREADSHEET_NUMBER A spreadsheet turned the value into a number, such as 9.19876E+11 or a date serial. Format the column as text and export it again.
UNREADABLE_DATE The date does not match the chosen format. Choose the right Date format, or fix the cell.
UNREADABLE_ANSWER The answer is not one of the values above. Fix the cell.
MISSING_IDENTIFIER The identifier cell is empty. Fill it, or remove the row.
ROW_TOO_SHORT The row has fewer cells than the header. Fix the row.
NOTICE_REFERENCE_INVALID The notice reference has characters other than letters, digits, spaces and . _ : / # ( ) -. Fix the cell.
INVALID_COLLECTED_AT The consent date is in the future or before 1990. Fix the date.
INVALID_EXPIRES_AT The expiry is past, or more than 3,650 days ahead. Fix the date, or leave the column out.
INVALID_LAST_ACTIVITY_AT Last activity is before the consent date or in the future. Fix the date.
INVALID_PURPOSE_DECISIONS, INVALID_PARTNER_DECISIONS The answers do not match the form version. Map every purpose.
INVALID_ROW A value is too long or of the wrong kind. fields names it. Fix the cell.
DAILY_LIMIT_REACHED The project's records for the day are used up. Run the same file again the next UTC day.
WRITE_FAILED The server could not write the row. Run the same file again. Rows already written are skipped.

The first five reasons are skips: the same 409 codes a write with collectedAt returns. See Errors.

Limits#

Limit Default
Rows in one file 100,000, set by CONSENT_IMPORT_MAX_ROWS
Rows in one batch 250
Records imports may write in a project in one UTC day 100,000, set by CONSENT_IMPORT_DAILY_ROWS
Imports writing at the same time in a project One
A writing import with no batch for 30 minutes Stopped, and consent.imported is sent
A check that is not written within 24 hours Discarded
Column mapping 16 KB of JSON

โ†‘โ†“ to move, Enter to open