You can use the Smart Search feature to search for products in large and complex product catalogs with multiple levels of categories and stricter rules. The smart search typeahead mechanism and faceted search help narrow the search results and still honor product visibility and availability rules.

You must setup remote site before you configure settings for Smart Search. 

Setting up Remote Site Settings

Navigate to Setup > Administration Setup > Security Controls > Remote Site Settings and click New Remote Site to create the following records:

Record numberRemote Site NameRemote Site URL

1

SmartSearch

https://<SMART_SEARCH_URL>

Smart Search URL can be any of the following:

  • AZURE PREVIEW: smartsearch-prod.congacloud.com/
    (Nov 2016 SP1 GA - Version 9.1168 and above versions) 

For any fresh package installation, Azure URL defaults.

2

SFDC
  • For production environment, enter https://login.salesforce.com
  • For sandbox environment, enter https://test.salesforce.com
3OauthToken
  • For production environment, enter https://login.salesforce.com/services/oauth2/token
  • For sandbox environment, enter https://test.salesforce.com/services/oauth2/token

Creating a Certificate

Navigate to Setup > Administration Setup > Security Controls > Certificate and Key Management and click Create Self-Signed Certificate to create a new certificate with the following details:

  1. Enter JWT as the label for the certificate. The Unique Name defaults to JWT.
  2. Select the Exportable Private Key checkbox.
  3. Choose Key Size as 2048.
  4. Select the Active checkbox.
  5. Click Save.

Once you have created a certificate, go to your certificate record and click Download Certificate to store the certificate on your local system. You will need the certificate while creating a connected app.

Creating a Connected App

  1. Navigate to Setup > App Setup > Create > Apps.
  2. Scroll down and search for Connected Apps related list. Click New to create a new app.
  3. Enter the basic information, Connected App Name and API Name as CongaSmartSearch.
  4. In the API (Enable OAuth Settings) section, select Enable OAuth Settings checkbox.
  5. In the Callback URL, enter https://<login OR test>.salesforce.com/services/authcallback/<org-id>/CongaSmartSearch
    In <login OR test> enter login or test depending on your environment. In <org-id>, enter your org ID.
  6. Select the Use digital signatures check box. Choose the file from generated certificate.
  7. For Selected OAuth Scopes, select the following:
    • Access and manage your data (api)
    • Access and manage your Chatter data (chatter_api)
    • Perform requests on your behalf at any time (refresh_token, offline_access)
  8. Click Save.

Approving your Connected App

Before approving your connected app, you must decide which Oauth policy you would like to have. This policy decides which permitted users can work on Smart Search's admin page. Admin approved users are pre-authorized. You can also authorize other users and for such users, the steps mentioned in Approving your Connected App procedure are mandatory.

Step 1: Managing Profiles for Connected App

  1. Navigate to Setup > Administration setup > Manage Apps > Connected Apps.



  2. Next to the CongaSmartSearch connected app record, click Edit.
  3. Under the OAuth Policies section, in Permitted Users drop-down list, choose Admin Approved Users are Preauthorized and click Save.
  4. Scroll down and search for Profiles section. Click Manage Profiles and select the profiles that you want to give access to the Smart Search App.



  5. Click Save.


Step 2: Approving your Connected App

  1. Navigate to Setup > App Setup > Create > Apps.
  2. Scroll down and search for Connected Apps related list.
    Click your CongaSmartSearch record and save the values of the Consumer Key, Consumer Secret, and Callback URL fields in a text file. You will need these keys to set up the last step for smart search.
  3. Go to your browser URL, paste the following URL and click Enter:
    https://<login OR test>.salesforce.com/services/oauth2/authorize?response_type=code&client_id=<consumer-key>&redirect_uri=<callback-url>

    Use the correct domain for <login or test>, enter your consumer key and callback URL which you have fetched in the above step in <consumer-key> and <callback-url>.

    Note that <callback-url> needs to be encoded.

  4. Click Allow to give permission to your connected app.
  5. You will see the following page, which is the expected behavior of the app. You can now close the browser tab.