Import Historical Sales Data
In order for 7shifts’ machine learning algorithm to accurately forecast sales for restaurants, at least 90 days worth of the most recent historical sales data is required.
This data must be provided when an integration is first set up for a client to ensure that we are able to create accurate forecasts for them from the get-go.
In order to fulfill this, a separate service should be set up that can read the last 90 days worth of sales data, and send it in to 7shifts, one receipt at a time (7shifts currently does not offer a batch receipt import endpoint).
This service should be called into action only when an integration is first set up and a location in your system has been successfully mapped to a 7shifts location.
Requirements
- This service must only be called between 08:00:00 UTC and 15:00:00 UTC following the integration being set up and a location being mapped.
- Please do not make more than 10 requests per second per token.
- You can use the second service from the ‘Creating Receipt Data’ section to make the POST requests for sending over this historical data.
Tips
If there are far too many receipts to be sent as a part of this historical data push, you may sum up the net totals of all receipts within a 5-minute period in one new receipt and set the open_date
for the receipt to be the start of the 5-minute time interval. This tactic should only be used for the historical data push, and not with regular receipts being sent over to 7shifts.
For example, if there are 10 receipts, each with a $10 net total within 9:05 AM and 9:10 AM UTC on July 1 2020, you can instead send just one receipt with request body fields set as follows:
{
"net_total": "10000",
"location_id": "<ID of the location that the receipts are for>",
"receipt_date": "2021-12-01T10:05:00Z",
"receipt_id": "<this can be arbitrarily set as it's unlikely this historical data needs updating>”
}
For the next 5-minute period from 9:10 AM to 9:15 AM, you can again set the total field to the sum of all net totals from receipts within that period, and set the receipt_date
field to 09:10:00 and so on.
Updated about 2 years ago