SegOps AIDocs

Event Sandbox

The Event Sandbox lets you publish test events and instantly see which segments a user would enter or exit — without permanently storing any data in the analytics warehouse.

Warning
Sandbox events are not persisted to the analytics warehouse. They are evaluated in memory and discarded. Use the sandbox for testing and debugging only — do not use it for production event ingestion.

How the Sandbox Works#

When you publish a sandbox event, SegOps:

  1. Temporarily merges the test event into the user's event history (in memory only)
  2. Re-evaluates all active segments against the updated history
  3. Returns the delta: which segments the user would enter and exit
  4. Discards the temporary event — nothing is written to the analytics warehouse

Using the Sandbox UI#

Navigate to Sandbox in the sidebar. Fill in the form:

  • User ID — an existing or hypothetical user ID
  • Event Type — the event to simulate (e.g., order_placed)
  • Occurred At — timestamp for the event (defaults to now)
  • Payload — JSON object with event properties

Click Publish to run the simulation. The results panel shows:

  • Entered — segments the user would newly join
  • Exited — segments the user would leave
  • Unchanged — segment count that was unaffected

Using the Sandbox via API#

bash
curl -X POST https://api.segops.ai/api/explorer/sandbox/publish/ \
  -H "Authorization: Bearer $JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "user-test-123",
    "event_type": "order_placed",
    "occurred_at": "2026-04-25T14:00:00Z",
    "payload": {
      "total": 520,
      "currency": "USD"
    }
  }'
json
{
  "published": true,
  "entered": [
    { "id": 7, "name": "High-Value Customers" }
  ],
  "exited": [],
  "unchanged_count": 4
}

Use Cases#

  • Debugging segment logic — test whether a new event would cause a user to enter a segment you just built before making it live.
  • QA new event schemas — verify that a simulated event with your new payload structure correctly satisfies the intended conditions.
  • Demo environments — simulate realistic user journeys in demos without polluting production event history.
  • Support workflows — verify what a customer would see if they placed an order right now, to explain segment membership to them.
Tip
The sandbox uses the user's real event history from the analytics warehouse as the base. If you test with a user ID that has no events, the simulation starts from an empty history.