Marketpath CMS Developer Tutorial Series

Importing Content

Last Updated 3/9/2018

In this lesson you will learn how to import content to your site using the Marketpath Import tool.

Marketpath CMS provides a way of importing various types of data into a site. You can import CSV data, custom packages or modules, or an entire site.

Importing CSV Data

Importing from a CSV file has very strict requirements. There is no column mapping interface so you'll need to make sure your columns are named the same as the the object field names in Marketpath CMS.

In this example, we will import a list of calendar entries into a calendar named Events. The source data come from a CSV file. 

1) Save your data into CSV file. The following fields will be imported. Fields with an asterisk (*) are required. The field names should be placed in the first row. The start and end date/time fields should be in the format "4/11/2018 3:00pm".

CalendarGUID *
Name *
Timezone *
StartDate *
EndDate *

2) The CalendarGUID field should be the id of the calendar. You'll need to open the calendar properties dialog in Marketpath CMS to obtain the CalendarGUID value. The id will be the long hexidecimal value in the top right. Simply click it to copy. Then paste that into every row of your CSV. Your CSV file should look similar to the table below.

CalendarGUID Name Title Timezone AllDay StartDate EndDate Location Description
0ef60d06-113c-4f0e-b981-100f2c90b355 Taco Tuesday Taco Tuesday America/Indiana/Indianapolis FALSE 11/5/2019 15:00 11/5/2019 20:00 Bakersfield Party of 12
0ef60d06-113c-4f0e-b981-100f2c90b355 Fish Friday Fish Friday America/Indiana/Indianapolis FALSE 11/8/2019 18:00 11/8/2019 22:00 Salt on Mass Need some Omega 3's
0ef60d06-113c-4f0e-b981-100f2c90b355 Spaghetti Saturday Spaghetti Saturday America/Indiana/Indianapolis FALSE 11/9/2019 18:00 11/9/2019 22:00 Old Spaghetti Factory Classics for the soul

3) IMPORTANT: When importing from a CSV it is necessary that the name of the file contain the singular name of the entity type you're importing. For calendar entries, the file should have CalendarEntry in the name. This assists with the auto-definition feature. The name of the file I am importing now is events.CalendarEntry.csv.

4) Go to Site -> Imports -> New.

5) Be sure check Automatically create import definition and Review the definition before importing. Everything else should be unchecked. Then click Next.


6) Follow the directions to upload your file.


7) Click Edit Import Definition to adjust what will happen when the items are imported.


8) Since we're importing calendar entries, they may have the same name and title so scroll down to the Calendar Entry area and change Handle Duplicates to Rename. Then click Save and close the dialog.


9) Next click Import.


10) You will be presented with the Imported Objects dialog. If there are no errors, you can click Commit All and the imported events will be added to the calendar. You also have the option to commit each individually by clicking the hammer icon adjacent each row. Additionally, you can Publish All directly from this dialog.


11) You may notice in the previous dialog that the event names may have been updated. This happens when a matching entry is found so the Name field is automatically updated. The Title of the entry is not updated, however.  The last thing to do is open your calendar and spot check that your entries were properly migrated.

12) Since importing data from a CSV can be tricky and the required fields for each may not be fully understood, please do not hesitate to submit a support ticket requesting assistance with this. 


Importing a Package

To import a package, you'll follow similar steps as the above example. The biggest difference is that you'll be importing a JSON file that already contains the definition or a zipped file containing the same JSON file with images and documents. You should not have to edit the definition unless ou want to check for duplicates handling.

Importing a Full Site

To import a full site, the import process is simlar to importing a package. The biggest difference is that you will want a brand new site with nothing in it. Otherwise you could have some ugly collissions or duplicates that cause template rendering to fail.




---- End of Lesson ----

Question? Correction?

Let's work together to make our documentation as helpful as possible.

What is your name? 
What is your email address?