You can import up to 5 CSV files that will be converted to reference sets in your Connect subscription. If the default limit is insufficient, it is possible to extend it up to 25 on request.

File requirements

  • Maximum size - 5 GB
  • Format - CSV, comma-separated
  • Encoding - UTF-8
  • Phone numbers. If a file contains phone numbers, they must be formatted according to the ISO E.164 standard: +[country code][area code][phone number]. No spaces, dashes or special characters are allowed.
  • Dates. If a file contains dates, they must in the UTC format (YYYY-MM-DDTHH:mm:ssZ). 2024-11-01T16:04:38Z
  • The header row is optional.

Initial setup

To start importing reference sets, you need to establish access to our SFTP server.

  1. Run the following command in your terminal emulator.
ssh-keygen -t ed25519 -C "Acoustic.com - Connect key" -f key
  1. Find two files in your user folder: a private key (key) and a public key (key.pub).
  2. Log in to your Acoustic Connect account, click on your user icon in the upper-right corner and then select Edit profile.
Access to profile editing
  1. Scroll down to the SSH Key section and upload your key.pub file there.
  1. Click on the Apps icon in the upper-right corner and then select the hamburger icon next to your subscription. Click Copy subscription ID. Keep the ID handy for the upcoming steps.
  1. Create a new connection in an FTP client such as FileZilla. The settings are described below.
Site Manager in FileZilla
  1. Navigate to the directory allocated for your subscription. For example, if your subscription ID is 000000000X, then the directory will be named sub_000000000X.
  2. (optional) Create a sub-directory for reference sets.
  3. Upload your files.

📘

Note

When the import job is completed, the files will be deleted from the SFTP server.

Settings for the SFTP connection

Host

Use a host associated with your Connect domain

Connect domainSFTP host
prod-us-east-1s-acca2da9ec374c47b.server.transfer.us-east-1.amazonaws.com
prod-eu-central-1s-0f495b8f35324396a.server.transfer.eu-central-1.amazonaws.com
prod-ap-southeast-2s-9596192dde684690a.server.transfer.ap-southeast-2.amazonaws.com

Other settings

  • Protocol: SFTP – SSH File Transfer Protocol
  • Port: 22
  • Logon type: key file
  • Key file: specify a path to the private key file on your hard drive
  • User: the username that you sign in to Acoustic Connect with.

Example

Let's say you want to import order history to Connect and later link each order to a contact in your audience.

Order IDClient IDAmountDateFirst-time purchaseDiscount coupon
8783845HX-18900123623.702024-11-01T16:04:38ZTRUEFALL2024
8758175HD-92590022104.902024-11-01T16:04:38ZTRUEN/A
8130627HO-52900998930.672024-11-01T16:04:38ZFALSEN/A
8864985HX-25900860811.102024-10-31T21:15:38ZTRUEBLACKFRIDAY
8648971HM-22800560424.002024-10-31T20:36:55ZFALSESAVE30
8794467HA-221001091015.152024-10-31T20:02:17ZFALSEN/A
8794438HH-875004451013.802024-10-31T19:17:56ZFALSEN/A
8791438HM-22800560485.252024-10-31T16:40:05ZTRUEBLACKFRIDAY

Mutation structure

Once the file has been uploaded to the server, you can run a mutation to import the file to Connect.

mutation ($importInput: ImportInput!) {
  createImportJob(importInput: $importInput) {
    id
  }
}
{
  "data": {
    "createImportJob": {
      "id": "1fbe6f9e-572e-4849-1111-00000x00000x"
    }
  }
}

The mutation requires a JSON object.

{
  "importInput": {
    "dataSetName": "Orders",
    "dataSetType": "REFERENCE_SET",
    "attributes": {
      "create": [
        {
          "name": "Order ID",
          "type": "TEXT",
          "identifyAs": {
            "key": true
          }
        },
        {
          "name": "Client ID",
          "type": "TEXT"
        },
        {
          "name": "Amount",
          "type": "NUMBER",
          "decimalPrecision": 2
        },
        {
          "name": "Date",
          "type": "DATE"
        },
        {
          "name": "First-time purchase",
          "type": "BOOLEAN"
        },
                {
          "name": "Discount coupon",
          "type": "TEXT"
        }
      ]
    },
    "jobName": "Add orders",
    "importType": "CREATE",
    "fileLocation": {
      "type": "SFTP",
      "filename": "orders.csv",
      "folder": "reference-sets"
    },
    "skipFirstRow": true,
    "mappings": [
      {
        "columnIndex": 1,
        "attributeName": "Order ID"
      },
            {
        "columnIndex": 2,
        "attributeName": "Client ID"
      },
            {
        "columnIndex": 3,
        "attributeName": "Amount"
      },
            {
        "columnIndex": 4,
        "attributeName": "Date"
      },
            {
        "columnIndex": 5,
        "attributeName": "First-time purchase"
      },
                  {
        "columnIndex": 6,
        "attributeName": "Discount coupon"
      }
    ]
}

Arguments

Arguments required by the createImportJob mutation:

ArgumentValuesDefinition
importInput$importInputA JSON object with import settings

Parameters supported by the importInput object

FieldNested fieldValuesRequired?Definition
attributescreateArray of objectsRequiredCreate an object for each column you want to import. The column headers will be converted to attributes in Connect.

The header that uniquely identifies the rows must be marked as the key.
dataSetNameString (up to 25 characters)RequiredThe name you want to assign to the new reference set
dataSetTypeREFERENCE_SETRequiredThe type of data set you are importing
fileLocationfilenameStringRequiredThe name and extension of the file
folderStringRequiredThe folder or subfolder on the SFTP server where the file is located
typeSFTPRequiredThe method of file delivery
importTypeCREATERequired The method of file processing.

The CREATE method creates a reference set in your Connect subscription, adds attributes (column headers) and rows to it
jobNameStringRequiredThe name you want to assign to the import job
mappingsArray of objectsRequiredCreate an object for each column you want to import to Connect.
notificationschannelEMAILOptionalThe media channel to send the notification through.

Skip this field if you don't want to receive a notification when the import job is complete.
destinationStringOptionalThe email address for notification delivery.

Skip this field if you don't want to receive a notification.
skipFirstRowBoolean. Default value - false. OptionalSet the value to true if the file has a header row.

Fields supported by objects within the attributes field:

FieldNested fieldValuesRequired?Definition
decimalPrecisionIntegerOptional For numeric attributes, you can specify the number of decimal places after the separator.
identifyAskeyBooleanOptional Use this field to mark the key column that uniquely identifies the rows.
nameStringRequiredThe name of the attribute
typeOne of the following values:

- TEXT
- NUMBER
- BOOLEAN
- DATE
RequiredThe data format of the attribute

Fields supported by objects within the mappings field:

FieldValuesRequired?Definition
attributeNameStringRequiredThe name of the attribute in the reference set that the column will be mapped to
columnHeaderStringOptionalThe name of the column in the import file.

If you choose to identify the column using columnHeader, do not submit the columnIndex value (it would result in a conflict).
columnIndexIntegerOptional The index number of the column in the import file.

If you choose to identify the column using columnIndex, do not submit the columnHeader value (it would result in a conflict).

Fields

Fields returned by the createImportJob mutation:

FieldValuesDefinition
idIDThe ID assigned to the import job

Further steps

Now you can connect the reference set to the audience or to another reference set. For instructions, see Connect reference sets.