# Integration Specifications

## Integration Overview

Algolia helps businesses across industries quickly create relevant, scalable, and lightning-fast Search and Discovery experiences.

The Daasity Algolia integration returns data related to the performance of Site Search which allows merchants to understand what are the most important and trending terms that customers querying on the merchant site. This information is important because customers typically search for what is not easily found upon their visit. Algolia users may reveal product and merchandising opportunities that will lead to increased revenue.

## **Integration Availability**

This integration is available for:

* Enterprise

## API Endpoints

The Daasity Algolia extractor is built based on this [Algolia API Documentation](https://www.algolia.com/doc/rest-api/analytics/#search-analytics). The following endpoint is used by Daasity to replicate data from Algolia:

* [Top Searches](https://www.algolia.com/doc/rest-api/analytics/#get-top-searches)

## Entity Relationship Diagram (ERD)

[Click here to view the ERD for the Daasity Algolia integration](https://lucid.app/documents/embedded/37cd1b40-9a31-4509-a4cd-48a7c47b75b3) illustrating the different tables and keys to join across tables.

## Algolia Schema

The Daasity Algolia extractor creates these tables using the endpoints and replication methods listed. The data is mapped from source API endpoint to the table based on the mapping logic outlined in each table.

* [Searches](#searches)

{% @lucid/lucid-component url="<https://lucid.app/lucidchart/37cd1b40-9a31-4509-a4cd-48a7c47b75b3/edit?invitationId=inv_aca1e3e8-c707-48fc-a80b-634ce12fae1b>" fullWidth="true" %}

### **Searches**

* Endpoint: [Top Searches](https://www.algolia.com/doc/rest-api/analytics/#get-top-searches)
* Update Method: UPSERT
* Table Name: \[`algolia.searches`]

| JSON Element                           | Database Column          |
| -------------------------------------- | ------------------------ |
| MD5(search + ':' + event\_at)          | search\_id               |
| search                                 | search\_term             |
| startDate                              | event\_at                |
| count                                  | searches                 |
| nbHits                                 | hits                     |
| clickCount                             | clicks                   |
| conversionCount                        | conversions              |
| averageClickPosition                   | average\_click\_position |
| Daasity: MD5(search + event\_at)       | \_\_sync\_key            |
| Daasity: account\_id                   | \_account\_id            |
| Daasity: timestamp when loaded into DB | \_\_synced\_at           |


---

# 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://help.daasity.com/core-concepts/data-integrations/setup-guides/digital-integrations/algolia/integration-specifications.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.
