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

    Working with Delivery Templates

    This information is not applicable to Primo VE environments. For more details on Primo VE configuration, see Primo VE.

    Delivery templates consist of a URL and placeholders that Primo fills in with data when the link is invoked. Some templates are OpenURLs and may be stored as follows in the templates table:

    {{sfx_base}}?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim={{timestamp}}&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Journal-{{control/sourceid}}&rft_val_fmt=info:ofi/fmt:kev:mtx:{{addata/format}}&rft.genre={{addata/genre}}&rft.atitle={{addata/atitle}}&rft.jtitle={{addata/jtitle}}&rft.btitle={{addata/btitle}}&rft.aulast={{adda-ta/aulast}}&rft.auinit={{addata/auinit}}&rft.auinit1={{addata/auinit1}}&rft.auinitm={{addata/auinitm}}&rft.ausuffix={{addata/ausuffix}}&rft.au={{addata/au}}&rft.aucorp={{addata/aucorp}}&rft.volume={{addata/volume}}&rft.issue={{addata/issue}}&rft.part={{addata/part}}&rft.quarter={{adda-ta/quarter}}&rft.ssn={{addata/ssn}}&rft.spage={{addata/spage}}&rft.epage={{addata/epage}}&rft.pages={{addata/pages}}&rft.artnum={{addata/artnum}}&rft.issn={{addata/issn}}&rft.eissn={{adda-ta/eissn}}&rft.isbn={{addata/isbn}}&rft.sici={{addata/sici}}&rft.coden={{addata/coden}}&rft_id=in-fo:doi/{{addata/doi}}&rft.object_id={{addata/objectid}}&svc_val_fmt=info:ofi/fmt:kev:mtx:sch_svc&svc.fulltext=yes&rft_dat=<{{control/sourceid}}>{{control/sourcerecordid}}{{control/sourceid}}>&rft.eisbn={{addata/eisbn}}&rft_id=info:oai/{{addata/lad21}}

    In the above example, the system treats all of the text that is enclosed in double-squiggly brackets as placeholders and the remaining text as static text.

    Placeholders

    Primo supports the following types of placeholders, which the system fills in when the final URL is calculated:

    • Base_urls – Base URLs are defined per institution and stored in the Institution Base URLs mapping table in the Back Office. There are several out-of-the-box types of base URLs that are actually updated via the Institution Wizard, not directly by the table. Most customers do not need to add additional types, but this is an option. Note that it is also possible to enter the base URL as static text in the template. The out-of-the-box base URLs include the following:

      When the URL is calculated, the system takes the base URL of either the institution of the user or the institution of the location.

      • alma_base – the base URL of Alma used by the institution.

      • api_base – the base URL for the OPAC via Primo API used by the institution.

      • digital_rep_base – the base URL of the Digital Repository used by the institution.

      • ils_base – the base URL of the ILS used by the institution.

      • metalib_base – the base URL of the MetaLib used by the institution.

      • rosetta_base – the base URL of Rosetta used by the institution

      • rta_base – the base URL used for RTA. The server name is generally the same as that of the ILS, but the port may be different.
      • sfx_base – the base URL of the SFX (or other link resolver) used by the institution.

    • PNX Fields – any field in the PNX can be used as a placeholder. The field is defined as {{section/field}}. The sections and fields of the PNX are explained in the Primo Technical Guide. Use the PNX section and field codes as they display in the Normalization Set Editor, as shown below.

      Normalization Set Editor
    • FE interface language – The following placeholders may be used for the language:

      • {{language}} – The language is sent using ISO 639-2/T codes, which are three-letter terminological codes that are derived from the native name for the language. For example, the three-letter code for French is fra, which is based on the native name Francais.

      • {{language_bibliographic}} – The language is sent using ISO 639-2/B codes, which are three-letter bibliographic codes that are derived from the English name for the language. For example, the three-letter code for French is fre, which is based on the English name French.

    • Collection ID{{coll_id}}

    • User ID{{userID}}

    • User IP{{user_ip}}

    • Timestamp{{timestamp}} - The timestamp is the date and time.

    • PDS handle{{pds_handle}}

    • Primo server IP{{primo_server_ip}}

    • View{{view}} – For example, the template may be written as follows:

      ils_base?func=direct&local_base=control/originalsourceid&doc_number=control/sourcerecordid&view={{view}}

    Thumbnails

    Preference for requests to retrieve thumbnails are given to Syndetics thumbnails, which are free to customers. In case there are several thumbnail links for a record, the following templates are given precedence:

    1. syndetics_thumb

    2. syndetics_thumb_exl (new template)

    3. Google templates

    4. Other providers

    • Amazon thumbnail requests are no longer sent for customers who use the out-of-the-box template code.

    • For hosted customers, requests sent to third-party providers to retrieve thumbnails are now sent through a regional proxy server for security reasons.

    Modifying and Creating Templates

    Primo comes with a set of out-of-the-box templates that many customers find sufficient for their needs, but it is possible to add new templates or modify existing ones.

    Modifying Templates

    Customers often modify templates for the following reasons:

    • To change a dynamic base URL to a static one.

    • To add the Syndetics Customer ID to the Syndetics link to thumbnail (syndetics_thumb), abstract (syndetics_abstract), and table of contents (syndetics_toc). This is done by replacing CLIENT with the customer ID.

    • To ask for the target interface to be displayed in the same UI language as Primo.

    • To add specific parameters for statistical purpose.

    Adding New Templates

    New templates can be added for new delivery options or new links from a PNX record.

    Example: Link to Local Digital Archive

    In this example, the library has an digital archive that is harvested into Primo. The delivery for these records should be the digital record.

    Steps:
    1. Set up delivery. Records from the digital repository should be assigned the Online Resource delivery category when they are normalized to the PNX. The out-of-the-box link field that is used for the delivery category is links/linktorsrc. This is defined in the GetIt ! Link 1 Configuration mapping table in the Delivery subsystem. For more details on delivery setup, refer to the Primo Technical Guide.

    2. Add new template to the links/linktorsrc field.Unless there is a reason to change the delivery setting, the new template code should be added via the normalization rules to the links/linktorsrc field. You can add a display text using either text (in $$D) or a code (in $$E). Deploy the normalization rules set after making this change.

    3. Add the template to the Templates mapping table in the Delivery subsystem. You will need the link to syntax to the digital record to create the template. You can use the digital_rep_base placeholder (adding it via the Institution Wizard in this case) or add the base URL directly to the template. Use placeholders for data that needs to change dynamically. Keep in mind that if you need data that is not stored in the PNX but is available in the source record, you can add the necessary data to the link field using $$1- $$9/$$a - $$z/$$A - $$Z. For example:

      {{digital_rep_base}}/DeliveryManager?pid={{control/sourcerecordid}}

      or:

      http://the.university.edu:9807/DeliveryManager?pid={{control/sourcerecordid}}
    4. Deploy the Delivery Settings option on the Deploy All page after adding the template to the mapping table.

    • Was this article helpful?