Importing Content and Contacts

Content and Contacts can be imported to Brick River from any correctly formatted .csv (comma separated values) file. 

The process of defining Import settings and uploading import files is documented fully in the Brick River User's Guide - here.

Once an Import document has been saved in Brick River it is possible to automate the import of Content and Contacts records using any tool that can POST or PUT a .cvs file to the designated location on the Brick River server.

An example below describes using cURL to perform this task.

Brick River Upload Locations and Import Definitions

When an Import Definition is saved in Brick River a URL is created to point to the folder that will receive the import file.  Whenever a .csv file is posted to this location it is immediately processed using settings stored in the Import Definition document.

  • In the Brick River Web Console, open the Admin Menu and click the Imports link.
  • A window will display the Import Definitions currently saved in the system.
  • Click any document to open it in the Imports Window.
  • Click the View fields and instructions link to retrieve Data Syncing url.

 


Uploading a file using cURL

cURL is a command line utility used to transfer files using a variety of protocols, including HTTP.

The format for an import is:
curl -k -T [filename.csv] https://[yourname]-data.brtapp.com/import/[import ID]/[filename.csv]

  • filename.csv is your filename
  • yourname is your Brick River customer name. You access Brick River at http://yourname.brtapp.com
  • Import ID is the Id of the import. This is retrieved using the View fields and instructions link on the Import Definition.

Example:

Using the data syncing url from the TestImport definition above, and an import file 'import.csv', the command would be:

curl -k -T import.csv https://lab-data.brtapp.com/import/7d4e34c6017f4c95914d0abb3637d1b9/import.csv

Options:
curl -k -H "X-Test:yes" -H "Content-Type:text/csv" -T [filename.csv] https://[yourname]-data.brtapp.com/import/[import ID]/[filename.csv]

  • -H "X-Test:yes" Import in test mode
  • -H "Content-Type:text/csv" use if the filename does not end in .csv

 

Want to learn more?

Call 800-924-5220 or

Free trial