# Configuring New Locations

This outlines the processes necessary to configure a location in the database and begin pulling data

# Toast

## <span style="text-decoration: underline; color: #e67e23;">Gather POS Information</span>

1\. In order to configure customers who utilize **Toast** as their POS provider the Customer Success team needs to have the customer create an account for us with the appropriate reporting privileges. Visit the [Toast Homepage](https://pos.toasttab.com/) in a web browser and proceed to **Login** - input the BarTrack `technology@bartrack.beer` credentials

2\. Locate `Switch Restaurant` on the top left side of the webpage and then click it and find the location you're trying to configure - you can either manually search the list or enter the establishment name into the filter

[![image-1651060456221.54.09 AM.png](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/scaled-1680-/image-1651060456221-54-09-am.png)](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/image-1651060456221-54-09-am.png)

3\. Once the location has been found, make note of the establishment name and copy it exactly as displayed in the Toast dashboard. It is extremely important that this is accurately captured - if there are two lines, separate the content of the bottom and top line with a dash.

- In the screenshot above, we would want to record their location name as, `QBar Darien - 8109 cass avenue` in the database.

4\. The next step is to determine how the customer utilizes their Point of Sale system - particularly as it relates to Categories, and Sub-Categories. Navigate to the [Menus &gt; Item Details](https://www.toasttab.com/restaurants/admin/reports/home#selection-details) page to pull up a breakdown of all the sales data at the establishment - you should select the date range for a busy day of the week such as Friday or Saturday.

[![image-1651061810879.16.48 AM.png](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/scaled-1680-/image-1651061810879-16-48-am.png)](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/image-1651061810879-16-48-am.png)

- Once you've generated data for your specified date, try sorting by **Sales Category** or **Menu** to identify where the draft beer sales are.
- Toast has 3 layers of organizational hierarchy whereas we are only capturing 2 - *Category* and *Sub-Category*. You will need to use your judgment to determine which ones that we want to utilize, in the example above I assign `Menu Group` as the **Category** and `Sales Category` as the **Sub-Category**

<p class="callout danger">The **Category** and **Sub-Category** will be different for every location - you will need to manually investigate this to ensure the data comes in clean for SKU mapping, otherwise we'll have to re-pull the data</p>

5\. The last step in the Toast dashboard is to determine if a customer utilizes modifiers for their Draft Beer products. Once you're done identifying the **Category** and **Sub-Category** usage, click on one the Draft Beer items and it will pull up the *Order Details* - if you scroll down you'll see a list of items on the order and there will be a column labeled `Modifiers`.

[![image-1651062498384.28.15 AM.png](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/scaled-1680-/image-1651062498384-28-15-am.png)](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/image-1651062498384-28-15-am.png)

- If there are things related to the glassware size, we will want to ensure that modifiers are marked as TRUE - otherwise, if modifiers do not appear to be a determining factor in identifying what a SKU represents mark this as FALSE

<p class="callout info">The Onboarding Team should have already identified if the customer utilizes modifiers so you can ask them for that information, otherwise, you can verify this yourself by looking at the data in Toast.</p>

- - - - - -

## <span style="text-decoration: underline; color: #e67e23;">Database Configuration</span>

1\. The next step in the configuration process is updating the **establishments** table of the database to reflect the necessary information for the integration. The primary things that you'll need to know are as follows:

- Establishment ID
- Timezone
- Location Name from Toast Dashboard
- Modifier Usage
- Category / Sub-Category

Once you have collected all of the necessary information you can proceed with executing the SQL query below, this will prompt you to enter several variables which encompass the information you captured above -

```SQL
UPDATE <br></br>    establishments<br></br>SET <br></br>    integration_id = 4, <br></br>    default_pour_cost_pct = 20, <br></br>    pos_hour_integration_done = 5, <br></br>    pos_cloud_based = true, <br></br>    pos_modifiers = ${pos_modifier_flag}$, <br></br>    time_zone = '${timezone}$', <br></br>    pos_properties = '{"header_titles": {"category": "${category}$", "subcategory": "${subcategory}$"}, "location_pos_name": "${establishment_toast_name}$"}'<br></br>WHERE <br></br>    id = ${establishment_id}$;
```

**Example Data for Variables -**

```
Name                     Value          <br></br>------------------------ -------------- <br></br>pos_modifier_flag        true           <br></br>timezone                 US/Eastern    <br></br>category                 Menu           <br></br>subcategory              Sales Category <br></br>establishment_toast_name Test Name      <br></br>establishment_id         1              <br></br>
```

- - - - - -

## <span style="text-decoration: underline; color: #e67e23;">Server Configuration</span>

1\. The final step of the configuration process is to SSH onto the POS server to modify the `settings.json` file and insert a new record for the location you are configuring - this can be found in the `/home/ubuntu/bartrack-pos/integrations/cli` directory on the server.

2\. In the configuration file you will need to locate the section for `toast` and then scroll to the bottom of that list of entries, see the screenshot below for reference -

[![image-1651063505662.png](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/scaled-1680-/image-1651063505662.png)](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/image-1651063505662.png)

3\. Once you have found the section, you will need to insert a record in the chronological position based on the `establishment_id`. In order to minimize error, it is recommended to copy the existing structure and paste it into the necessary position and then modifying the `establishment_id`. Once the changes have been finalized be sure to save your changes.

<p class="callout warning">Make sure you are careful when editing the configuration file - incorrect formatting will result in the inability to pull POS data for any locations on the server. In order to minimize error, it is recommended to copy the existing structure and paste it into the necessary position - modifying the establishment </p>

4\. Now that the establishment has been correctly configured you will be able to pull the POS data for the location, you will need to pull the data from the **Activation Date** onwards - it is recommended to pull at least one day of data to ensure that things are operational and there were no configuration-related issues.

# Omnivore

## <span style="text-decoration: underline;"><span style="color: #e67e23; text-decoration: underline;">Gather POS Information</span></span>

1\. In order to configure customers who utilize **Omnivore** for their POS Integration the Customer Success team needs to have the customer install the Omnivore agent on their back-office machine. Visit the [Omnivore Control Panel Login](https://panel.omnivore.io/login) in a web browser and proceed to **Login** - input the BarTrack `technology@bartrack.beer` credentials

2\. Navigate to the `Locations` tab on the top center of the webpage menu - this will provide you a list of all of the customers that are currently integrated with BarTrack through Omnivore. You may utilize the search box on the top right side of the screen to quickly filter locations. See the attached image below for reference -

[![image-1651065136740.png](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/scaled-1680-/image-1651065136740.png)](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/image-1651065136740.png)

3\. Once you have found the location you're looking to configure, you will want to click on that customer and cross-reference the address displayed here with what we have captured in the database to ensure that we are referencing the correct location. Once you have confirmed that the location is valid, you will need to copy the `Location ID`

[![image-1651065215673.png](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/scaled-1680-/image-1651065215673.png)](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/image-1651065215673.png)

<p class="callout info">While here, it is useful to also reference the **Status** and **Ping Latency** in order to determine if there are any issues. As long as the status indicates they are Online and the ping latency does not have any significant yellow or red periods you are good to proceed.</p>

<p class="callout warning">If you do not see a location in the Omnivore Control Panel or their **Status** is offline - please contact the Customer Success team to coordinate a meeting with the customer</p>

- - - - - -

## <span style="text-decoration: underline; color: #e67e23;">Database Configuration</span>

1\. The next step in the configuration process is updating the **establishments** table of the database to reflect the necessary information for the integration. The primary things that you'll need to know are as follows:

- Establishment ID
- Timezone
- Modifier Usage
- Location Identifier

<p class="callout info">The Onboarding Team should have already identified if the customer utilizes modifiers so you will need to ask them for that information - if they are unsure, set this to FALSE and then reference the POS data that is captured</p>

Once you have collected all of the necessary information you can proceed with executing the SQL query below, this will prompt you to enter several variables which encompass the information you captured above -

```SQL
UPDATE <br></br>    establishments<br></br>SET <br></br>    integration_id = 1, <br></br>    default_pour_cost_pct = 20, <br></br>    pos_hour_integration_done = 5, <br></br>    pos_cloud_based = true, <br></br>    pos_modifiers = ${pos_modifier_flag}$, <br></br>    time_zone = '${timezone}$', <br></br>    pos_properties = '{"processed_locations_ids": ["${location_id}$"]}'<br></br>WHERE <br></br>    id = ${establishment_id}$;
```

**Example Data for Variables -**

```
Name                     Value          <br></br>------------------------ -------------- <br></br>pos_modifier_flag        true           <br></br>timezone                 US/Eastern    <br></br>location_id 			 i6EzBB4T      <br></br>establishment_id         1              
```

- - - - - -

## <span style="text-decoration: underline; color: #e67e23;">Server Configuration</span>

1\. The final step of the configuration process is to SSH onto the POS server to modify the `settings.json` file and insert a new record for the location you are configuring - this can be found in the `/home/ubuntu/bartrack-pos/integrations/cli` directory on the server.

2\. In the configuration file you will need to locate the section for `omnivore` and then scroll to the bottom of that list of entries, see the screenshot below for reference -

[![image-1651065864710.24.20 AM.png](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/scaled-1680-/image-1651065864710-24-20-am.png)](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/image-1651065864710-24-20-am.png)

3\. Once you have found the section, you will need to insert a record in the chronological position based on the `establishment_id`. In order to minimize error, it is recommended to copy the existing structure and paste it into the necessary position and then modifying the `establishment_id`. Once the changes have been finalized be sure to save your changes.

<p class="callout warning">Make sure you are careful when editing the configuration file - incorrect formatting will result in the inability to pull POS data for any locations on the server. In order to minimize error, it is recommended to copy the existing structure and paste it into the necessary position - modifying the establishment </p>

4\. Now that the establishment has been correctly configured you will be able to pull the POS data for the location, you will need to pull the data from the **Activation Date** onwards - it is recommended to pull at least one day of data to ensure that things are operational and there were no configuration-related issues.

# Square

## <span style="text-decoration: underline; color: #e67e23;">Gather POS Information</span>

1\. In order to configure customers who utilize **Square** as their POS provider, the Customer Success team needs to gather an `Access Token` from the customer.

- The Customer Success team typically shares this in the [\#customer-pos-integrations](https://bartrack.slack.com/archives/C01V90HPYAJ) Slack channel or [Customer Onboarding Tracker](https://docs.google.com/spreadsheets/d/1IBeZlgJ_QjTNu7DRPAYuL-pgQR3NyUhv88KPFtXC2es/edit#gid=0) spreadsheet

2\. Once you have obtained an `Access Token` for a customers location, you will need to execute the following command on your Terminal -

```shell
curl https://connect.squareup.com/v2/locations \<br></br>  -H 'Square-Version: 2022-02-16' \<br></br>  -H 'Authorization: Bearer EAAAEP2HXAiYWQuoUlL0igb9C2-3HCaahVOdrfSPS7LnB4dwiyRUCBgyXo-IeMKs' \<br></br>  -H 'Content-Type: application/json'
```

<p class="callout warning">Make sure to replace the bearer token in the provided example with the Access Token that the customer provided</p>

3\. After executing the command the server will return a large JSON object of location(s). You should utilize a [JSON Formatter](https://jsonformatter.org/json-pretty-print) to make this more legible, the output should look similar to the example below -

```JSON
{<br></br>  "locations": [<br></br>    {<br></br>      "id": "4D09GFZF388XW",<br></br>      "name": "Palate Bottle Shop",<br></br>      "address": {<br></br>        "address_line_1": "1007 N. 4th Street",<br></br>        "locality": "Wilmington",<br></br>        "administrative_district_level_1": "NC",<br></br>        "postal_code": "28401",<br></br>        "country": "US"<br></br>      },<br></br>      "timezone": "America/New_York",<br></br>      "capabilities": [<br></br>        "CREDIT_CARD_PROCESSING",<br></br>        "AUTOMATIC_TRANSFERS"<br></br>      ],<br></br>      "status": "ACTIVE",<br></br>      ...<br></br>  ]<br></br>}
```

4\. Once you have formatted the JSON object, you will need to find the location that represents the one you are currently trying to configure - be sure to validate the address as there might be multiple different locations under one account. Once you have identified the location you will need to copy the `id` value.

<p class="callout info">If there are no locations in the JSON object that match the location in the database, reach out to the Onboarding team and have them verify the address and which location that we are supposed to use for our integration</p>

- - - - - -

## <span style="text-decoration: underline; color: #e67e23;">Database Configuration</span>

1\. The next step in the configuration process is updating the **establishments** table of the database to reflect the necessary information for the integration. The primary things that you'll need to know are as follows:

- Establishment ID
- Timezone
- Location ID (Square)
- Modifier Usage

<p class="callout info">The Onboarding Team should have already identified if the customer utilizes modifiers so you will need to ask them for that information - if they are unsure, set this to FALSE and then reference the POS data that is captured</p>

Once you have collected all of the necessary information you can proceed with executing the SQL query below, this will prompt you to enter several variables which encompass the information you captured above -

```SQL
UPDATE <br></br>    establishments<br></br>SET <br></br>    integration_id = 3, <br></br>    default_pour_cost_pct = 20, <br></br>    pos_hour_integration_done = 5, <br></br>    pos_cloud_based = true, <br></br>    pos_modifiers = ${pos_modifier_flag}$, <br></br>    time_zone = '${timezone}$', <br></br>    pos_properties = '{"locations_id": "${location_id}$"}'<br></br>WHERE <br></br>    id = ${establishment_id}$;
```

**Example Data for Variables -**

```
Name                     Value          <br></br>------------------------ -------------- <br></br>pos_modifier_flag        true           <br></br>timezone                 US/Eastern    <br></br>location_id              4D09GFZF388XW             <br></br>establishment_id         1              <br></br>
```

- - - - - -

## <span style="text-decoration: underline; color: #e67e23;">Server Configuration</span>

1\. The final step of the configuration process is to SSH onto the POS server to modify the `settings.json` file and insert a new record for the location you are configuring - this can be found in the `/home/ubuntu/bartrack-pos/integrations/cli` directory on the server.

2\. In the configuration file you will need to locate the section for `square` and then scroll to the bottom of that list of entries, see the screenshot below for reference -

[![image-1651068845454.13.59 AM.png](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/scaled-1680-/image-1651068845454-13-59-am.png)](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/image-1651068845454-13-59-am.png)

3\. Once you have found the section, you will need to insert a record in the chronological position based on the `establishment_id`. In order to minimize error, it is recommended to copy the existing structure and paste it into the necessary position and then modifying the `establishment_id` and `access token` to reflect the location you're configuring. Once the changes have been finalized be sure to save your changes.

<p class="callout warning">Make sure you are careful when editing the configuration file - incorrect formatting will result in the inability to pull POS data for any locations on the server. In order to minimize error, it is recommended to copy the existing structure and paste it into the necessary position - modifying the establishment </p>

4\. Now that the establishment has been correctly configured you will be able to pull the POS data for the location, you will need to pull the data from the **Activation Date** onwards - it is recommended to pull at least one day of data to ensure that things are operational and there were no configuration-related issues.

# UpServe

## <span style="text-decoration: underline;"><span style="color: #e67e23; text-decoration: underline;">Gather POS Information</span></span>

1\. In order to configure customers who utilize **UpServe** as their POS provider the Customer Success team needs to have the customer create a guest account for us using the integration email address. Visit the [UpServe Dashboard](https://reports.breadcrumb.com/login) in a web browser and proceed to login - input the BarTrack `technology@bartrack.beer` credentials

2\. Upon authentication, utilize the search box to identify the location you're attempting to configure. Once you've found the location, make a note of the establishment name.

[![image-1651073590206.33.07 AM.png](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/scaled-1680-/image-1651073590206-33-07-am.png)](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/image-1651073590206-33-07-am.png)

- - - - - -

## <span style="text-decoration: underline; color: #e67e23;">Database Configuration</span>

1\. The next step in the configuration process is updating the **establishments** table of the database to reflect the necessary information for the integration. The primary things that you'll need to know are as follows:

- Establishment ID
- Timezone
- Location Name (UpServe)
- Modifier Usage

<p class="callout info">The Onboarding Team should have already identified if the customer utilizes modifiers so you will need to ask them for that information - if they are unsure, set this to FALSE and then reference the POS data that is captured</p>

Once you have collected all of the necessary information you can proceed with executing the SQL query below, this will prompt you to enter several variables which encompass the information you captured above -

```SQL
UPDATE <br></br>    establishments<br></br>SET <br></br>    integration_id = 5, <br></br>    default_pour_cost_pct = 20, <br></br>    pos_hour_integration_done = 5, <br></br>    pos_cloud_based = true, <br></br>    pos_modifiers = ${pos_modifier_flag}$, <br></br>    time_zone = '${timezone}$', <br></br>    pos_properties = '{"location_pos_name": "${location_name}$"}'<br></br>WHERE <br></br>    id = ${establishment_id}$;
```

**Example Data for Variables -**

```
Name                     Value          <br></br>------------------------ -------------- <br></br>pos_modifier_flag        true           <br></br>timezone                 US/Eastern    <br></br>location_name            Outer Range Brewing Company            <br></br>establishment_id         1              
```

- - - - - -

## <span style="text-decoration: underline; color: #e67e23;">Server Configuration</span>

1\. The final step of the configuration process is to SSH onto the POS server to modify the `settings.json` file and insert a new record for the location you are configuring - this can be found in the `/home/ubuntu/bartrack-pos/integrations/cli` directory on the server.

2\. In the configuration file you will need to locate the section for `upserve` and then scroll to the bottom of that list of entries, see the screenshot below for reference -

[![image-1651073967644.39.24 AM.png](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/scaled-1680-/image-1651073967644-39-24-am.png)](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/image-1651073967644-39-24-am.png)

3\. Once you have found the section, you will need to insert a record in the chronological position based on the `establishment_id`. In order to minimize error, it is recommended to copy the existing structure and paste it into the necessary position and then modifying the `establishment_id` to reflect the location you're configuring. Once the changes have been finalized be sure to save your changes.

<p class="callout warning">Make sure you are careful when editing the configuration file - incorrect formatting will result in the inability to pull POS data for any locations on the server. In order to minimize error, it is recommended to copy the existing structure and paste it into the necessary position - modifying the establishment </p>

4\. Now that the establishment has been correctly configured you will be able to pull the POS data for the location, you will need to pull the data from the **Activation Date** onwards - it is recommended to pull at least one day of data to ensure that things are operational and there were no configuration-related issues.

# Revel

## <span style="text-decoration: underline;"><span style="color: #e67e23; text-decoration: underline;">Gather POS Information</span></span>

1\. In order to configure customers who utilize **Revel** as their POS provider, the Customer Success team needs to gather the custom Revel `Login URL` from the customer and inform us which email address that the customer used to create a guest access account for us

- The Customer Success team typically shares this in the [\#customer-pos-integrations](https://bartrack.slack.com/archives/C01V90HPYAJ) Slack channel or [Customer Onboarding Tracker](https://docs.google.com/spreadsheets/d/1IBeZlgJ_QjTNu7DRPAYuL-pgQR3NyUhv88KPFtXC2es/edit#gid=0) spreadsheet

- - - - - -

## <span style="text-decoration: underline; color: #e67e23;">Database Configuration</span>

1\. The next step in the configuration process is updating the **establishments** table of the database to reflect the necessary information for the integration. The primary things that you'll need to know are as follows:

- Establishment ID
- Timezone
- Login URL (Revel)
- Modifier Usage

<p class="callout info">The Onboarding Team should have already identified if the customer utilizes modifiers so you will need to ask them for that information - if they are unsure, set this to FALSE and then reference the POS data that is captured</p>

Once you have collected all of the necessary information you can proceed with executing the SQL query below, this will prompt you to enter several variables which encompass the information you captured above -

```SQL
UPDATE <br></br>    establishments<br></br>SET <br></br>    integration_id = 2, <br></br>    default_pour_cost_pct = 20, <br></br>    pos_hour_integration_done = 5, <br></br>    pos_cloud_based = true, <br></br>    pos_modifiers = ${pos_modifier_flag}$, <br></br>    time_zone = '${timezone}$', <br></br>    pos_properties = '{"url": "${login_url}$"}'<br></br>WHERE <br></br>    id = ${establishment_id}$;
```

**Example Data for Variables -**

```
Name                     Value          <br></br>------------------------ -------------- <br></br>pos_modifier_flag        true           <br></br>timezone                 US/Eastern    <br></br>login_url                https://solacebrewing.revelup.com             <br></br>establishment_id         1              <br></br>
```

- - - - - -

## <span style="text-decoration: underline; color: #e67e23;">Server Configuration</span>

1\. The final step of the configuration process is to SSH onto the POS server to modify the `settings.json` file and insert a new record for the location you are configuring - this can be found in the `/home/ubuntu/bartrack-pos/integrations/cli` directory on the server.

2\. In the configuration file you will need to locate the section for `revel` and then scroll to the bottom of that list of entries, see the screenshot below for reference -

[![image-1651069630108.27.05 AM.png](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/scaled-1680-/image-1651069630108-27-05-am.png)](https://wiki.bartrack.beer/uploads/images/gallery/2022-04/image-1651069630108-27-05-am.png)

3\. Once you have found the section, you will need to insert a record in the chronological position based on the `establishment_id`. In order to minimize error, it is recommended to copy the existing structure and paste it into the necessary position and then modifying the `establishment_id` and `username/password` to reflect the location you're configuring. Once the changes have been finalized be sure to save your changes.

<p class="callout warning">Make sure you are careful when editing the configuration file - incorrect formatting will result in the inability to pull POS data for any locations on the server. In order to minimize error, it is recommended to copy the existing structure and paste it into the necessary position - modifying the establishment </p>

4\. Now that the establishment has been correctly configured you will be able to pull the POS data for the location, you will need to pull the data from the **Activation Date** onwards - it is recommended to pull at least one day of data to ensure that things are operational and there were no configuration-related issues.

