Install Structured Importer

Prev Next

Use the Structured Importer UDC plugin to import spots and media to the IXM Platform. Upon import, the system automatically creates spot and media groups for the imported files. In addition, you can configure import options such as automatically adding spots to playlists, or clearing spot groups and playlists before importing new content.

Prerequisites

Consider the following prerequisites before you use the Structured Importer:

  • You must have a base directory for importing. For example, a folder on the IXM Server. 

  • You can only import to existing playlists in the IXM Platform. They’re not created during the import.

  • You must create a JSON configuration file to configure import settings.

Install the plugin

Note

We recommend using the latest versions of importers and spots so that you can take advantage of the latest fixes and features.

To install the Structured Importer UDC plugin, perform the following steps:

  1. Stop the UDC service.

  2. Open the release folder and go to Server.zip\Plugins\Udc\StructuredImporter.

  3. Copy all files from there into the folder UDCService/plugins on the server. If the plugins folder doesn’t exist, create it.

  4. Start the UDC service.

Configure the data import

You must create a configuration file that contains settings for the importer. This allows you to specify how and where files are imported.

Save the config file anywhere on the server where the server services have access to.

There are two import options with different requirements. Basically, the server makes the difference. You can upload files either to the IXM Server or via an FTP server.

Upload files to the IXM Server

To upload files to the IXM Server, you must create a folder structure below the base directory that matches the spot groups, media groups, and playlists in the IXM Platform.

Putting a spot or media file in one of these folders, uploads it to the corresponding group and playlist in the IXM Platform.

Import via an FTP server

To import via an FTP server, you must create a folder structure below the base directory on an FTP server and store the files there.

The files are transferred to the server and all sub-folders are automatically adopted. You don't need to create them manually on the server.

Configure upload to spot and media groups

Configure the upload of files to spot an media groups either via the IXM Server or an FTP server depending on your setup.

IXM Server

If you import a spot or media file via the IXM Server, it's imported to the corresponding spot or media group in the IXM Platform.

To make this possible, create the following folder structure on the server:

  • Media groups: path to root\Media

  • Spot groups: path to root\Spots

FTP server

If you deposit a spot or media file in a folder on the FTP server, it's automatically copied to the base directory on the IXM Server and imported to the corresponding spot or media group in the IXM Platform.

To make this possible, create the following folder structure on the FTP server:

The folder structure on the IXM Server is created automatically.

Configure upload to playlists 

You can import spots directly to your general playlists. This applies to both the IXM Server and FTP servers.

Note

Please notes the following limitations:

  • The import doesn’t create playlists. Create the playlists in the IXM Platform beforehand. 

  • You can only import to general playlists, screen playlists are not supported.

To upload spots to playlists, create a sub-folder within a spot group folder with the name of an existing playlist in square brackets. 

Create the following folder structure: path to root\spots\spot group hierarchy\[name of playlist]

Upload to playlists with a start date

You can also create a playlist version with a start date when importing spots. To do so, create a sub-folder in the playlist folder with the date and time.

Create the following folder structure: path to root\spots\spot group hierarchy\[{name of playlist}]\YYYYMMDDhhmmss

Create the configuration file

To enable the import from any server, you must create a JSON configuration file called configuration.json with the following entries: 

Entry

Description

ApiKey

Provide your API key.

You can create API keys for users in the IXM Platform. The API key user is the creator of imported spots or media.

ImportType

Specify the import type with one of the following entries: 

  • Local: the files are imported directly from a folder to the server (base directory).

  • FTP: the files are copied from an FTP server to a folder on the server and imported.

BaseDirectory

Provide the path to the folder that contains the spots. 

SpotDuration

Specify the duration for spots whose duration information is not available, such as images, PDF files, or HTML basic spots.

Ftp

If you use an FTP server, specify the following details:

  • Host: provide the name of the FTP host.

  • User: provide the name of the FTP user.

  • Password: provide the FTP password.

  • SourceFtpDirectory: provide the path to the root directory on the FTP server.

Example configuration.json file:

{
  "ApiKey": "3D1E08CBD56FE3668BE3C4148EBBC9*****",
  "ImportType": "Ftp",
  "BaseDirectory": "\\\\qa11\\data\\StructuredImporter\\FtpImport",
  "SpotDuration": 13,
"Ftp": {
    "Host": "support.grassfish.tv",
    "User": "*****",
    "Password": "*****",
    "SourceFtpDirectory": "/Dir1/Dir2/Root"
  }
}

If paths contain backslashes, you must mask them with escape sequences ('\'). Network drives require four backslashes at the beginning ('\\\\').

Prepare the data import

Before you set up the data importer, note that there are two different types of import. You must select the import type when you set up the data importer in the IXM Platform. However, you might have to prepare your import type in advance.

You can use the default import or full import.

Default import

The default import allows you to specify import options via an XML file.

That means, you must create a file called Finish.xml file and store it in the base directory. That is a FTP or local folder on the server.

The importer immediately starts synchronizing when it finds the XML file in that folder.

To create the XML file, use the following structure:

<?xml version="1.0"?>
<FinishFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ClearSpotGroups>true</ClearSpotGroups>
  <TruncateEmptyPlaylists>true</TruncateEmptyPlaylists>
  <ClearPlaylistIfExists>true</ClearPlaylistIfExists>
</FinishFile>

Configure the following import options in the file:

ClearSpotGroups

  • Set to true to delete existing spots from spot groups before importing new spots.

  • Set to false to add new spots to existing spots.

TruncateEmptyPlaylists

  • Set to true to delete existing spot instances from playlists if the imported playlist folder is empty.

  • Set to false to ignore empty folder structures.

ClearPlaylistIfExists

  • Set to true to delete all spot instances from playlists before the import.

  • Set to false to add new spot instances to existing spot instances.

Full import

The full import follows standard import settings, which can’t be changed. You don’t need to create an XML file.

During the import, the following happens:

  • If a spot group contains a spot that doesn't exist in the imported directory, it's removed from all playlists and spot groups.

  • If an existing spot has changed, it's replaced with the new file. Spots that are not associated with any import folders are not affected.

  • All spots from playlists that are affected by the import are removed before new spots are imported. The spot instances are assigned to the playlist and sorted alphabetically.

Configure spot time control

Optionally, you can specify the validity of imported spots. To do so, you must create a JSON file with time control settings for each spot and place it in the playlist folder.

Create a file with the name [Spotname].json and the following entries:

Entry

Description

ValidFrom

Specify the date and time from which the spot is valid.

ValidTo

Specify the date and time until which the spot is valid.

Weekdays

Specify the weekdays (MO, TU, WE, TH, FR, SA, SO) and holidays on which the spot is valid.

DailyFrom

Specify the time of day from which the spot is valid.

DailyTo

Specify the time of day until which the spot is valid.

Loops

Specify the iterations in which the spot is valid.

Example spotname.json file:

{
  "ValidFrom": "2020-05-10T11:59:10",
  "ValidTo": "2020-07-27T04:15:46",
  "Weekdays": {
    "Monday": false,
    "Tuesday": false,
    "Wednesday": false,
    "Thursday": false,
    "Friday": true,
    "Saturday": true,
    "Sunday": false,
    "Holiday": true
  },
  "DailyFrom": "05:00",
  "DailyTo": "21:30",
  "Loops": {
    "One": false,
    "Two": true,
    "Three": false,
    "Four": true,
    "Five": false,
    "Six": false
  }
}

Set up the data importer

To set up the data importer in the IXM Platform, perform the following steps:

  1. Go to Administration > Content > Data importer > New.

  2. In the Create data importer dialog, select the Structured Importer as Data importer.

  3. Enter a Designation. You’ll use the designation when you select the data source of the spot.

  4. Enter a Display name. The display name is the name of the data source in the system.

  5. Switch to the Feeds tab and select one of the following Feed definitions

  6. As Path, enter the path to your config.json file.

  7. Specify all other settings as required.

  8. Click Save to save the data importer.

Start the data importer

To finish the installation, you must start the data import in the IXM Platform. To do so, perform the following steps:

  1. In the IXM Platform, go to Administration > Content > Data importer

  2. Select the data importer that you want to start.

  3. In the lower-right corner, select Tools > Start import.

  4. Optionally, select Display data to display the imported data. Click OK to close the window.