# Your first decision (/docs/getting-started/first-decision)



<Steps>
  ### Sign in and choose a project [#sign-in-and-choose-a-project]

  Everything in the console belongs to a **project**, and projects belong to a **workspace**. Sign
  in, then choose where you are working from the switcher in the top bar — the whole console, and
  every request it makes, follows that selection.

  ### Create a decision [#create-a-decision]

  Open **Decisions** and choose **New decision**. Give it a name and a key. The key is what
  consuming applications use, so it cannot be changed later — think of it as part of your public
  API. It is unique inside the project, so another project may use the same key.

  Creating a decision gives you an empty draft with an `input` and an `output` node already wired
  together.

  ### (Optional) Build a decision table [#optional-build-a-decision-table]

  If your logic is a matrix of thresholds, put it in a reusable table under **Decision tables**. A
  table has inputs, outputs and a list of rules; a blank condition cell means "any". Choose a hit
  policy — **FIRST**, **PRIORITY**, **ALL** or **COLLECT** — to decide what happens when several
  rules match. Tables are reused by decisions, so building them first keeps the flow small.

  ### Build the flow [#build-the-flow]

  Open the **Flow builder** from the decision. Drag nodes from the palette and connect them by
  dragging from an output port to an input port. Ports carry meaning: a condition branches on
  **True** / **False**, a switch gets one port per case plus **Default**, a table on **Matched** /
  **No match**, an API call on **Success** / **Error**. The **Checks** panel validates the graph as
  you work; errors block publishing, warnings do not.

  ### Simulate with sample data [#simulate-with-sample-data]

  Open **Simulate** from the decision. The payload is prefilled from your input model — edit it to
  try the cases you care about and press **Run**. You get the outcome, the **reasons** (each rule's
  actual value against what it expected) and the full **trace**.

  <Callout title="Simulations are read-only">
    A simulation never triggers anything. Actions are listed so you can see them, but no alert,
    webhook or event is sent.
  </Callout>

  ### Publish a version [#publish-a-version]

  Choose **Publish**, write what changed and, optionally, a label such as `stable`. Publishing
  creates an immutable version and pins the exact version of every table and sub-decision it uses.
  Editing a shared table cannot change a decision that is already serving traffic: to pick up the
  new table you publish the decision again, and to roll back you restore an old version, which
  publishes it as a new one.

  ### Get an API key and call the endpoint [#get-an-api-key-and-call-the-endpoint]

  Go to **Settings** and create an **API key**. It is shown once — only its hash is stored, so copy
  it now. It belongs to the project you are in and can only execute that project's decisions. Send
  it in the `x-api-key` header — see [API quickstart](/docs/getting-started/api-quickstart).

  ### Watch it run [#watch-it-run]

  Every execution — from the API or a simulation — lands in **Executions**, for the active project.
  Open one to see the input, the output, the trace and the reasons. This is the same record support
  and auditors read, so what you debug in the simulator is what you can explain later.
</Steps>
