> 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  |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://help.daasity.com/core-concepts/data-integrations/setup-guides/digital-integrations/retail-next/integration-specifications.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
