Importing Data - Getting Started

Last Updated 2/13/2015
Add and maintain content and contacts through data imports

There are two ways you can import data into Brick River.

  1. You can use our on-demand importer by simply uploading a .csv
  2. You can use our importer API where you post a .csv file to a URL.

Using the Importer API.

The importer API takes a .csv file POST or PUT to a particular URL.

To post the file there are two ways to do this.

  1. From any data source use a tool like cURL to post the file
  2. If your data is in SQL Server, you can use our little BRTImport tool

Need to Know

Only Admins have access to the import functions

Here are the steps to import

Create a new import
In Brick River, go to ADMIN > Imports and press "Add a new"

Prepare your .csv file
You will need to have a .csv file and you will need to know what fields you want to import. This is a little tricky to do. But the best way, at this point, to know the field Ids is to go to the particular view and then pick the fields that you want and the download a .csv. This will show you the exact field names in the first row.

If you are using an Id for the matching mode (more on that below) you will need to have a field called Id. It's case sensitive. :-)

The importer will only add/update the fields that you specify in your .csv file. So, if you have a people record that has lots of fields but in your .csv file you only have fields: FirstName and LastName, then those are the only fields that will be touched.

Give it a name
Give the importer a name. This is only for you to identify it.

Set the Table and View
The table is either "Content" or "Contacts" since that's what all our tables are.

The view is the ID of the view. If the view is named "People" it's ID is also "People" but maybe if the name of the view is "Blog Posts" then the Id is probably the non-space version of "BlogPosts." Case matters.

Set it to Run as an administrator in your system

Matching Mode
Matching mode is how we check to see if one of your records already exists so we don't create duplicates. Keep in mind, however, that there is a nifty duplicate checker/fixer that you can always run.

There are three matching modes.

  1. Brick River Id. You would have had to have pulled a download first to even know our Ids. Then you could push data back in using these as the Ids. You would have a column in your .csv called Id and it's either the Brick River Id or your external Id from your external database.
  2. External Source. If you maintain your own external database, you can use these as the Ids. Again, you'll put them in the field called Id. You would use this if you want a data sync and not just a one-time import.
  3. Use deduping fields. Lastly you can prevent duplicates by using the dedupe fields. Unless they have been specifically changed they will like be: First Name, Last Name and Email for Contacts and Title and PubDate for Content.

Understand the Options

Here's is what they mean. Pay attention here this is important! :-)

  • Add. Check this and rows will be added. It will use the matching mode and any time it comes across a new Id record, it will add it.
  • Update. Check this and it will update records based upon either the Brick River Id or the external Id. If you use an External Id you will also need to set a source. See below for information on that.
  • Delete. BE VERY CAREFUL HERE. Only check this if you absolutely know what you are doing. This WILL DELETE any records that don't exist in the file you are posting.
  • Aggregate Relations. BE VERY CAREFUL HERE TOO. You definitely WANT to check this if you are setting the SubscriptionList field - if you are specifying email subscriptions that contacts are on. If you don't check it it will remove the other subscription lists that people are on. It only comes into play with relationships or Lookups. BUT, you pretty much don't need to check this with anything else.

Source
Enter a "source." The Source sets the unique place where the data is coming from.
It comes into play if you need to connect data together or do updates.

Let's say, for example, that you are importing data from "DataSystemA" and you have a couple of views that you want to tie together. Maybe you have two tables of data. One for "Home Bases" and another of "People" and every person has a field called "Home Base" that is a related table.

You would have to do two import and both imports would have to have the same source name in order to be connected. And they would be connected on the second import.

So, you'd give them both a source name of something like "DataSystemA."

First, you would import the "Home Bases" and you would also provide a Source Id for each and that field would be named Id. It's case sensitive.

The Source Id is YOUR Id from your database and it's the connector of the two tables.

After you'd run the import for "Home Bases" you would import the "People."

The People import would also have a source of "DataSystemA" and it would have a field called "HomeBases" and, in this example, this field has an articulated relationship to HomeBases within Brick River's view XML.

When you run the "People" import it will look for any other records that have the source name of "DataSystemA" as it's importing and if so and if the IDs match, it will connect them together.

Source ALSO is used for follow on imports or data syncs.

Let's say that every week you are going to update your "People" view from an external data system. Then you would give it a name like "MyOutsideDB" and then every time it runs it will use either the Source Id, Brick River Id or the de-dupe fields as the unique identifier to perform adds, updates or deletes.

More on the options
The importer lets you either add, update or delete.

If you are running the importer a second time then it will look at the SourceName and Id to see if they exist. If they don't, then it will import them. Here's an example.

Let's say that you have the import set to both "add" and "update" here's how it will be the first time running an import to People on the source of "MyExternalDB"

Id FirstName LastName PreferredName Email
1 J. Mesquite Banderlapaunch Tito j@brickriver.com
2 Pilkpo Chaucheegee Mike p@brickriver.com
3 Rick Dowripple Ricardo rick@brickriver.com


Upon running this, since it is the first time, it will add all the records.

Running it a second time here's how it would be

Id FirstName LastName PreferredName Email Outcome
1 J. Mesquite Banderlapaunch Tito j@brickriver.com no change
2 Pikpo Chaucheegee Clarence p@brickriver.com PreferredName is updated
3 Rick Dowripple Ricardo rick@brickriver.com no change
4 Craggletoes Crump Wolf thewolf@brickriver.com this record would be added

Article Topics

Getting Started

Want to learn more?

Call 800-924-5220 or

Free trial