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.
- Run the following command in your terminal emulator.
ssh-keygen -t ed25519 -C "Acoustic.com - Connect key" -f key
- Find two files in your user folder: a private key (key) and a public key (key.pub).
- Log in to your Acoustic Connect account, click on your user icon in the upper-right corner and then select Edit profile.
- Scroll down to the SSH Key section and upload your key.pub file there.
- 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.
- Create a new connection in an FTP client such as FileZilla. The settings are described below.
- Navigate to the directory allocated for your subscription. For example, if your subscription ID is
000000000X
, then the directory will be namedsub_000000000X
. - (optional) Create a sub-directory for reference sets.
- 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 domain | SFTP host |
---|---|
prod-us-east-1 | s-acca2da9ec374c47b.server.transfer.us-east-1.amazonaws.com |
prod-eu-central-1 | s-0f495b8f35324396a.server.transfer.eu-central-1.amazonaws.com |
prod-ap-southeast-2 | s-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 ID | Client ID | Amount | Date | First-time purchase | Discount coupon |
---|---|---|---|---|---|
8783845 | HX-18900123 | 623.70 | 2024-11-01T16:04:38Z | TRUE | FALL2024 |
8758175 | HD-92590022 | 104.90 | 2024-11-01T16:04:38Z | TRUE | N/A |
8130627 | HO-52900998 | 930.67 | 2024-11-01T16:04:38Z | FALSE | N/A |
8864985 | HX-25900860 | 811.10 | 2024-10-31T21:15:38Z | TRUE | BLACKFRIDAY |
8648971 | HM-22800560 | 424.00 | 2024-10-31T20:36:55Z | FALSE | SAVE30 |
8794467 | HA-22100109 | 1015.15 | 2024-10-31T20:02:17Z | FALSE | N/A |
8794438 | HH-87500445 | 1013.80 | 2024-10-31T19:17:56Z | FALSE | N/A |
8791438 | HM-22800560 | 485.25 | 2024-10-31T16:40:05Z | TRUE | BLACKFRIDAY |
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:
Argument | Values | Definition |
---|---|---|
importInput | $importInput | A JSON object with import settings |
Parameters supported by the importInput
object
Field | Nested field | Values | Required? | Definition |
---|---|---|---|---|
attributes | create | Array of objects | Required | Create 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. |
dataSetName | String (up to 25 characters) | Required | The name you want to assign to the new reference set | |
dataSetType | REFERENCE_SET | Required | The type of data set you are importing | |
fileLocation | filename | String | Required | The name and extension of the file |
folder | String | Required | The folder or subfolder on the SFTP server where the file is located | |
type | SFTP | Required | The method of file delivery | |
importType | CREATE | Required | The method of file processing. The CREATE method creates a reference set in your Connect subscription, adds attributes (column headers) and rows to it | |
jobName | String | Required | The name you want to assign to the import job | |
mappings | Array of objects | Required | Create an object for each column you want to import to Connect. | |
notifications | channel | EMAIL | Optional | The 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. |
destination | String | Optional | The email address for notification delivery. Skip this field if you don't want to receive a notification. | |
skipFirstRow | Boolean. Default value - false . | Optional | Set the value to true if the file has a header row. |
Fields supported by objects within the attributes
field:
Field | Nested field | Values | Required? | Definition |
---|---|---|---|---|
decimalPrecision | Integer | Optional | For numeric attributes, you can specify the number of decimal places after the separator. | |
identifyAs | key | Boolean | Optional | Use this field to mark the key column that uniquely identifies the rows. |
name | String | Required | The name of the attribute | |
type | One of the following values: - TEXT - NUMBER - BOOLEAN - DATE | Required | The data format of the attribute |
Fields supported by objects within the mappings
field:
Field | Values | Required? | Definition |
---|---|---|---|
attributeName | String | Required | The name of the attribute in the reference set that the column will be mapped to |
columnHeader | String | Optional | The 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). |
columnIndex | Integer | Optional | 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:
Field | Values | Definition |
---|---|---|
id | ID | The 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.