Import consents

You can import user consents via the ReachFive Console just as you would import user profiles. This helps speed up importing user information and avoids manual work in ensuring consents are related to the specific user.

You can import all user consents in one file.

Import consents from the ReachFive Console

Follow the instructions below to import user consents from the ReachFive Console.

Prerequisites

  • You must have access to the ReachFive Console.

  • You must have a Developer, Manager, or Administrator role.

  • You must have the Import Jobs feature enabled.

  • Unless you choose the Force data update from file option, the following applies to importing user consents:

    • Updating an existing consent: The consent date value in the import file must be more recent than the consent in the existing user profile.

    • Adding a new consent: The consent date must be provided. There are no other conditions.

Instructions

The instructions below apply to both creating and editing an import job definition for user consents.

If editing an existing import job, be sure to select the edit icon instead of creating a new definition.
  1. Go to Settings  Import definitions.

  2. Select New definition.

  3. Under General, give the import job a name and description. Don’t forget to Enable the job.

  4. Under Source, choose the protocol you wish to use to import the file.

    • SFTP

    • S3

    • GCS

    1. Specify the Server host for the secure FTP site.

    2. Specify the Server port.

    3. Enter the User name for the server.

    4. Enter the Password for the server.

    5. Specify the Path where the import file is located.

      For example

      <serverhost>/path-to-file/consents.json.

    1. Specify the URL for the S3 bucket.

    2. Specify the name Bucket.

    3. Enter the Region for the server.

    4. Enter the Access key for AWS.

    5. Enter the Secret key for AWS.

    6. Specify the Path where the import file is located.

      For example

      <serverhost>/path-to-file/consents.json.

    1. Specify the Project ID for the Google Cloud Storage.

    2. Specify the App name.

    3. Enter the User name for the server.

    4. Specify the name Bucket.

    5. Enter the Credentials in JSON format.

    6. Specify the Path where the import file is located.

      For example

      <serverhost>/path-to-file/consents.json.

  1. Under Schedule, if desired, use a cron expression for scheduling the job.

  2. Under File format, select the file format type you wish to import. This will be either JSONL or CSV.

    • JSONL

    • CSV

    Choose the Encoding standard for your JSONL file.

    {
      "external_id": "1",
      "email": "foo@gmail.com"
    } \n (1)
    {
      "email": "bar@gmail.com",
      "name": "Joe",
      "gender": "M",
      "custom_fields": { (2)
          "has_loyalty_card": true
      },
      "consents": { (3)
        "exampleConsent": {
          "date": "2021-11-23T11:42:40.858Z",
          "consent_version": {
            "language": "fr",
            "version_id": 1
          },
          "granted": true,
          "consent_type": "opt-in",
          "reporter": "managed"
        }
      },
      "addresses": [ (4)
        {
          "id": 0,
          "default": true,
          "address_type": "billing",
          "street_address": "10 rue Chaptal",
          "address_complement": "4 étage",
          "locality": "Paris",
          "postal_code": "75009",
          "region": "Île-de-France",
          "country": "France",
          "recipient": "Matthieu Winoc",
          "phone_number": "0723538943",
          "custom_fields": {
            "custom_field_example": "custom_field_example_value",
            "custom_field_example_2": 42,
          }
        }
      ]
    }
    1 Each profile must separated by a line feed character (\n).
    2 Import custom_fields as an object containing a series of fields.
    3 Import consents as an object or as a flattened field with the format consents.<consent>.<parameter> shown below.
    ...
      "consents.cgu.date": "2021-09-03T19:08:01Z",
      "consents.cgu.granted": true,
      "consents.cgu.consent_version.version_id": 2,
      "consents.cgu.consent_version.language": "fr",
      "consents.cgu.consent_type": "opt-in",
      "consents.cgu.reporter": "managed"
    ...
    4 You can import addresses including custom address fields.
    Both the version language and version id must be part of the import file if you are updating a consent. If the imported consent is new, they are not required.
    1. Choose the Encoding standard for your CSV file.

    2. Enter your Delimiter. The default is ;.

    3. Enter your Quote char. The default is ".

    4. Enter your Escape character. The default is \.

    email,name,gender,custom_fields.has_loyalty_card,consents.newsletter.consent_type,consents.newsletter.granted,consents.newsletter.date,consents.newsletter.reporter,addresses.0.custom_fields.custom_field_example
    bar@gmail.com,Joe,M,true,opt-in,true,2018-05-25T15:41:09.671Z,managed,custom_field_example_value
    Both the version language and version id must be part of the import file if you are updating a consent. If the imported consent is new, they are not required.
  1. If desired, enable the End Job Notification Webhook.

    For more information on the webhook, see the End Job Notification Webhook page.
  1. Under Advanced:

    1. If desired, select testing mode.

    2. If importing LITE profiles only, select LITE profile only.

    3. If you want to force an update from file, select Force data update from file.

      If there are fields with values in the current ReachFive profile that are not in the import, these fields retain their current value. However, all fields with values replace the existing fields in ReachFive.