Recommendation for bulk creation of Single Calendar Event assets by import


(Stuart W) #1

Hi,

 

I was wondering if anyone could recommend the best way of creating multiple single calendar event assets via some sort of import process please?

 

We have a calendar on our site that displays and allows users to make searches of single calendar event assets. The event assets can be created using an Asset Builder Page - this creates the single calendar event asset and assigns a metadata schema, along with several metadata values.

 

I have had several users ask if there is any way of bulk uploading their events, so that they don't have to go through the asset builder page time after time. I think they were thinking of providing their events in a CSV file so that I could import them in such a way that Matrix would create one single calendar event asset with the correct associated metadata values for each line in the CSV file.

 

I have been looking at the 'Import Assets from XML' tool, but it is rather cluncky (I am having to do a mail merge in Excel to get the data into the correct format for the XML file, then copy and paste the XML into a text editor so that I can save it as an XML file before importing it to Matrix) and I am having difficulty creating more than one single calendar event asset with the same XML file.

 

Questions:

 

Is this the best way to achieve what I need to do or can anyone suggest a simpler way please?

 

If the XML import tool is the best way, is there any reference material for the XML tags please?

 

A sample XML file is attached. This creates the first single calendar event asset but throws up error messages when it tries to create the second asset. Can you see where I am going wrong please?

 

Many thanks,

 

Stu test-single-calendar-event-create.xml (29.6 KB)


(Aleks Bochniak) #2

Best bet is to create a js api script which creates the assets based on the contents of the individual items within a csv or xml or json array.


(Nic Hubbard) #3

I might create a quick PHP scrip that would parse the .csv and then process the content with the JS API. You could then use a Remote Content asset to nest it within your site.


(Stuart W) #4

Hi Aleks and Nic,

 

Thanks for your replies - I must admit that I wouldn't know how to go about developing either of those solutions, and usefully (as is usually the case) I have no budget to get someone else to build either of them, so I will have to put it on the backburner for now.

 

It looks as though I know who to message when I do manage to scrape some budget together though!

 

Many thanks and best wishes,

 

Stu


(Anthony) #5

I agree with the comments above, the JSAPI is most likely the best way to go for you.

 

But for what it's worth, I did myself go the Excel to XML route for a one-off requirment I had a couple of months ago. I wrote a little VBA macro in Excel that generated the XML file for me. It wasnt creating event assets but the same approach would work.

 

Your XML file may have a few formatting issues - when I load it in Notepad it looks OKish but IE refuses to parse it and display it properly. I note there are two closing </actions> at the end but even removing that doesnt help. Could be a ascii / unicode thing.

 

Tony