Data Resource
A Data Resource is a table of records inside a simulation: dark stores, suppliers, open orders, job applicants. You define its columns and load its rows from a CSV. Players read it, triggers add, change and delete its rows during the run, formula metrics add up its columns, and AI conversations can read it and write to it.
What it’s for
- Reference data players need for a task: a supplier price list, a set of candidate profiles, last quarter’s sales.
- A working dataset that changes as the run goes on: open orders that triggers close, stock levels an AI negotiation updates.
- Inputs for metrics: a Formula Metric can read one cell or aggregate a whole column, such as the average delivery time across every dark store.
In a quick-commerce simulation, a Dark Stores table with columns id, name, zone, orders_per_day and avg_delivery_min could feed a formula metric Average Delivery Time = AVG({Dark Stores.avg_delivery_min}), while a trigger adds a row each time a team opens a new store.
Setting it up
Add a Data Resource to the simulation, a round, a subround or a task, then click Edit on its card.
| Field | What it does | Default |
|---|---|---|
| Component Name | The table’s name: the title players see, the name in trigger, formula and AI pickers, and the name typed formulas use ({Dark Stores.…}). | “Data Resource” |
| Description | Your note about what the table holds. | The catalogue’s description |
| Resource ID | Shown in the editor’s header. A generated id that triggers, formulas and AI bindings use to refer to the table, so renaming the table is safe. Duplicate gives the copy a new id. | Generated |
| Visibility | public, team_only or hidden. See Visibility. | public |
| Import schema and records from CSV | Upload CSV (or Reupload CSV) loads columns and rows from a file. See Importing a CSV. | None |
| Available operations | A read-only list of what the table supports. See Available operations. | |
| Columns | The schema: one line per column with Key, Label, Type and Required, plus Remove. Add column adds one. | One id column |
Visibility
| Option | What happens |
|---|---|
public | Players see their own team’s copy of the table. |
team_only | Behaves the same as public: every team already sees only its own copy. |
hidden | Never shown or sent to players. Triggers, formulas and AI conversations can still use it, which makes it a good place for numbers that drive the scenario behind the scenes. |
A table attached to a round, subround or task that is still locked isn’t sent to players until it unlocks.
Columns
| Column field | What it does |
|---|---|
| Key | The column’s internal name. Typing tidies it into lowercase with underscores (Order Value (₹) becomes order_value). Formulas, triggers and AI bindings use the key. |
| Label | The heading players see. |
| Type | How values are stored and shown. See the table below. |
| Required | Whether every row must have a value. All and None set every column at once. Trigger actions that would leave a required column empty are refused. |
| Currency code | Only for currency columns. A three-letter code such as USD: players see the column’s amounts in that currency. Blank means rupees (INR). |
A new column from Add column is called new_column (then new_column_2 and so on), type string, not required.
| Type | How values are stored during a run | How players see them |
|---|---|---|
string | Text | As written |
number | A number. ₹ $ € £, commas, % and spaces are stripped first; a value that still isn’t a number stays as text. | Indian digit grouping, e.g. 12,34,567 |
currency | A number, as for number | In the column’s Currency code with no decimals, e.g. ₹12,34,567 for INR (the default) or $12,34,567 for USD |
percentage | A number, as for number | The number with a % sign (not multiplied by 100) |
boolean | True for true (any case) or 1, otherwise false | Yes or No |
date, datetime | Text | As written. Sorting compares the text, so use a sortable format such as 2026-11-19. |
json, array | Text, when loaded from a CSV | As written |
enum | Text | As written. There is no list of allowed values to set. |
metric_reference, resource_reference | Text | As written. Nothing links the value to a metric or resource. |
The id column
Every table has an id column, and it is the table’s primary key:
- It is always there, always
string, always required. Its key, type and Required setting are locked, and it can’t be removed. - Each row’s id should be unique. Triggers, formulas and AI bindings find a row by its exact id (case matters), so give rows short, stable ids such as
DS-014. - Trigger actions can’t change a row’s id, and Create Row refuses an id that already exists.
The editor shows problems in red under the import area: “Missing mandatory id column.”, “One or more records are missing id values.”, “Duplicate id found: …”, “Required column has empty values: …”. These are warnings: they don’t stop you saving, so fix the CSV and upload it again. During a run, a row with no id is given a generated one (such as row-k3x9q2), and duplicate ids are kept as they are.
Rows come from a CSV
The editor has no way to type rows in. A table gets its starting rows only from an uploaded CSV, and during a run from trigger actions. If you define columns by hand and upload nothing, every team starts with an empty table.
The rows aren’t stored in the template itself: the template keeps the uploaded file, and the rows are read from it again when you reopen the editor and when a run is created.
Importing a CSV
Prepare the file
The first line is the header. One column must be called id (any case, so ID works). Wrap any value that contains a comma in double quotes, e.g. "9,491,405". Download template CSV gives a sample to start from.
Upload it
Click Upload CSV. The editor reads the file, builds the columns and loads the rows. The card then shows CSV uploaded, the file name and the row count, with Download uploaded CSV to get the original file back.
Check the columns
Review each column’s Type and Label, and set Required where it matters. Then Save changes.
What the import does with your file:
- Headers become keys. Each header is tidied into a key (
Order Value (₹)→order_value,orderValue→order_value) and a label (order_value→ “Order Value”). Theidcolumn’s label is “ID”. - Types are guessed from the column name first, then from up to 25 non-empty values:
- a name containing
percent→percentage - a name containing
revenue,price,amountorcost→currency - all
true/false→boolean - all numbers →
number - all dates →
date, ordatetimeif any value has a time - all
{…}or[…]→json - anything else →
string
- a name containing
- Unquoted commas are repaired where possible. Spreadsheet exports often write
₹9,491,405or(09:00,18:00)without quotes. The import stitches those back together and warns you which rows it repaired. If a row still has a different number of columns from the header, the whole file is rejected with the row numbers, and nothing is uploaded. - Search and sort settings are worked out for you from the column types. See Available operations.
Reupload CSV asks first: Replace uploaded CSV? Replacing swaps in the new file’s columns and rows, so any labels, types and Required settings you changed are reset too.
Change a column’s Label, not its Key, once rows come from a CSV. Rows are matched to columns by the CSV’s headers, so a renamed key stops matching and that column shows empty for players.
Available operations
The Available operations box lists what the table supports. It is for reference; there is nothing to set.
| Operation | Where it’s available |
|---|---|
create_row, update_row, delete_row | The Create Row, Update Row and Delete Row trigger actions. |
find_by_id | A formula’s single-cell reference. |
count, aggregate | A formula’s column aggregates (SUM, AVG, MIN, MAX, COUNT). |
search, sort | The player’s table. |
Which columns players can search and sort is set automatically from the column types, on import and whenever you change a column:
- Searchable:
stringandenumcolumns. - Sortable:
number,currency,percentage,date,datetimeandstringcolumns. - Filterable: every column except
idis marked filterable, but the player table has no filter control, so this has no effect.
The player table shows 50 rows per page. The page size isn’t editable.
What players see
Players can only read a Data Resource. There is no way for a player to add, edit or delete a row; rows change only through triggers and AI outputs.
On the Overview, a table attached to the simulation itself is listed in the Resources card, and opens over the page.
On a task page, the table is listed with the task’s resources in the side column. Selecting it opens the Resources tab, which shows the table’s name, its record count, the first few rows and columns, and Open full table.
On a round or phase page, the table is a tile, drawn as a Table, List, Count or Task checklist as set in the dashboard layout. Opening the tile shows the full table. A table attached to the simulation itself appears as a tile on every round and phase page. A table attached to a phase is also shown in full under the phase page’s Resources. Data resources don’t appear on the Metrics page. See Player dashboard.
The full table lets a player:
- Search (when the table has searchable columns): a case-insensitive match across the searchable columns.
- Sort: click a sortable column’s heading; click again to reverse. Empty cells go last either way.
- Show or hide columns from the settings button. The first 8 columns are shown by default, with Select all to show the rest.
- Resize columns by dragging a heading’s edge.
- Page through the rows, 50 at a time.
Column choices and widths are remembered in that player’s browser. The table refreshes when a trigger changes the team’s data.
At runtime
- Each team has its own copy. When a run is created, the uploaded CSV is copied for that run and every team gets its own set of rows. A trigger that fires for one team changes only that team’s rows.
- The run keeps its own file. Editing or replacing the CSV in the template later never changes a run that already exists.
- Rows are typed from the schema when the run is created, as in the types table. An empty cell in a
number,currencyorpercentagecolumn stays empty: players see a blank cell, formula aggregates (SUM,AVG,MIN,MAX,COUNT) leave it out, and a single-cell reference reads it as 0. A run created before empty cells were kept empty keeps the 0s it was loaded with.
Triggers and actions
Actions
These actions are offered on a node when a Data Resource is attached to it or to a node above it. Each works on the team the trigger fired for.
| Action | What it does | When it does nothing |
|---|---|---|
| Create Row | Adds a row from Column Values: one field per column, each a Static value or Dynamic (a metric’s current or initial value, or another table’s cell). If id is left empty, an id like row-k3x9q2 is generated. Raises Row Created. | The id already exists, or a required column is empty. |
| Update Row | Changes the row with the given Row ID. Tick each column to change under Field Updates and give a Static or Dynamic value. Raises Row Updated. | No row has that id, or a required column would be left empty. The id itself is never changed. |
| Delete Row | Removes the row with the given Row ID. Raises Row Deleted, even if no row had that id. |
Row ID fields search the rows in the uploaded CSV; you can also type an id, such as one a trigger creates during the run.
Values are converted to the column’s type as they’re written: number-type columns strip ₹, commas and % signs, boolean columns read true, array columns split text on the vertical bar character, and json columns parse JSON. A Dynamic value is read once, when the action runs.
When an action does nothing, it fails silently: players see no error.
Events
These events are offered on a node when a Data Resource is attached to it or to a node above it. Each needs the Data Resource to watch, and each fires at most once per team per run. See Triggers.
| Event | Fires when |
|---|---|
| Row Created | A Create Row action adds a row to that table. |
| Row Updated | An Update Row action, or an AI Conversation or AI Evaluation output, changes a row. |
| Row Deleted | A Delete Row action runs on that table. |
| Row Count Above | After a row event on that table, the team’s row count is above Row Count Threshold. |
| Row Count Below | After a row event on that table, the team’s row count is below Row Count Threshold. |
The three trigger actions raise these events, and so does every row an AI output writes (one Row Updated per row).
Reading a cell in other actions
A metric action’s value (for example Set Metric’s New Value) can be a Data Resource Ref: a resource, row id and column. It reads the cell when the action runs. A cell that isn’t a plain number reads as 0.
Formulas
A Formula Metric attached to the same node as the table, or below it, can read it in two ways:
- Single cell (
find_by_id): one column of the row with a given id, e.g.{Dark Stores.DS-014.orders_per_day}. A missing row or empty cell counts as 0. - Column aggregate:
SUM,AVG,MIN,MAXorCOUNTover a column across every row the team has at that moment, including rows added during the run, e.g.SUM({Dark Stores.orders_per_day}). Empty cells are left out.
Formulas read cells leniently: ₹1,20,000 counts as 120000 and 12% as 12. Formula metrics recalculate after each row change, so they follow the table as triggers change it.
AI conversations and evaluations
An AI Conversation can bring a table into the persona’s context through an input binding with Data Scope set to All Data, Single Row, Column or Cell. Its outputs can Update Rows: write a value the AI decides into a column of a row. An AI Evaluation can also take a table as an input and write to one in its outputs.
An AI write changes one column of an existing row, or of every row the team’s table has when the output’s Row ID is *. It doesn’t create or delete rows. Each row it writes raises Row Updated, and formula metrics recalculate after it.
A Rubric rule can also check a value in a table.
Limits and gotchas
- No row editor. Starting rows come only from a CSV.
- The CSV needs an
idcolumn, and values containing commas should be quoted. - Rename labels, not keys, of imported columns.
- Reuploading resets the schema, including types and labels you edited.
- Warnings don’t block saving. Duplicate or missing ids and empty required cells are only flagged.
- Type guessing looks at the name first, so a text column called
cost_centrebecomescurrency. Check the types after every import. - Currency columns show no decimals, in the column’s currency code (rupees when it has none).
- Empty number cells stay empty. Aggregates skip them, but a single-cell reference reads them as 0.
- Row events fire once per team per run, for changes made by trigger actions and AI outputs.
- Failed row actions are silent. An Update Row with a wrong id, or a Create Row with a duplicate id, simply does nothing.
- Typed formulas can’t name a table or row id containing a full stop. Use the formula builder’s Data Resource buttons instead.
Related
- Metrics: formula metrics that read tables.
- Triggers and Actions: every row event and action in detail.
- AI Conversation and AI Evaluation: reading and writing tables from AI.
- Player dashboard: how tables appear on round and phase pages.