iFrame

Features and Capabilities

Compliance.ai provides 2 applications that could be used within a traditional html iframe element, namely smart-search and insights

Code Snippet 

The developer application needs to call the Widget API first, in order to get URL of the smart-search application to use it as the source of an iFrame

<iframe id=”myIframe” src=”url-returned-from-widget-api?neverShowModal=true” width=”100%” height=”60px”> </iframe></div>
<script src=”/custom-js/app.js”></script>

See details on the steps to implement the Compliance.ai smart-search below. 

1. smart-search 

Compliance.ai’s smart-search application allows developers to quickly implement search features and access millions of financial services related regulatory documents from a variety of Federal and State level sources.

A developer application could utilize the smart-search in an iFrame. In order do that, the developer application needs to first call the Compliance.ai’s Widget API to retrieve the URL of the smart-search application.

The smart-search application is the quickest and simplest way to access Compliance.ai’s full content library. The smart-search application allows extended keyword search and search results.

View full list of sources and document types

Search result attributes include: Document Title, Publication Date, Agency or Document Source, and Summary

1.1 Search Bar 

dodd-frank_search_bar

1.2 Search Results

iframe_search_results

1.3 Document Selection 

iframe-document-view

1.4 Communication with the smart-search application in an iFrame use case 

The smart-search application, by default, utilizes window.postMessage to inform the developer application about the search result such that the developer application is able to accommodate. The developer application needs to subscribe for these messages using window.addEventListner and process the following three type of data:

  • ‘autosuggestItemsWillLoad’: this means the smart-search application is about to list up to 5 suggested items, so the developer application needs to enlarge the area dedicated to the iFrame
  • ‘noAutosuggestItems’: this means the smart-search application did not find any matching suggested items, so the developer application could resize the iFrame back to its original size.
  • URL of the selected item: this is the URL of the documents list related to the item that the user clicked on; the developer application can use this URL to load the documents list in a suited window

2. insights 

Compliance.ai’s insight application generates interactive graph charts based on input parameters. When a user clicks on an areas of the chart, insight takes the user to the data representing the clicked area.

A developer application could utilize the insights in an iFrame. As mentioned earlier, in order do that, the developer application needs to first call the Compliance.ai’s widget API to retrieve the URL of the insights application.and the required access-token for authorization

insights application could return the HTTP error code 403, if the passed access-token is expired or not valid anymore, in which case, the developer needs to invoke the widget API again to get a new access-token.

If the developer needs to limit the graph to only certain agencies, the developer should use the URL parameter ‘agency’ , when invoking the widget API.

2.1 Federal activity graph 

The graph illustrates the activities of all major agencies such as CFPB, DOJ, DOL, EBSA etc. The document types include Enforcement, Agency update, Register notice etc.

federalActivityGraph

2.2 Agency Current year activity, e.g. FINRA  

FINRAActivityYeay

2.3 FINRA Enforcement, letter of acceptance document for Rainmaker Security  

rainmakerSecurityDoc