Widget Sandbox Documentation

The Widget Sandbox page demonstrates what Clarity AI Widgets look like and allows you to better understand how to integrate them into your own Web pages.

Login is optional to view this page. If you are logged in, you will be able to see your own data automatically populated, e.g. your API key, secret and token, your portfolios

Select Widget Type

Select the Widget entities and Widget module

Depending on ‘Widget entity’ selection, the populated options for ‘Widget module’ will vary

  • organizations: esg-risk, esg-impact, sdg
  • funds: esg-risk, esg-impact, climate, sdg, exposures, impact-highlights
  • portfolios: esg-risk, esg-impact, climate, sdg, exposures, impact-highlights, eu-taxonomy

Get a Token

Copy & paste your API key and secret and click on generate. The API key and secret will be pre-populated if you are already logged in to the WebApp. The token will expire in 60 mins.

Specific Widget Sections

The fields available here will be different depending on the Widget you’ve selected at the top of the page.

If you select Widget entity ‘portfolios’, an optional “Ephemeral” checkbox appears. Ephemeral Portfolios are portfolios that you create for retrieving data but they are not stored anywhere and their composition cannot be retrieved at a later date. If checked, you must directly provide the ISINs you are interested in. If unchecked, the PortfolioId must be provided. Please note only esg-risk module supports ephemeral portfolios. The portfolio composition should be in JSON format. E.g.:

[{"isin": "US0378331005", "percentage": 50 }, {"isin": "SE0000108649", "percentage": 50 }]

Scores: These are module-specific metrics. Please refer to the data dictionary for a full list of metrics per module.

Language: supported languages include English, Spanish, Italian, French

Optional Sections: Add/Remove optional sections from the Widget (e.g. key scores or top ten orgs) as needed

Premium Options (only available under selection organizations and esg-risk)

Allows graying out sections displaying more granular information with a padlock image in the widget, e.g. showing key scores or industry scores.

Tracking

Enter any unique identifier for your user with no personal information. This allows you to identify if your users are recurring users or not.

Customization

This allows you to define the look and feel of the widget, e.g. font colour, size, table header, etc.

You can experiment with the CSS styles of your widget.

Summary of Mandatory and Optional input parameters for Widget creation, by Module:

Portfolio Organization Fund
Mandatory Optional Mandatory Optional Mandatory Optional
ESG Risk PortfolioID, Language Key Scores (include specific ScoreIds), Top 10 Orgs, Tracking, Customization Organization ISIN(s), Language Key Scores (include specific ScoreIds), Industry Scores, Premium Options, Tracking, Customization Fund Name or Fund ISIN, Language Key Scores (include specific ScoreIds), Tracking, Customization
ESG Impact PortfolioID, Language Key Scores (include specific ScoreIds), Top 10 Orgs, Tracking, Customization Organization ISIN(s), Language Key Scores (include specific ScoreIds), Industry Scores, Premium Options, Tracking, Customization Fund Name or Fund ISIN, Language Key Scores (include specific ScoreIds), Tracking, Customization
EU-Tax PortfolioID, Language Tracking, Customization N/A N/A N/A N/A
SFDR N/A N/A N/A N/A N/A N/A
Exposures PortfolioID, Language, Exposure(s) e.g. C_EXP_ALCOHOLIC_BEVERAGES Tracking, Customization N/A N/A Fund Name or ISIN, Language, Exposure(s) e.g. C_EXP_ALCOHOLIC_BEVERAGES Tracking, Customization
Impact Highlights PortfolioID, Language Tracking, Customization N/A N/A Fund Name or Fund ISIN, Language Tracking, Customization
Climate PortfolioID, Language Top 10 orgs, Tracking, Customization N/A N/A Fund Name or Fund ISIN, Language Tracking, Customization
SDG PortfolioID, Language Top 10 orgs, Tracking, Customization Organization ISIN(s), Language Industry Scores, Premium Options, Tracking, Customization Fund Name or Fund ISIN, Language Tracking, Customization

Snippet

The final result of the choices made in the previous sections is the code snippet generated in this final section.

Copy and paste the snippet into your own web page and have your first widget working

It should be compatible with any Framework, as the code is generic HTML+JS+CSS.

Error Handling

By design, due to data sensitivity and for security reasons, our error messages are relatively generic yet informative.

Invalid ISIN

An incorrectly entered or invalid ISIN will return an error indicating the security or organization is unsupported.

Invalid Score

An incorrectly entered Score will result in a ‘Service unavailable’ image being displayed:

Incorrect PortfolioId

Logged-out users entering an incorrect PortfolioId will receive the error ‘Sorry, we couldn’t find this portfolio’. Logged-in users are required to select their Portfolio from a drop-down and can not face this error.