# Simpplr

### Introduction <a href="#h_01h0d0ft4a75dvfj7k9nj1rd3w" id="h_01h0d0ft4a75dvfj7k9nj1rd3w"></a>

Simpplr is an employee intranet platform, with software that helps companies engage their workforce by streamlining internal communication and forging employee connections.

### Prerequisites <a href="#h_01h0d0fz9ysn4m8zpa9243dyd2" id="h_01h0d0fz9ysn4m8zpa9243dyd2"></a>

* Create a service account on Simpplr.
* Ask your Simpplr administrator to give the Aisera Service User Read/Write access to your data source for the User, Tickets, and Knowledge tables. If you're not going to write data back to Tickets or Generate Knowledge Articles, the Aisera Service User Account only needs Read access to these tables so they can transfer data to the internal Aisera cache where it will be used only for bot answers and Intent fulfillment.
* Ask your Simpplr administrator for the following Simpplr credentials for your Aisera Service User:
  * Authorization URL
  * Client Id
  * Client Secret code
  * Access Token URL

### Access <a href="#h_01h0d0g3w0s11sbgxp01wkjt21" id="h_01h0d0g3w0s11sbgxp01wkjt21"></a>

* You will need administrator access to set up Integration with Aisera.
* In order to create a connected app for Simpplr through Salesforce, refer to the following documentation:
  * [Creating & Configuring a Connected App in Salesforce](https://developer.simpplr.com/reference/creating-configuring-a-connected-app-in-salesforce)
  * [Authenticating via an External Application](https://developer.simpplr.com/reference/authenticating-via-an-external-application)
* Manually generating an access token through OAuth authentication.

### Simpplr Connected App in Salesforce  <a href="#h_01gjcf6wgemsn5j9g4me7zfvsp" id="h_01gjcf6wgemsn5j9g4me7zfvsp"></a>

**NOTE:** This section is based on [**this Simpplr documentation**](https://developer.simpplr.com/reference/creating-configuring-a-connected-app-in-salesforce).

In order to enable OAuth authorization with a Simpplr Instance, we need to create a connected app first within the Salesforce environment.&#x20;

1\. Login to your Simpplr Salesforce instance as the Salesforce System Administrator user

```
NOTE: If you are in Lightning Experience, click your profile and change to 
Salesforce Classic.
```

&#x20;2\. Click on **Setup** on the upper right side of the screen.&#x20;

<figure><img src="https://support.aisera.com/hc/article_attachments/10675411616653" alt=""><figcaption><p>Setup in Salesforce</p></figcaption></figure>

3\. Search for Apps in the **Search** field.&#x20;

<figure><img src="https://support.aisera.com/hc/article_attachments/10675676264205" alt=""><figcaption></figcaption></figure>

4\.  Under the **Build > Create** heading, select **Apps**.

<figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FCv3Rk6iKULcSwHbS26a5%2Fconnected_apps_new.png?alt=media&#x26;token=2d1efc6f-29b5-455a-937e-53cfb3498c9e" alt=""><figcaption></figcaption></figure>

5\. Click **New** in the **Connected Apps** section, at the bottom of the middle section.

<figure><img src="https://support.aisera.com/hc/article_attachments/10677000515213" alt="" width="563"><figcaption><p>Connected App</p></figcaption></figure>

6\. Enter in a **Connected App Name**. The API Name will auto-fill.

7. Type in your email.
8. In the **API** section, check the box to enable **OAuth Settings.**
9. Enter the **Callback URL** (the URL the browser will redirect back to after successful authorization).
10. Select the **OAuth Scopes** that you need, so they appear on the right side of the window.
11. Simpplr requires the following:

* Access and manage your data (api).
* Access your basic information (id, profile, email, address, phone).
* Perform requests on your behalf at any time (refresh\_token, offline\_access).
* Provide access to custom applications (visualforce).
* Provide access to your data via the Web (web).

<figure><img src="https://support.aisera.com/hc/article_attachments/10677218761101" alt=""><figcaption><p>Selecting OAuth Scopes</p></figcaption></figure>

### Configure the Connected App in Aisera sandboxes. <a href="#h_01gjcggcdzpk0gg1xbmj9w8y1e" id="h_01gjcggcdzpk0gg1xbmj9w8y1e"></a>

1\. Scroll to the bottom of the page and click **Save.**

<figure><img src="https://support.aisera.com/hc/article_attachments/10677297314061" alt=""><figcaption><p>Save</p></figcaption></figure>

**NOTE:** The system will inject a confirmation step to let you know that this could take up to 10 minutes to complete.

2. Click the **Continue** button.

**NOTE:**  When you click Save, the browser redirects to the **Connected App**'s **Detail** screen. Notice that the Consumer Key and Client Secret are provided. Be sure to take note of these two fields because the values will be used in the next sections.

## Integration with Aisera <a href="#h_01h0d0g8b6mjxrkckd69255txj" id="h_01h0d0g8b6mjxrkckd69255txj"></a>

Integration with Aisera is a 2-step process:

* Set up the Integration
* Set up the Data Source

After you have completed these steps, you can add Simpplr as a Data Source for your bot.

### Setting up an Integration <a href="#h_01h0d0gd133sgp9qka0h0a8mrb" id="h_01h0d0gd133sgp9qka0h0a8mrb"></a>

To setup the integration with your Aisera platform instance (tenant):

1. Navigate to **Settings > Integration** in your Aisera Admin UI.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FuzhWLeuAHZJ2l4Vdej7m%2Fsettings_integrations.png?alt=media&#x26;token=6af1ab2b-2b93-4981-bfb4-c0d78159af04" alt="" width="312"><figcaption><p>Choose Integrations</p></figcaption></figure></div>

2. Click on **+ New Integration**.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FJOFaMdSStxkWl7a8nggE%2Fnew_integration3.png?alt=media&#x26;token=32509515-99af-4538-966b-9d01e2e554cc" alt="" width="261"><figcaption></figcaption></figure></div>

3. Search for and then click on Simpplr.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FwY3y1ww5tGTdzXWmYdK9%2Fnew_integration_simpplr.png?alt=media&#x26;token=e2e7d02e-3d35-4ec5-89be-723656ddb6e9" alt="" width="375"><figcaption><p>Search for the Simpplr Integration</p></figcaption></figure></div>

3. Click the **Next** button.
4. Type in a **Name** for your Integration.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FPXb3CC6UbIyttZ5OeB5j%2Fsimpplr2.png?alt=media&#x26;token=3b488b70-15b6-471b-a6b3-9ca4f7bf385b" alt="" width="563"><figcaption><p>Name and Endpoint</p></figcaption></figure></div>

5. Add the **Endpoint**.
   1. If you are using **OAuth** authentication, the endpoint value should be the Simpplr API endpoint, for example: <https://api.ec.simpplr.com>
   2. If you are using **Basic** authentication, the endpoint value should be the Simpplr API endpoint, for example: <https://aisera22.my.salesforce.comhttps://api.ec.simpplr.com>
6. Choose the checkbox next to **Public**. This check box determines whether the integration can be used outside the firewall.
7. Type in the **Description** of your Integration.
8. Enter the credentials for the authentication type you have chosen. **OAuth** and **Basic** are the authentication types used most often with Simpplr.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FIFK36UMCD7WGKFHt2hqJ%2Fsimpplr3.png?alt=media&#x26;token=f25721ec-065a-4255-95c7-d6de48a41b10" alt="" width="563"><figcaption><p>OAuth Credentials for Simpplr</p></figcaption></figure></div>

Make sure that the Salesforce connected app is properly set up, with the appropriate redirect URL.

9. As mentioned above, add the credentials that you received from the Simpplr Admin.

   1. Select **OAuth** from the drop down in Auth Type.
   2. Type in the **Authorization URL**, **Client Id**, **Client Secret** code, **Access Token URL** into the respective fields.
   3. Click **OK**.

   After clicking **OK**, you will be asked if you want to be redirected to the Salesforce UI. You must accept that the required privileges be granted to Aisera Service User in order for the OAuth authentication to proceed.
10. Choose **OK** on the redirect pop-up.\
    \
    After giving the required permissions, you will be redirected back to Aisera’s UI, and you will see a Success message when the integration in complete.

### Set Up the Data Source <a href="#h_01h0d0gxvh2dhe8vyhmq6k4pwd" id="h_01h0d0gxvh2dhe8vyhmq6k4pwd"></a>

Now you need to configure how your data will be added to your Aisera tenant cache:

1. Log into Aisera with the Admin Service User credentials.
2. Navigate to **Settings > Data Source** in your Aisera Admin UI.
3. Choose **+ New Data Source**.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FY4gbqS6wPTtsBFPQcJSB%2Fds_simpplr.png?alt=media&#x26;token=c87ff1a7-d6fc-4ecd-a6da-690076eacc65" alt="" width="375"><figcaption><p>Set Up Simpplr Data Source</p></figcaption></figure></div>

4. Search for and then click on **Simpplr**.
5. Click on **Next**.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FP1AfWmT3VFTzB3CN6QVj%2Fds_functions.png?alt=media&#x26;token=84e1035d-d6ac-4646-a35d-62e19575a4ef" alt="" width="375"><figcaption></figcaption></figure></div>

6. Type in a **Name** for your Simpplr Data Source configuration.
7. Choose the Aisera **Functions** that you plan to perform using this Data Source. When you choose a Function from the pull-down list, more options appear for your configuration.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2F4DxVtNxzlM7jpAU27fop%2F2a.png?alt=media&#x26;token=5f073ca5-5455-4643-bf44-0e70b2b72d48" alt="" width="375"><figcaption><p>Second Data Source Configuration Screen</p></figcaption></figure></div>

8. Choose your Simpplr Integration (that you created in the previous section) from the drop down.
9. **Data Types** are objects of data fields that you have chosen to group together. If you have created Data Types for this Data Source, choose the ones you want to use with this tenant instance.
10. Select a **Schedule** for data pulls from the drop down.
11. Pick the **Language** you want your bot to use from the drop down.
12. Choose the **Premium** checkbox if you want data in this data source to take precedence over other data.
13. Add the **Public Domain**, if you are gathering information from public knowledge articles.
14. Select the **Auto Commit** checkbox if you want to commit all articles in the knowledge base.
15. Add a **Description** of the data in this Data Source.
16. Click **Next**.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FxUtj2tkKKeaEEGx9kHxv%2Fstep3.png?alt=media&#x26;token=588284c0-221f-48be-bab0-95e6c4d635de" alt="" width="375"><figcaption><p>Third Configuration Step for Adding Data Source</p></figcaption></figure></div>

17. **Instance URL**: this url is different than the API endpoint that is used in the Integration setup, it usually has the following format: [https://instanceName--simpplr.visualforce.com](https://instancename--simpplr.visualforce.com).
18. **Search Term**: If the Simpplr Integration was set up with Basic Authentication, then the value of this field will represent the search term that should be present in the fetched documents.\
    Usually a simple letter is used, for example “a”; this will lead to a crawl for all KBs that contain the string “a” in their title. If the Simpplr Integration was set up with OAuth, then this field is not used but the connector and any random value will suffice.
19. **Size**: This field represents the size of each batch of documents that will be fetched from the API.
20. **Email Header**: Provide the email of the user that own the Simpplr API Access.
21. **Download Files from Sites:** Type in the system name for files you want to download as part of the data ingestion.
22. **Provider:** If you're using a third-party data provider, enter it here.
23. **File Size:** Enter the size of the files you want to download.
24. **Custom Script:** Add the content of any scripts you want to run during the data ing**estion.**
25. **Event Type:** Add any event types that you have created to trigger data ingestion.
26. **Bypass Test Connection:** Type in the content of any bypass test connection code.
27. **Custom Query:** Include the content for any custom queries.
28. Click on **Next**.
29. Choose templates for your knowledge article ingestion in the **Templates** window.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2F1QgLtkdYrYPzpvxHqeo0%2Fstep4.png?alt=media&#x26;token=9c204510-ebc0-41fb-9f1d-a41b71b2d509" alt="" width="563"><figcaption><p>Template Form</p></figcaption></figure></div>

&#x20;       a. Choose **+ Add Template**.

&#x20;       b. Select the template you need from the drop down menu.

&#x20;       c. Click on **Next**.

30. The next window allows you to set the configuration for the knowledge articles that you want to ingest.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FjicjaKllL9gE9Ha78kbi%2Fstep5.png?alt=media&#x26;token=9fe8f1f6-8169-481e-ba3d-819d8f764448" alt="" width="563"><figcaption><p>Configuration for Ingested Articles</p></figcaption></figure></div>

&#x20;       a. Select the checkboxes for content input options the **Ingestion Configuration** page.

&#x20;       b. Click on **Next**.

31. Add any **Configuration** or **Transformation** scripts that you want the platform to use during data ingestion.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2Fg3hhLZUSf9xSPFB6oALt%2Fstep6.png?alt=media&#x26;token=7bd3c790-2dfd-46ef-840f-b1d77a7a37bc" alt="" width="375"><figcaption></figcaption></figure></div>

Your new Data Source should be ready to crawl for Knowledge Bases Articles to ingest data.

&#x20;
