> For the complete documentation index, see [llms.txt](https://help.daasity.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.daasity.com/core-concepts/data-integrations/setup-guides/digital-integrations/retail-next/integration-specifications.md).

# Integration Specifications

## Integration Overview

RetailNext provides information on visitors to your brick & mortar stores so that you can understand foot traffic and in-store conversion.

The Daasity RetailNext integration provides data on the flow of customers in and out of retail locations.

## **Integration Availability**

This integration is available for:

* Enterprise

#### API Endpoints

The Daasity RetailNext extractor is built based on this [RetailNext API documentation](https://retailnext.atlassian.net/wiki/spaces/PUBLICDOCS/pages/174817482/API#Version-1-API).  The following endpoints are used by Daasity to replicate data from RetailNext:

* [Location](https://retailnext.atlassian.net/wiki/spaces/PUBLICDOCS/pages/174817482/API#Locations)
* [Datamine](https://retailnext.atlassian.net/wiki/spaces/PUBLICDOCS/pages/174817482/API#Datamine)

## Entity Relationship Diagram (ERD)

[Click here to view the ERD for the Daasity Retail Next integration](https://lucid.app/documents/embedded/2baae104-1290-4b25-a5a9-a920d7ef7325) illustrating the different tables and keys to join across tables

## Retail Next Schema

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

* [Locations](#locations)
* [Traffic](#traffic)

### **Locations**

* Endpoint: [Location](https://retailnext.atlassian.net/wiki/spaces/PUBLICDOCS/pages/174817482/API#Locations)
* Update Method: TRUNCSERT
* Table Name: \[`retailnext.locations`]

| JSON Element                           | Database Column |
| -------------------------------------- | --------------- |
| id                                     | location\_id    |
| name                                   | name            |
| type                                   | type            |
| parent\_id                             | parent\_id      |
| timezone                               | timezone        |
| store\_id                              | store\_id       |
| address::street\_address               | address         |
| comp\_start\_date                      | start\_date     |
| source\_id                             | \_\_source\_id  |
| MD5(id + source\_id)                   | \_\_sync\_key   |
| Daasity: timestamp when loaded into DB | \_\_synced\_at  |

### **Traffic**

* Endpoint: [Datamine](https://retailnext.atlassian.net/wiki/spaces/PUBLICDOCS/pages/174817482/API#Datamine)
* Update Method: UPSERT
* Table Name: \[`retailnext.traffic`]

| JSON Element                                                             | Database Column |
| ------------------------------------------------------------------------ | --------------- |
| MD5(location\_id + start\_date + traffic\_in::group::start)              | traffic\_id     |
| location\_id                                                             | location\_id    |
| date\_ranges::first\_day                                                 | start\_date     |
| date\_ranges::last\_day                                                  | end\_date       |
| traffic\_in::group::start                                                | hour\_begin     |
| traffic\_in::group::finish                                               | hour\_end       |
| traffic\_in::value                                                       | traffic\_in     |
| traffic\_out::value                                                      | traffic\_out    |
| source\_id                                                               | \_\_source\_id  |
| MD5(location\_id + start\_date + traffic\_in::group::start + source\_id) | \_\_sync\_key   |
| Daasity: timestamp when loaded into DB                                   | \_\_synced\_at  |
