Recommended allocations
Retrieve and review AI-generated allocations at the people, team, or zone level for each day, and optionally adjust them manually.
Prerequisites
Completed Start forecasting and Optimise your first location (Evolve)
Node.js v18+ and npm v9+
A valid gospace API key in your
.envfileA location_id with at least one successful evolution
Allocation record shape
Depending on allocation type, fields will be populated as follows:
type Allocation = {
starts_at: string; // ISO timestamp (interval start)
ends_at: string; // ISO timestamp (interval end)
location_id: string;
location_name: string;
layer_id: string; // floor/layer allocated to
layer_name: string;
spaces: string[]; // array of space IDs allocated
type: string; // "SPACE" or "ROOM" (type of allocation)
people_id?: string; // present for people allocations
team_id?: string; // present for team allocations (or people with team assignment)
room_id?: string; // present only on room allocations
};1) Get recommended allocations for a location (day-by-day)
Create get-allocations.ts:
2) Summarise allocations per day
3) Inspect by level: zone/neighbourhood, team, people
You can also filter by layer_id to analyse a specific floor, or by type to focus on ROOM vs SPACE allocations.
4) Make manual adjustments (create/update/delete)
You might want to tweak AI recommendations—for example, swap spaces between two teams or assign a specific person to a different desk on a given day.
A) Create manual allocations
B) Update allocations (e.g., swap spaces)
C) Delete allocations
5) Common patterns
Paginate long ranges with
skip/limit.Filter by
team_id,people_id,layer_id,typeto narrow scope.Respect intervals — allocations are effective from
starts_attoends_at.Manual overrides — use create/update/delete to pin critical changes (e.g., VIP desks, event days).
Audit your swaps — log original vs. updated
spacesarrays to keep a trail of changes.
Last updated
Was this helpful?