Skip to main content
ExLibris
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    The Export User Generated Data Tool

    The Export User Generated tool allows users to export user-generated content (such as tags, reviews, and ratings) from Primo.
    You must be an installation-level staff user to create and execute this tool.
    To export user-generated content:
    1. On the Tools Monitoring page, select Export User Generated Data in the Create a Tool drop-down list.
      The Export User Generated Data page opens.
      Export User Generated Data Page
    2. Enter the fields as described in Export User Generated Data Details. Required fields are indicated by an asterisk.
      Export User Generated Data Details
      Field name Description
      Name*
      This field identifies the tool job, which you can execute and monitor in the Tool Monitoring list.
      Content Type*
      Indicates the type of content, such as tags, review, and ratings.
      Exported Files Destination*
      specify the full path of the directory on the Back Office server in which to place the exported file, which has the following format:
      primo_export_user_gen_<date/>-<time/>.xml
      Start exporting from*
      Indicates the start date of the user-generated data. Only records that begin on this date are included. Enter a date or click to select a date with the calendar tool.
      Email
      The e-mail address to which the completion status of the export is sent.
    3. Execute the tool when needed. For information on monitoring tools, see Tools Monitoring.

    Primo Import-Export XML File Format

    The export file is an XML file that contains the following structure per PNX record:
    • id (optional) – For exports, this should be the PNX_ID. For imports, it can be a running number.
    • One or more pairs of key_type/key_value. The key types must be defined in PNX XREF Keys mapping table.
    • One or more groups of data_groups including the following:
      • data_type – the type of data element to import. Currently, the following types are supported:
      • tags
      • reviews
      • abstract
      • fiction
      • extension – allows you to specify additional types of PNX extensions. For example, to create the extension LANG, you could specify the following:
        <extension extension_type="LANG">
        <value>
        <![CDATA[
        French
        ]]>
        </value>
        </extension>
    • data_value – In the case of a review, this may include a rating.
    • data_userid – Optionally, a user ID may be added. This should be done only if the user ID might be valid within Primo.
    • data_username – Optionally, there can be an attribute that indicates whether to display the name (true/false) or not. This is relevant for the review and rating data types.
    The following figure shows an example of an export file:
    <?xml version="1.0" encoding="utf-8" ?>
    <!--
    Created with Liquid XML Studio 1.0.8.0 (http://www.liquid-technologies.com)
     -->
    <records xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="record.xsd">
    <record>
    <keys>
    <key type="issn">0003-391X</key>
    </keys>
    <data_groups>
    <data_group>
    <data_type>TAG</data_type>
    <data_value>history</data_value>
    <data_userid>987654</data_userid>
    <data_username display="true">Tami</data_username>
    </data_group>
    </data_groups>
    </record>
    <record>
    <keys>
    <key type="LCCN">06032734</key>
    </keys>
    <data_groups>
    <data_group>
    <data_type>REVIEW</data_type>
    <data_value>this book is wonderful...</data_value>
    <data_userid>987654</data_userid>
    <data_username display="true">Tami</data_username>
    </data_group>
    <data_group>
    <data_type>RATING</data_type>
    <data_value>10</data_value>
    <data_userid>987654</data_userid>
    <data_username display="true">Tami</data_username>
    </data_group>
    </data_groups>
    </record>
    <record>
    <keys>
    <key type="LCCN">06032734</key>
    </keys>
    <data_groups>
    <data_group>
    <data_type>RECOMMENATION</data_type>
    <data_value rank="1" matchtype="isbn">1234567892</data_value>
    <data_value rank="1" matchtype="oclc">BD9899</data_value>
    </data_group>
    <data_group>
    <data_type>RECOMMENATION</data_type>
    <data_value rank="2" matchtype="isbn">1234567891</data_value>
    </data_group>
    </data_groups>
    </record>
    </records>
    Example Export File