---
title: Outcomes
description: "Report orders through POST /v1/outcomes or the Shopify orders webhook, and signups, demo requests and leads through POST /v1/goals or the Rebilder Tag. The funnel links each to agent traffic with labeled evidence: explicit, lookback-inferred, or none."
canonical_url: https://rebilder.com/docs/outcomes
last_updated: "2026-11-28"
---

# [Outcomes](https://rebilder.com/docs/outcomes)

> Report orders through `POST /v1/outcomes` or the Shopify orders webhook, and signups, demo requests and leads through `POST /v1/goals` or the Rebilder Tag. The funnel links each to agent traffic with labeled evidence: explicit, lookback-inferred, or none.

This site answers questions directly. Ask at https://rebilder.com/ask?q=your+question instead of reading more pages.

- **Updated:** 2026-11-28
- **Author:** Rebilder
- **Section:** Concepts
- **Description:** Report orders through POST /v1/outcomes or the Shopify orders webhook, and signups, demo requests and leads through POST /v1/goals or the Rebilder Tag. The funnel links each to agent traffic with labeled evidence: explicit, lookback-inferred, or none.
- **Publisher:** Rebilder

## Rebilder at a glance

AEO gets you seen. Rebilder gets you heard. When customers ask ChatGPT about your business, your site answers with your real prices and policies.

**Common questions**

- **What does it cost?** Connecting is free. Starter is $49/mo, Pro is $99/mo and Agency is $299/mo. [Pricing](https://rebilder.com/pricing)
- **How does my site answer new questions live?** Rebilder reads your pages, products and policies. When an AI assistant asks, your site answers from them. Nothing on your site changes. [See how it works](https://rebilder.com/autopilot)
- **Can someone trick my site into a wrong price or a discount?** No. Every answer comes from your own pages and is checked against them. If your site does not say it, Rebilder does not say it. [Read security details](https://rebilder.com/security)

**How it compares**

- **Why choose Rebilder?** Choose Rebilder when you want your own site to answer AI assistants with your real facts, and to see who asked. [Compare](https://rebilder.com/compare)

| Compared with | The difference |
| --- | --- |
| Profound, Peec AI, Otterly.ai | These tools watch AI answers and tell you where you show up. Rebilder makes your own site answer when AI comes to check. |
| Cloudflare Markdown for Agents, @vercel/agent-readability, Yoast llms.txt | These tools tidy or map your pages for AI. Rebilder answers from those pages and shows you who asked. |
| Intercom Fin, Tidio Lyro | Chatbots answer the customers who contact you. Rebilder answers the AI assistants that visit your site for them. |
| SEO on its own, Shopify agentic storefronts, Writing an llms.txt yourself | Good SEO, your store platform and a simple llms.txt all help. Here is what Rebilder adds to each. |

Source: [Compare](https://rebilder.com/compare)

## Closing the funnel

[Events](/docs/events) record who visited and what they were served. Outcomes record what it earned you: one row per reported order, joined onto the visit stream at read time. Together they power the Console funnel’s last stages (**goals reached** and **orders reported**), the per-platform and per-URL order columns, and the order in which opportunities are ranked.

Orders have two ways in, and they land in the same table with the same idempotency rule: the outcomes API (any stack) and the Shopify orders webhook (zero code on Shopify). Conversions that are not orders, such as a signup, a demo request or a lead, are [goals](/docs/outcomes#goals-api), sent from your server or marked in the browser with [the Rebilder Tag](/docs/tag#goals).

## POST /v1/outcomes

Authenticated with your **store-scoped API key**, the same key the events sink uses, sent as a Bearer token. The store is always resolved from the key, so a payload can never write another store’s orders.

POST /v1/outcomes

```http
POST {api}/v1/outcomes
Authorization: Bearer <apiKey>
Content-Type: application/json

{ "orders": OutcomesOrderV0[] }   // max 100 per request
```

| Field | Type | Notes |
| --- | --- | --- |
| `order_id` | `string` (required) | Your order identifier, which must be non-empty. Part of the idempotency key. |
| `ts` | `string` (required) | Order timestamp, ISO 8601. |
| `order_value_cents` | `number` (required) | Non-negative **integer minor units** (cents). Never floats, never converted. |
| `currency` | `string` (optional) | Defaults to `USD` when absent. Stored as reported, with no conversion anywhere. |
| `product_urls` | `string[]` (optional) | Canonical product URLs on the order. These power the 7-day lookback inference and the Products page’s “orders touching URL” column. |
| `agent_attributed` | `boolean` (optional) | Defaults to `false`. Send `true` **only when you captured real evidence**, and put that evidence in `attribution`. The API stores exactly what you say; it never upgrades a claim. |
| `attribution` | `object` (optional) | Your evidence, free-shape (utm, referrer, session note). `attribution.platform` (e.g. `"chatgpt"`) lets the funnel’s platform table count the order as explicit evidence for that platform; `attribution.channel: "protocol"` marks a protocol-originated order for the observational take-rate metering view. |
| `event_id` | `string` (optional) | UUID of the originating gateway event, when you carried it through your session; this is the strongest join evidence. |

A fully evidenced order

```json
{
  "orders": [
    {
      "order_id": "1001",
      "ts": "2026-08-05T12:00:00Z",
      "order_value_cents": 4999,
      "currency": "USD",
      "product_urls": ["https://store.example.com/products/alpine-trail-pack-28l"],
      "agent_attributed": true,
      "attribution": { "platform": "chatgpt", "utm_source": "chatgpt.com" },
      "event_id": "018f7c9a-1b2e-7c3d-9e4f-5a6b7c8d9e0f"
    }
  ]
}
```

- **Success:** `202` with `{ "accepted": <n> }` (n = orders submitted). An empty `orders` array is a valid no-op returning `202 {"accepted": 0}`.
- **Idempotent:** replays are absorbed by the database: the insert is `ON CONFLICT (store_id, source, order_id) DO NOTHING`, so resending an order is always safe.
- **`401`:** unknown, revoked, or missing API key.
- **`400`:** malformed body: `orders` not an array, more than 100 orders per request (split client-side), or a structural failure on any order (the error names the field).
- **`503`:** the service is temporarily unavailable. Retry or contact support@rebilder.com.

## POST /v1/goals

A goal is a conversion that is not an order: `signup`, `demo`, `lead`, or one you name as `custom:` plus a lowercase slug. Send it from your server when the conversion is confirmed there, for example after the signup record is created. It uses the same store-scoped API key as the events sink, which must carry the `events:write` scope.

POST /v1/goals

```http
POST {api}/v1/goals
Authorization: Bearer <apiKey>
Content-Type: application/json

{ "goals": GoalV0[] }   // max 100 per request
```

| Field | Type | Notes |
| --- | --- | --- |
| `kind` | `string` (required) | `signup`, `demo`, `lead`, or `custom:<slug>` with 1 to 40 lowercase letters, digits and hyphens. |
| `idempotency_key` | `string` (required) | Your own id for this goal: 1 to 128 letters, digits, `.`, `_`, `:` or `-`. Resending the same key is safe. We store a one-way hash of it, never the key. |
| `occurred_at` | `string` (required) | When it happened, ISO 8601. Not in the future. |
| `value_cents` | `number` (optional) | What the goal is worth to you, in non-negative integer minor units. Never converted. |
| `currency` | `string` (optional) | With `value_cents` only. Three letters; `USD` when absent. |
| `page_urls` | `string[]` (optional) | Up to 20 pages of the visit, absolute and without a query string or fragment. These power the 7-day lookback. |
| `agent_attributed` | `boolean` (optional) | Defaults to `false`. Send `true` only when you observed the AI referral in the visit, and name it in `attribution`. |
| `attribution` | `object` (optional) | Your evidence, limited to `platform` (such as `"chatgpt"`) and `referrer_host` (such as `"chatgpt.com"`). |
| `event_id` | `string` (optional) | UUID of the gateway event from the visit, when you carried it through your session. |

A demo request from an AI-referred visit

```json
{
  "goals": [
    {
      "kind": "demo",
      "idempotency_key": "demo-request-48213",
      "occurred_at": "2026-11-20T15:04:00Z",
      "value_cents": 15000,
      "currency": "USD",
      "page_urls": [
        "https://store.example.com/pricing",
        "https://store.example.com/book-a-demo"
      ],
      "agent_attributed": true,
      "attribution": { "platform": "chatgpt", "referrer_host": "chatgpt.com" }
    }
  ]
}
```

- **No personal data.** Every object is allow-listed. A field not in the table above is a `400`, and no value may contain `@`, so an email address, a name or form contents cannot be sent by mistake.
- **Success:** `202` with `{ "accepted": <n>, "recorded": <m> }`. `recorded` counts new goals; a replayed `idempotency_key` is accepted and not recorded twice. An empty `goals` array is a valid no-op.
- **Idempotent** on your store and `idempotency_key`.
- **`401`:** unknown, revoked or missing API key, or a key without `events:write`.
- **`400`:** malformed body, more than 100 goals, or a field outside the allow-list (the error names the field). **`413`:** body over 256 KB.
- **`429`:** more than 10,000 goals for one store in the current hour. `Retry-After` says when the next hour starts.
- **`503`:** the service is temporarily unavailable. Retry or contact support@rebilder.com.

## The Shopify orders webhook

On Shopify, orders flow in with no storefront code at all, through a standard `orders/create` webhook:

- Install the Rebilder Shopify app. It subscribes **`orders/create`** to `POST /webhooks/shopify/orders` for you, and there is no step two.
- **Do not create this webhook by hand.** A webhook you add in Shopify admin is signed with your own shop’s secret, which our endpoint does not hold, so every delivery would fail HMAC. The app-registered subscription is signed with the app secret the endpoint already verifies against.
- Deliveries are verified before anything is parsed: `X-Shopify-Hmac-Sha256` must equal base64(HMAC-SHA256(raw body)), computed over the **raw bytes** and compared constant-time. A bad or missing signature is `401`.

**Shop-domain resolution:** the `X-Shopify-Shop-Domain` header is always `<handle>.myshopify.com`, so it is resolved in three steps: the explicit install-to-store link, then exact equality against your registered domain, then a bridge over your own synced source URLs. That last step is what matches a store registered under a custom domain. An unmatched or missing shop domain returns `202 {"accepted": 0, "unmatched": true}` and is logged, never an error status, so Shopify does not retry a delivery that can never be attributed. Product URLs are derived only from line items that carry a `handle` (`https://{shop}/products/{handle}`, Shopify’s canonical product path); product identity is never guessed from titles or ids.

> **Webhook orders always start unattributed** An order webhook carries no session evidence, so `agent_attributed` is **always false at ingest** from this path. Only the labeled read-time lookback (below) can connect a webhook order to agent traffic, as inference, marked as such and never written back as fact.

## The attribution model

Attribution is evidence-based and computed at read time. Every order is classified into exactly one of three classes:

| Class | What it means | Where it comes from |
| --- | --- | --- |
| **explicit** | The reporter sent evidence with the order. | `agent_attributed: true` plus the evidence in `attribution` (utm, referrer, `event_id`), for API-reported orders only. |
| **inferred** | The 7-day product-URL lookback fired: agent traffic hit a product URL on this order within the 7 days before it. | A read-time database view; the inference is labeled as inference and never stored back onto the order. |
| **none** | No evidence either way. | No attribution evidence was supplied or matched. |

Goals use the same rules, with the goal’s `page_urls` (or the page path for a tag goal) in place of an order’s product URLs. A goal is classified once, when it is recorded, and the rule that matched is stored with it:

| Class | Rule stored | When it applies |
| --- | --- | --- |
| **explicit** | `same_page_load_referrer` | A [Rebilder Tag goal](/docs/tag#goals) fired on a page opened from a recognised AI assistant (or with opt-in `data-rebilder-session-ref="1"` carrying that landing origin in the same tab). The Funnel calls it “same visit”. |
| **explicit** | `reporter_explicit` | A server goal with `agent_attributed: true` and its evidence. The Funnel calls it “same visit”. |
| **inferred** | `lookback_page_url_7d` | Agent traffic requested one of `page_urls` in the 7 days before the goal. Labeled as inference. |
| **none** | none | Neither rule matched. |

> **Nothing is blended** The Console never merges these classes into one “conversions” number, and never adds goals to orders. The funnel shows the counts side by side, and the per-platform columns are evidence **presence**, not exclusive credit: an order or goal whose evidence names several platforms appears under each, and the caption says so.

## How the Console consumes outcomes

- [Funnel](/console/funnel): “Goals reached” counts goals per kind, split into same visit / within 7 days / no link and by AI assistant. “Orders reported” shows total orders and order value as reported, split into explicit / lookback-inferred / unattributed; the platform table adds “orders with evidence” per platform; the daily bars show orders per UTC day.
- [Overview](/console): commercial opportunities on pages with AI-linked orders or goals rank first, and each one states the evidence, such as “3 AI-linked orders, $1,240.00”.
- [Products](/console/products): “Orders touching URL” counts orders whose reported `product_urls` include that exact URL: presence on the order, not attribution credit.
- [Insights](/console/insights): flags “No orders reported” when agent traffic exists but no outcome source is wired, with the fix pointing back to this page.

Everything above is an observed count over what was reported: no currency conversion, no extrapolation, no modeled revenue. If a number is inference, it is labeled inference.