# Integration Specifications

## Integration Overview

Ometria is a customer data and marketing platform that helps retailers drive CRM growth through their "Ometria Retail Sucess Model", which has proven to accelerate revenue.

There are two ways that Daasity pulls data from Ometria:

* Ometria API Endpoints
* Self-Serve Data Export: data is sent to an AWS S3 bucket (you can enter your S3 details or contact support to use the Daasity S3 server)

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

## API Endpoints

The Daasity Ometria extractor is built based on this [Ometria API documentation](https://docs.ometria.com/docs).  The following endpoints are used by Daasity to replicate data from Ometria:

* [Profiles](https://docs.ometria.com/reference/get_profiles-1)
* [Lists](https://docs.ometria.com/reference/get_lists)
* [Unsubscribes](https://docs.ometria.com/reference/get_unsubscribes)

## AWS S3 Feed

The Daasity Ometria extractor is also built based on this [Ometria Self-Serve Data Export documentation](https://support.ometria.com/hc/en-gb/articles/4406616340241-Self-serve-data-export). The following is used by Daasity to replicate data from Ometria:

* [Email Events](https://support.ometria.com/hc/en-gb/articles/4408501279121)

## Entity Relationship Diagram (ERD)

[Click here to view the ERD for the Daasity Ometria integration](https://lucid.app/documents/embedded/607277ba-aaa8-4ec9-9277-186a19429756) illustrating the different tables and keys to join across tables.

## Ometria Schema

The Daasity Ometria 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.

* [Profiles](#profiles)
* [Member Lists](#member-lists)
* [Lists](#lists)
* [Email Events](#email-events)
* [Unsubscribes](#unsubscribes)

### **Profiles**

* Endpoint: [Profiles](https://docs.ometria.com/reference/get_profiles-1)
* Update Method: UPSERT
* Table Name: \[`ometria.profiles`]

| JSON Element                           | Database Column         |
| -------------------------------------- | ----------------------- |
| id                                     | profile\_id             |
| email                                  | email                   |
| phone\_number                          | phone\_number           |
| customer\_id                           | customer\_id            |
| name                                   | customer\_name          |
| lastname                               | last\_name              |
| firstname                              | first\_name             |
| gender                                 | gender                  |
| country                                | country                 |
| marketing\_optin                       | marketing\_optin        |
| timezone                               | timezone                |
| date\_of\_birth                        | date\_of\_birth         |
| seen                                   | seen                    |
| lifecycle\_status                      | lifecycle\_status       |
| is\_email\_valid                       | is\_email\_valid        |
| properties::zip                        | zipcode                 |
| properties::city                       | city                    |
| properties::address1                   | address1                |
| properties::address2                   | address2                |
| properties::province                   | state                   |
| properties::shopify\_tags              | shopify\_tags           |
| dates::account\_created                | account\_created\_date  |
| update\_since                          | updated\_at             |
| dates::marketing\_optin                | marketing\_optin\_date  |
| dates::marketing\_optout               | marketing\_optout\_date |
| Daasity: account\_id                   | \_account\_id           |
| Daasity: source\_id                    | \_\_source\_id          |
| Daasity: MD5(source\_id + id)          | \_\_sync\_key           |
| Daasity: timestamp when loaded into DB | \_\_synced\_at          |

### **Member Lists**

* Endpoint: [Lists](https://docs.ometria.com/reference/get_lists)
* Update Method: UPSERT
* Table Name: \[`ometria.member_lists`]

| JSON Element                                            | Database Column  |
| ------------------------------------------------------- | ---------------- |
| MD5(source\_id + id + profile\_id + timestamp)          | member\_list\_id |
| id                                                      | list\_id         |
| profile\_id                                             | profile\_id      |
| email                                                   | email            |
| timestamp                                               | event\_at        |
| event                                                   | event            |
| Daasity: account\_id                                    | \_account\_id    |
| Daasity: source\_id                                     | \_\_source\_id   |
| Daasity: MD5(source\_id + id + profile\_id + timestamp) | \_\_sync\_key    |
| Daasity: timestamp when loaded into DB                  | \_\_synced\_at   |

### **Lists**

* Endpoint: [Lists](https://docs.ometria.com/reference/get_lists)
* Update Method: UPSERT
* Table Name: \[`ometria.lists`]

| JSON Element                           | Database Column   |
| -------------------------------------- | ----------------- |
| id                                     | list\_id          |
| title                                  | list\_title       |
| description                            | list\_description |
| status                                 | list\_status      |
| type                                   | list\_type        |
| timestamp\_created                     | created\_at       |
| timestamp\_stats\_updated              | updated\_at       |
| Daasity: account\_id                   | \_account\_id     |
| Daasity: source\_id                    | \_\_source\_id    |
| Daasity: MD5(source\_id + id)          | \_\_sync\_key     |
| Daasity: timestamp when loaded into DB | \_\_synced\_at    |

### **Email Events**

* Endpoint: [Email Events](https://support.ometria.com/hc/en-gb/articles/4408501279121)
* Update Method: UPSERT
* Table Name: \[`ometria.email_events`]

| JSON Element                                                        | Database Column  |
| ------------------------------------------------------------------- | ---------------- |
| MD5(source\_id + to\_address + event\_type + dt\_occurred)          | email\_event\_id |
| event\_id                                                           | event\_id        |
| uuid                                                                | send\_id         |
| to\_address                                                         | email            |
| event\_type                                                         | event\_type      |
| dt\_occurred                                                        | event\_at        |
| bounce\_class                                                       | bounce\_class    |
| reason                                                              | bounce\_reason   |
| device\_type                                                        | device\_type     |
| geo\_country                                                        | geo\_country     |
| geo\_region                                                         | geo\_region      |
| geo\_timezone                                                       | geo\_timezone    |
| target\_url                                                         | target\_url      |
| campaign\_title                                                     | campaign\_title  |
| campaign\_type                                                      | campaign\_type   |
| Daasity: account\_id                                                | \_account\_id    |
| Daasity: source\_id                                                 | \_\_source\_id   |
| Daasity: MD5(source\_id + to\_address + event\_type + dt\_occurred) | \_\_sync\_key    |
| Daasity: timestamp when loaded into DB                              | \_\_synced\_at   |

### **Unsubscribes**

* Endpoint: [Unsubscribes](https://docs.ometria.com/reference/get_unsubscribes)
* Update Method: UPSERT
* Table Name: \[`ometria.unsubscribes`]

| JSON Element                                       | Database Column           |
| -------------------------------------------------- | ------------------------- |
| MD5(source\_id + profile\_id + timestamp)          | unsubscribe\_id           |
| profile\_id                                        | profile\_id               |
| email\_address                                     | email                     |
| timestamp                                          | event\_at                 |
| send\_id                                           | send\_id                  |
| mass\_campaign\_id                                 | mass\_campaign\_id        |
| trigger\_campaign\_id                              | trigger\_campaign\_id     |
| reason                                             | unsubscribe\_reason       |
| reason\_text                                       | unsubscribe\_reason\_text |
| Daasity: account\_id                               | \_account\_id             |
| Daasity: source\_id                                | \_\_source\_id            |
| Daasity: MD5(source\_id + profile\_id + timestamp) | \_\_sync\_key             |
| 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/ometria/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.
