You are here: Administrator Topics by Subject > Appendices > SharePoint Integration > Sharepoint Integration via Federated Search

SharePoint Integration via Federated Search

You can integrate PolicyTech with SharePoint® so that certain PolicyTech documents appear in SharePoint search results.

Important: Using this integration method returns only those documents meeting the following criteria:

  • Must be assigned to a site to which the API key has been assigned
  • Must reside in the published status
  • Must have a security level designation of All Users or Public

Choosing an Interface Method

You can use either the default search interface built in to PolicyTech or, if you need more advanced handling of search requests and results, create your own by coding an interface web page (see Search Interface Web Page Details). The instructions that follow apply to both methods.

Activating the PolicyTech API and Creating an API Key

  1. To activate the API for your PolicyTech installation, call Client Support at 888-359-8123 (toll-free in the U.S. and Canada) or 208-359-8123. A Client Support technician will give you a new registration code.
  2. Log in to PolicyTech.
  3. Click PREFERENCES, click System / IT Settings, and then click Registration Info.
  4. In the Enter Registration Code box, copy and paste the new registration code that Client Support emailed to you, and then click Submit Registration Code.
  5. At the top of the PolicyTech window, click PREFERENCES again to reload them with new registration code.
  6. Click System / IT Settings, and then click API Keys.

  1. Click New.

  1. Type a name for the new key.
  2. (Optional) If you want to limit access to PolicyTech via the API, in the IP Range(s) box type one or more IP ranges containing the addresses of one or more servers. Type ranges in the following format: xxx.xxx.xxx.xxx-xxx.xxx.xxx.xxx, xxx.xxx.xxx.xxx-xxx.xxx.xxx.xxx
  3. In the Sites box, select only those sites you want SharePoint users to have access to. If you want SharePoint users to also have access to any sites that may be added to PolicyTech in the future, select the Automatically select new sites as they get created check box.
  4. Click Save to generate the key and display it in the Key box.

Leave the Edit API Key window open, as you will need to access the key in a later step.

Create and Test a Search Result Source in SharePoint

Important: The instructions that follow are one example of how to configure SharePoint using Office 365™. If you're using a different administration tool, your steps and screens may be different than those below. You may also choose different options to set up your Search Result Source.

  1. Log in to Office 365 as an administrator.
  2. Click Admin, and then click SharePoint.

  1. Click Search, and then click Manage Result Sources.

  1. Click New Result Source.

  1. Type or select the following settings.

Name

PolicyTech Search

Description

(optional)

Protocol

OpenSearch 1.0/1.1

Type

SharePoint Search Results

Query Transform

{searchTerms}

Credentials Information

Anonymous: This source does not require authentication

  1. The Source URL you must provide depends on whether you're using the default PolicyTech interface or a custom interface web page.

https://[your PolicyTech URL]/api/opensearch/2014/06/?MethodName=GetDocuments&APIKey=[PolicyTech API key]&SearchField=ALL&itemsPerPage={itemsPerPage}&startIndex={startIndex}&SearchTerms={searchTerms}

Make sure the protocol is https:// (secure). Replace [your PolicyTech URL] with the URL used to access your PolicyTech site. Replace [PolicyTech API key] with the key you created earlier in PolicyTech Preferences. Your completed URL should look similar to the following:

Note: The URL must be one long string containing no spaces. Line breaks were added to the sample above to accommodate viewing within this documentation format.

  1. Below the settings, click Save.
  2. Point your cursor to the white space after the newly added result source name to display a down arrow, click the arrow, and then click Test Source.

  1. When the test finishes, you should see a Succeeded message. Click OK.

Important: If the test fails, try executing it again. If it continues to fail, there is a configuration issue. Check the Result Source settings, especially the source URL. Also check the PolicyTech logs (see View Logs).

Adding and Configuring a Web Part

  1. In the SharePoint admin center, click site collections.

  1. Click the search site.

  1. In the site collection properties window, click the Web Site Address link.

  1. Type any keyword, and then click .

  1. In the results page, click , and then click Edit Page.

  1. Click Add a Web Part.

  1. In Categories, click Search; in Parts, click Search Results; for Add part to, click Main Zone; and then click Add.

Note: If the Add button is not visible, try accessing the page in Internet Explorer® with Compatibility View enabled.

  1. The newly added web part is displayed at the top of the Main Zone. Click and drag the new web part below the Search Navigation part (or below another Search Result part) so that Search Box and Search Navigation are the first and second parts at the top.
  2. In the new web part, click the down arrow near the upper right corner, and then click Edit Web Part.

  1. In the settings pane displayed on the right, click Change Query.

  1. For Select a query, click the name of the result source you created earlier, and then click OK.

  1. Back in the settings pane, expand Settings, and then, under Results control settings, click to clear the Show advanced link and Show language dropdown check boxes, as these features are not compatible with the PolicyTech API.

  1. Expand Appearance, and then update the web part title.

  1. At the bottom of the settings pane, click OK.
  2. In the alert near the top of the page, click Check it in.

  1. In the next alert, click Publish this draft.
  2. Type a keyword that you know is contained in one or more PolicyTech documents, and then click .

You should see a list of PolicyTech documents containing the keyword.

Search Interface Web Page Details

If you decide to program your own interface web page, here's one example of how you could implement it:

Note: The web page can reside on the same web server as SharePoint but doesn't have to.

 

Coding Resources

OpenSearch.org

Code Sample: Federated Search SQL Server Connector

Windows Communication Foundation Services and WCF Data Services in Visual Studio

Add the Code for the Federated Search HTML to RSS Converter