When integrating a new information stream, follow these four phases in order:
- Create the stream. Register the stream with
POST /information-streams/v3/streams, declaring itstype,unit,category,granularity, and, optionally, thedepartmentIdsit covers. Department IDs can be looked up by fetching the department tree withGET /api/department-management/v3/tree, which requires a token with thebusinessscope in addition to theforecastingscope used by the information stream endpoints. The granularity is fixed at creation time and cannot be changed later, so pick the finest grain you can reliably supply (typicallyhourfor hospitality,dayfor retail). - Backfill historical data. Push every available realised data point from the past into the stream using
POST /information-streams/v3/datapoint/{key}. AI forecasting only becomes available once the stream holds at least 31 months of historical realised data, so a backfill of that depth is a hard requirement before Dyflexis can forecast on top of the stream. Beyond that minimum, the more representative the history (ideally one or more full seasonal cycles), the better the forecast quality. - Push new data in (near) real time. Once history is in, keep the stream current by sending new data points as soon as they are realised in the source system, ideally as each underlying period closes (end of hour, end of day, etc., depending on the configured granularity). At a minimum, re-push a sliding window of the most recent periods on a regular schedule (for example the last few days or weeks), so that any late-arriving corrections in the source system are reflected in the stream. Better still, update the information stream on every change to the underlying historical data, so the stream always mirrors the source of truth.
- Understand roll-ups. Verify that the data you pushed at the configured granularity rolls up correctly into the higher granularities your customer reports on in Dyflexis (see below).