Start forecasting
Prerequisites
1) Trigger a forecast run
import "dotenv/config";
import GospaceAI from "@gospace-ai/api";
async function main() {
const gospace = new GospaceAI(process.env.GOSPACE_API_KEY!);
// Kick off a forecast rebuild for a location and optional date range
const res = await gospace.system.startForecast({
location_id: "68499cf4af8729934aae208a",
// Optional time window. If omitted, backend will choose sensible defaults.
// starts_at: "2025-06-20T00:00:00Z",
// ends_at: "2025-07-31T23:59:59Z",
// Optional control flags
// force_rebuild: true
});
console.log(JSON.stringify(res.data, null, 2));
// Expect a job or task identifier you can poll
}
main().catch((err) => {
console.error("Start forecast failed:", err);
process.exit(1);
});2) (Optional) Poll job status
3) Fetch forecasts
A) People forecast (per person, optionally scoped to team)
B) Team forecast (aggregated by team)
C) Location forecast (location‑level totals)
4) Turn forecasts into capacity requirements
Daily desk and room requirements (using *_inc)
Aggregating per‑team to size team neighborhoods
Checking person‑level confidence
Tips
Last updated
Was this helpful?