Onboarding a New Location - Software Tools¶
Prerequisites¶
You will need the following information:
- FacilityId and OrganizationId from the Otter API
- New location name (must match the name in Snowflake)
- New location abbreviation for the worker
Step-by-step Guide¶
1. Create Kitchen in MongoDB¶
Create a new kitchen document in the kitchens collection on Mongo.
2. Get FacilityId and OrganizationId¶
- Navigate to app.tryotter.com/orders
- Open browser DevTools and inspect the network requests
- Find the
https://api.tryotter.com/facilities?with_locations=falseAPI call - Locate the new location by name in the response
- Copy the
facilityIdandOrganizationIdvalues
3. Add Location to Bakery Forecast Integration¶
- Open the repository and navigate to:
Orbital.Services>Snowflake>SnowflakePrepProductionService.cs>GetBakeryItemsByWeek
- Add the new location name to the if-else block in this method
- Important: The location name must exactly match the name in
ORBITAL_KITCHENS_DW.OTTER_DW.BAKERY_WEEKLY_FORECAST
4. Add Location to Post Sales Data to 7Shifts¶
- Open the repository and navigate to:
Orbital.ApiService>Controllers>HooksController.cs
- Add the new kitchen location ID from MongoDB mapped to the
location_idfrom 7Shifts (which comes from thelocationsendpoint)
5. Create Key Performance Indicator View¶
Create a new record in the key_performance_indicator_views collection:
- Set Type to 1
6. Add Worker to Orbital.Workers¶
- Navigate to the
Orbital.Workersproject - Copy the
SyncBrxRealtimeOrdersWorker.csfile - Rename it, replacing "BRX" with the new location's abbreviation
- Update the code to reference the new location
- Navigate to
Orbital.Workers>Workers>appsettings.jsonand add the new location's facility ID at the bottom - Navigate to
Orbital.Util>AppConfig.csand a new property for the facility ID - Navigate to
Orbital.Workers>Program.csand register the new realtime orders worker as a hosted service
7. Add Slack Webhook for 86 Tool¶
- Go to
https://api.slack.com/apps>86 Alerts>Incoming Webhooks>Add New Webhook- Add a new webhook for the new location's call center Slack Channel
- Go to the new location's call center Slack channel and type
@86 Alertsto add the app to the channel - Open the repository and navigate to:
Orbital.Services>Snowflake>EightySixLogicService.cs>GetSlackWebhookUrl
- Copy and paste the webhook URL next to the capitalized kitchen ID (from MongoDB kitchens) in the switch statement to add a mapping for the new location.
8. Update V2 Order Serivce¶
- In the
locationstable in Postgres, add a new row for the mapping from address to the three letter location abbreviation. - In the
stationstable in Postgres, add a new row for the mapping from Otter station ID to station name and location. You can get them either from OK Manager KDS Stations OR from the GraphQL on Otter Business Manager.- In the future, there should be an automated job that scrapes the GraphQL query and inserts unrecognized mappings into the Postgres table. This existed in the legacy backend.
- In the
storestable in Postgres, add a new row for the mapping from Otter store ID to brand name and location.- Navigate to
developer.tryotter.com> clickOrbital Kitchens POS>Stores>Onboardedfor a complete list of mappings
- Navigate to