# Integration Specifications

## Integration Overview

Yotpo is an eCommerce retention marketing platform that drives repeat shopper sales with connected solutions for reviews, SMS, email, loyalty, and subscriptions.

This document provides context on what kind of data is being gathered through this extractor, which endpoints that data is coming from, and how the extracted tables relate to each other.

## Integration Availability

This integration is available for:

* Enterprise
* Growth

## API Endpoints

The Daasity Yotpo extractor is built based on this [Yotpo API documentation](https://develop.yotpo.com/reference/getting-started-1#getting-started-1).  The following endpoints are used by Daasity to replicate data from Yotpo:

* [Reviews](https://develop.yotpo.com/reference/introduction-to-reviews)
* [Customers](https://develop.yotpo.com/reference/retrieve-customer-details-by-email)
* [Products](https://develop.yotpo.com/reference/introduction-to-products)

### Entity Relationship Diagram (ERD)

[Click here to view the ERD for the Daasity Yotpo integration](https://lucid.app/documents/embedded/c25ab871-a41c-4f8f-a845-4ac3c5b9ce12) illustrating the different tables and keys to join across tables.&#x20;

## Yotpo Schema

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

* [Reviews](#reviews)
* [Review Custom Data](#reviews-custom-data)
* [Custom Fields](#custom-fields)
* [Customers](#customers)
* [Customer Top Topics](#customer-top-topics)
* [Products](#products)

### **Reviews**

* Endpoint: [Reviews](https://develop.yotpo.com/reference/introduction-to-reviews)
* Update Method: UPSERT
* Table Name: \[`yotpo.reviews`]

| JSON Element           | Database Column                                          |
| ---------------------- | -------------------------------------------------------- |
| id                     | review\_id                                               |
| title                  | title                                                    |
| content                | content                                                  |
| score                  | score                                                    |
| votes\_up              | votes\_up                                                |
| votes\_down            | votes\_down                                              |
| created\_at            | created\_at                                              |
| updated\_at            | updated\_at                                              |
| sentiment              | sentiment                                                |
| sku                    | sku                                                      |
| name                   | name                                                     |
| email                  | email                                                    |
| reviewer\_type         | reviewer\_type                                           |
| deleted                | deleted                                                  |
| user\_reference        | user\_reference                                          |
| \_\_source\_id         | Unique id (entered by customer) during integration setup |
| MD5(id:\_\_source\_id) | \_\_sync\_key                                            |

### **Reviews Custom Data**

* Endpoint: [Reviews](https://develop.yotpo.com/reference/introduction-to-reviews)
* Update Method: UPSERT
* Table Name: \[`yotpo.review_custom_data`]

| JSON Element                | Database Column   |
| --------------------------- | ----------------- |
| id                          | review\_id        |
| cf\_id                      | custom\_field\_id |
| MD5(id + cf\_id + app\_key) | \_\_sync\_key     |

### **Custom Fields**

* Endpoint: [Reviews](https://develop.yotpo.com/reference/introduction-to-reviews)
* Update Method: UPSERT
* Table Name: \[`yotpo.custom_fields`]

| JSON Element           | Database Column   |
| ---------------------- | ----------------- |
| cf\_id                 | custom\_field\_id |
| cf\_dat::title         | title             |
| cf\_data::value        | value             |
| cf\_data::field\_type  | field\_type       |
| cf\_data::form\_id     | form\_id          |
| MD5(cf\_id + app\_key) | \_\_sync\_key     |

### **Customers**

* Endpoint: [Customers](https://develop.yotpo.com/reference/retrieve-customer-details-by-email)
* Update Method: UPSERT
* Table Name: \[`yotpo.customers`]

| JSON Element                                           | Database Column                                        |
| ------------------------------------------------------ | ------------------------------------------------------ |
| customer::customer\_email                              | customer\_email                                        |
| reviews\_statistics::total\_reviews                    | reviews\_statistics\_total\_reviews                    |
| reviews\_statistics::avg\_product\_rating              | reviews\_statistics\_avg\_product\_rating              |
| reviews\_statistics::avg\_site\_rating                 | reviews\_statistics\_avg\_site\_rating                 |
| reviews\_statistics::total\_avg\_rating                | reviews\_statistics\_total\_avg\_rating                |
| reviews\_statistics::sentiment\_avg\_product           | reviews\_statistics\_sentiment\_avg\_product           |
| reviews\_statistics::sentiment\_avg\_site              | reviews\_statistics\_sentiment\_avg\_site              |
| reviews\_statistics::total\_avg\_sentiment             | reviews\_statistics\_total\_avg\_sentiment             |
| loyalty\_statistics::points\_earned                    | loyalty\_statistics\_points\_earned                    |
| loyalty\_statistics::point\_balance                    | loyalty\_statistics\_point\_balance                    |
| loyalty\_statistics::total\_redemptions                | loyalty\_statistics\_total\_redemptions                |
| loyalty\_statistics::total\_points\_redeemed           | loyalty\_statistics\_total\_points\_redeemed           |
| loyalty\_statistics::vip\_tier\_name                   | loyalty\_statistics\_vip\_tier\_name                   |
| loyalty\_statistics::successfull\_referales            | loyalty\_statistics\_successfull\_referales            |
| loyalty\_statistics::referrales\_made\_and\_clicked    | loyalty\_statistics\_referrales\_made\_and\_clicked    |
| loyalty\_statistics::is\_referred\_by\_other\_customer | loyalty\_statistics\_is\_referred\_by\_other\_customer |
| MD5(customer::customer\_email + app\_key)              | \_\_sync\_key                                          |

### **Customer Top Topics**

* Endpoint: [Customers](https://develop.yotpo.com/reference/retrieve-customer-details-by-email)
* Update Method: UPSERT
* Table Name: \[`yotpo.customer_top_topics`]

| JSON Element                                          | Database Column                |
| ----------------------------------------------------- | ------------------------------ |
| customer::customer\_email                             | customer\_email                |
| top\_topic                                            | review\_statistics\_top\_topic |
| MD5(customer::customer\_email + top\_topic + app\_key | \_\_sync\_key                  |

### **Products**

* Endpoint: [Products](https://develop.yotpo.com/reference/introduction-to-products)
* Update Method: UPSERT
* Table Name: \[`yotpo.products`]

| JSON Element          | Database Column       |
| --------------------- | --------------------- |
| id                    | product\_id           |
| external\_product\_id | external\_product\_id |
| description           | description           |
| url                   | url                   |
| name                  | name                  |
| category::id          | category\_id          |
| category::name        | category\_name        |
| average\_score        | average\_score        |
| total\_reviews        | total\_reviews        |
| created\_at           | created\_at           |
| updated\_at           | updated\_at           |
| MD5(id + app\_key)    | \_\_sync\_key         |


---

# 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/yotpo/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.
