A data stream will need to be created through the /datastreams POST endpoint. This acts as a container for the sales data (store stats) to be imported to and to link the data to teams or locations. This needs to have a unique name and a list of the existing data streams can be queried through the /datastreams GET endpoint. See the docs and individual endpoints for more information: https://my.workforce.com/api/v2/documentation#data-streams
Data Stream Joins (Linking data to a Team or Location)
A data stream join can be created to group a data stream’s store stats to a Team or Location (or organization-wide). This is done through the /datastreamjoins POST endpoint. Only one join should be created per data stream. See the docs and individual endpoints for more information: https://my.workforce.com/api/v2/documentation#data-stream-joins
Store stats are the individual records that represent a “statistic” in the system and belong to a data stream. They have a stat which is a number and a type which is relevant to what the statistic is for. By default this will commonly be “sales” as a lot of the data being imported is sales data but can be as granular as you want e.g. you could have a Supreme Pizza type for a sale on supreme pizzas and a Meat Lovers type for a sale on a meat lovers pizza. Store stats can be created from the /storestats/for_datastream/:data_stream_id POST endpoint.
You must have a created data stream through the API before you can create store stats (you can’t create store stats for data streams that weren’t created through the API as well). See the docs and individual endpoints for more information: https://my.workforce.com/api/v2/documentation#store-stats
Note: Importing store stats are for actual demand data, if you want to import your own predicted demand data see “Predicted Store Stats” below
Predicted Store Stats
Predicted store stats are identical to “Store Stats” except they represent predictions of what will happen. These can be created through the/predicted_storestats/for_datastream POST endpoint (you will need to specify the data stream ID in the body of the request). See the docs and individual endpoints for more information: https://my.workforce.com/api/v2/documentation#predicted-store-stats