# Configuration

## Connect Your Org to the DarkSail API

### Create a Service Worker

* [ ] Navigate to the Salesforce Setup Menu by clicking the gear icon at the top of any Salesforce page and selecting "Setup"

<figure><img src="https://3394307815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB5WsldqXR9PZOJ5i23VQ%2Fuploads%2FORrPoHajTswhBr8tJTdE%2Fsetup.png?alt=media&#x26;token=ec22cbbd-ec77-45e2-849d-b1cc2f4ada41" alt=""><figcaption></figcaption></figure>

* [ ] Navigate to the Users setup page by entering the query *Users* in the Quick Find search box in the navigation bar on the left side of the page
* [ ] Create a new User by clicking the "New User" button

<figure><img src="https://3394307815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB5WsldqXR9PZOJ5i23VQ%2Fuploads%2FdJjqB6PgGs1rgQWKrSp5%2Fnew%20user.png?alt=media&#x26;token=f109c619-9dc8-45eb-8f9f-92246678e3ef" alt=""><figcaption></figcaption></figure>

* [ ] Assign the service worker User the "Salesforce Integration" User License and the "Minimum Access - API Only Integrations" Profile. Configure the other User settings as you see fit
* [ ] Save the new User by clicking the "Save" button
* [ ] On the Users setup page, view the service worker User you created by clicking the User's username
* [ ] Click the "Edit Assignments" button in the Permission Set Assignments section

<figure><img src="https://3394307815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB5WsldqXR9PZOJ5i23VQ%2Fuploads%2FMmVSrSCynmza2lUUIvhJ%2Fedit%20assignments.png?alt=media&#x26;token=45beca61-254e-4cec-92b5-b95b5e48091d" alt=""><figcaption></figcaption></figure>

* [ ] Under Available Permission Sets, find the "EchoServiceWorker" Permission Set, click it, and enable it for the User by clicking the "Add" button

### Configure the Echo Connected App

* [ ] Navigate to the Salesforce Setup Menu
* [ ] Navigate to the Manage Connected Apps setup page
* [ ] Click the "Edit" button next to the EchoCA Connected App listed in the table
* [ ] Under Custom Connected App Handler, enter the name of the service worker User in the Run As input field

### Configure the Echo Auth. Provider

* [ ] Navigate to the Salesforce Setup Menu
* [ ] Navigate to the Manage Connected Apps setup page
* [ ] Click the "View" button next to the EchoCA Connected App listed in the table
* [ ] Under API, click the "Manage Consumer Details" button
* [ ] Generate a new set of Consumer credentials by clicking the "Generate" button, and then save those credentials to the Connected App by clicking the "Apply" button
* [ ] In a new window, navigate to the Salesforce Setup Menu
* [ ] Navigate to the Auth. Providers setup page
* [ ] Click the "Edit" button next to the EchoAuthProv Auth. Provider listed in the table
* [ ] Copy the Consumer Key and Consumer Secret values from the Consumer Details page, and paste them into the corresponding fields on the Auth. Provider Edit page
* [ ] Enter *<https://your-domain.my.salesforce.com/services/oauth2/authorize>* in the Authorize Endpoint URL input field, replacing *your-domain* with your Org's My Domain
* [ ] Enter *<https://your-domain.my.salesforce.com/services/oauth2/token>* in the Token Endpoint URL input field, again replacing *your-domain* with your Org's My Domain
* [ ] Save the Auth. Provider configuration by clicking the "Save" button

### Configure the Echo Named Credentials

* [ ] Navigate to the Salesforce Setup Menu
* [ ] Navigate to the Named Credentials setup page
* [ ] Click the "Edit" button next to the EchoNCred Named Credential listed in the table
* [ ] Replace *your-domain* with your Org's My Domain in the URL input field
* [ ] Save the Named Credential configuration by clicking the "Save" button
* [ ] On the Named Credentials setup page, click the "Edit" button next to the EchoExtCred Named Credential listed in the table
* [ ] Replace *your-domain* with your Org's My Domain in the URL input field
* [ ] Save the Named Credential configuration by clicking the "Save" button

## Add the Lightning Background Utility Component to Your Org's Lightning Apps

* [ ] Navigate to the Salesforce Setup Menu
* [ ] Navigate to the App Manager setup page

Complete the following steps for each Lightning App you'd like to fingerprint all traffic to:

* [ ] Click the dropdown button and then the "Edit" button next to the Lightning App listed in the table

<figure><img src="https://3394307815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB5WsldqXR9PZOJ5i23VQ%2Fuploads%2Fxi3wm6VcRVpt2Ke8EJKC%2Fedit.png?alt=media&#x26;token=dcab3b4a-1c0c-46f8-b62f-edfa050c4a19" alt=""><figcaption></figcaption></figure>

* [ ] Navigate to the Utility Items App Settings page by clicking the "Utility Items (Desktop Only)" button in the navigation bar on the left side of the page

<figure><img src="https://3394307815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB5WsldqXR9PZOJ5i23VQ%2Fuploads%2F41UygxkiQdUBuuKZZRP3%2Futility%20items.png?alt=media&#x26;token=0312dbd1-2e6f-4810-ab11-5b04becbd959" alt=""><figcaption></figcaption></figure>

* [ ] Click the "Add Utility Item" button above the Utility Item table

<figure><img src="https://3394307815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB5WsldqXR9PZOJ5i23VQ%2Fuploads%2FzvkIJN4IM3GDHzSjNc3H%2Fadd%20utility%20item.png?alt=media&#x26;token=2a048367-810c-447e-96b1-a82bef79447c" alt=""><figcaption></figcaption></figure>

* [ ] Under the Custom - Managed section, click the "DarkSailFingerprinter" Utility Item to add it to your Lightning App
* [ ] Save the Lightning App configuration by clicking the "Save" button

<figure><img src="https://3394307815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB5WsldqXR9PZOJ5i23VQ%2Fuploads%2FryNP0g52ViYE0fCdiX7o%2Fsave.png?alt=media&#x26;token=e5b1cd98-9c12-4c1c-b56a-d24cf2b2ac91" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.darksail.ai/echo-salesforce/setup/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
