<!-- Source: https://docs.squirro.com/en/latest/products/installation/salesforce-federated.html -->
# Salesforce Federated Search Installation

Salesforce federated search is a simple integration of an existing Squirro project into the default search of Salesforce.

No installation of a Salesforce App is required.

## Setup

### 1. Enable the Opensearch API in Squirro

1. Identify the project id of the Squirro project you want to integrate into Salesforce via federated search.
2. Generate a non-admin, read-only user for this project. Generate an API token for this user.
3. Add a configuration section to `/etc/squirro/frontend.ini` with the following content:

   ```ini
   [opensearch_api]
   # Whitelist all project ids that expose the opensearch API.
   # Only configure projects here that contain public data as of today we have no
   # authentication in place.
   # Multiple projects can be separated by comma.
   project_ids = abc...

   # use a read-only api token for a non-admin user.
   token = abc...

   #query cache time in seconds
   query_cache_ttl = 60
   ```
4. Restart the frontend service
5. Navigate to the settings page of the configured project
6. Click the Opensearch API Studio Plugin link on the left
7. Click GO TO DESCRIPTION XML
8. Copy the URL of the description xml file. You’ll need this for setting up Salesforce.

[![image1](https://s3.amazonaws.com/download.squirro.net/docs/migrated-attachments/369033287/369590384.png)](https://s3.amazonaws.com/download.squirro.net/docs/migrated-attachments/369033287/369590384.png)

[![image2](https://s3.amazonaws.com/download.squirro.net/docs/migrated-attachments/369033287/369557570.png)](https://s3.amazonaws.com/download.squirro.net/docs/migrated-attachments/369033287/369557570.png)

### 2. Configure Federated Search within Salesforce

1. Log in to Salesforce and go to Setup
2. Type _External Data Sources_ into the search box and select it.
3. Click New External Data Source
4. Give it a Label and a Name. Select Federated Search: OpenSearch as Type
5. Enter the copied description xml URL from step 8 above into the field _OpenSearchDescription URL_

[![image3](https://s3.amazonaws.com/download.squirro.net/docs/migrated-attachments/369033287/369164402.png)](https://s3.amazonaws.com/download.squirro.net/docs/migrated-attachments/369033287/369164402.png)

1. Click Save
2. Click Validate and Sync on the next page

[![image4](https://s3.amazonaws.com/download.squirro.net/docs/migrated-attachments/369033287/369623176.png)](https://s3.amazonaws.com/download.squirro.net/docs/migrated-attachments/369033287/369623176.png)

1. Select your datasource in the table and click Sync

[![image5](https://s3.amazonaws.com/download.squirro.net/docs/migrated-attachments/369033287/369459295.png)](https://s3.amazonaws.com/download.squirro.net/docs/migrated-attachments/369033287/369459295.png)

1. You’re done! Now, all Squirro items are now searched within Salesforce standard search.
