Topolo Docs Topolo Platform
Open workspace

Simulate journey

Walk the draft (or a published version) for one real contact (contactId) or an inline sample { fields, timezone, events[], segmentIds[] } on a simulated clock from startAt (default now), jumping over delays, and return the path with timings. Side-effect free: nothing is enrolled, reserved or recorded; for a real contact each send asks eligibility.check what would happen at that simulated time (intended, deferred, blocked). Stops at exit, goal conversion or maxSteps (truncated true).

Outcome

Walk the draft (or a published version) for one real contact (contactId) or an inline sample { fields, timezone, events[], segmentIds[] } on a simulated clock from startAt (default now), jumping over delays, and return the path with timings. Side-effect free: nothing is enrolled, reserved or recorded; for a real contact each send asks eligibility.check what would happen at that simulated time (intended, deferred, blocked). Stops at exit, goal conversion or maxSteps (truncated true).

Before you start

  • Verify identity and pin the intended organization and environment before discovering the action.
  • Discover a granted Nurture workspace. The application permission is workspace:read; required workspace access is read. A permission alone does not supply a workspace grant.
  • Organization and workspace come from verified context. Select resourceType/resourceId separately from action input; body fields cannot grant a different organization or workspace. The first authorized product action can initialize an identity-only workspace mirror.

Discover the target

topolo whoami --json
topolo actions get app_topolo_nurture.journeys.simulate --detail --json
topolo resources topolo-nurture --json
topolo workspaces list topolo-nurture --json
topolo actions get app_topolo_nurture.journeys.list --detail --json
topolo actions get app_topolo_nurture.journeys.versions.list --detail --json
topolo actions get app_topolo_nurture.contacts.list --detail --json
  • id: journeys record id in the selected workspace.
  • version: Integer version within the selected journey, discovered with journeys.versions.list.
  • contactId: Nurture contact id; this is not a CRM contact id.

Request

POST /api/journeys/{id}/simulate

Save action input as payload.json. The reviewed plan separates path identifiers, query fields and HTTP body. Set NURTURE_WORKSPACE_ID from granted resource discovery; it is separate from action input.

Inspect and test this action in the signed action console. A test response still requires the verification below.

Input fields

FieldRequiredTypeConstraints
idRequiredstringjourneys record id in the selected workspace. {"minLength":1,"maxLength":64}
versionOptionalintegerInteger version within the selected journey, discovered with journeys.versions.list. {"minimum":1,"maximum":100000}
contactIdOptionalstringNurture contact id; this is not a CRM contact id. {"minLength":1,"maxLength":64}
sampleOptionalobject{}
startAtOptionalstring{"pattern":"^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|(+-:[0-5]\d)))$"}
maxStepsOptionalinteger{"minimum":1,"maximum":500}

Exact input schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "version": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100000
    },
    "contactId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "sample": {
      "type": "object",
      "properties": {
        "fields": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]{0,62}$"
          },
          "additionalProperties": {
            "type": "string",
            "maxLength": 500
          }
        },
        "timezone": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        "events": {
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "eventType": {
                "type": "string",
                "enum": [
                  "signup",
                  "trial_started",
                  "trial_ending",
                  "form_submitted",
                  "purchase",
                  "subscription_changed",
                  "feature_used",
                  "inactive",
                  "mql",
                  "engage_not_now"
                ]
              },
              "occurredAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              }
            },
            "required": [
              "eventType",
              "occurredAt"
            ],
            "additionalProperties": false
          }
        },
        "segmentIds": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        }
      },
      "additionalProperties": false
    },
    "startAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "maxSteps": {
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}

Effects

  • Reads the journey, contact, events, segment membership and eligibility state; writes nothing.

Interpret the response

The returned identifier path is $.journeyId for journey. Empty lists do not discover a target.

Read path[] in order; status completed or converted means the walk finished.

Exact success schema:

{
  "type": "object",
  "required": [
    "journeyId",
    "status",
    "truncated",
    "startedAt",
    "endedAt",
    "path"
  ],
  "properties": {
    "journeyId": {
      "type": "string"
    },
    "version": {
      "type": [
        "integer",
        "null"
      ]
    },
    "subject": {
      "type": "string",
      "enum": [
        "contact",
        "sample"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "completed",
        "converted",
        "exited"
      ]
    },
    "exitReason": {
      "type": [
        "string",
        "null"
      ]
    },
    "truncated": {
      "type": "boolean"
    },
    "startedAt": {
      "type": "string"
    },
    "endedAt": {
      "type": "string"
    },
    "path": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "seq",
          "nodeId",
          "kind",
          "outcome",
          "at"
        ],
        "properties": {
          "seq": {
            "type": "integer"
          },
          "nodeId": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "at": {
            "type": "string"
          },
          "detail": {
            "type": "object"
          }
        }
      }
    }
  }
}

Worked examples

Actual dispatcher and migration-created SQLite or Worker handlers; identity/workspace and external service dependencies are simulated. Fixture identifiers and timestamps are synthetic. These responses establish no live authorization, paid generation, credential provisioning or message delivery. Replace synthetic identifiers using credential-scoped discovery. A local success is not evidence of a deployed effect, configured provider or delivered message.

Successful request

Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.

Input · payload.json:

{
  "id": "jny_f1108c7b3a1746a2ad5fff29d1d48c24",
  "sample": {
    "segmentIds": [
      "seg_043ae3d4dad64acb975d38a172fa7e73"
    ]
  },
  "startAt": "2026-10-01T09:00:00Z"
}

CLI:

topolo actions validate app_topolo_nurture.journeys.simulate --data @payload.json --json
topolo actions plan app_topolo_nurture.journeys.simulate --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_nurture.journeys.simulate --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json

MCP tool and arguments:

{
  "tool": "topolo_read_action",
  "arguments": {
    "actionId": "app_topolo_nurture.journeys.simulate",
    "input": {
      "id": "jny_f1108c7b3a1746a2ad5fff29d1d48c24",
      "sample": {
        "segmentIds": [
          "seg_043ae3d4dad64acb975d38a172fa7e73"
        ]
      },
      "startAt": "2026-10-01T09:00:00Z"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>"
  }
}

Captured local response · HTTP 200:

{
  "journeyId": "jny_f1108c7b3a1746a2ad5fff29d1d48c24",
  "version": null,
  "subject": "sample",
  "status": "completed",
  "exitReason": null,
  "truncated": false,
  "startedAt": "2026-10-01T09:00:00.000Z",
  "endedAt": "2026-12-30T09:00:00.000Z",
  "path": [
    {
      "seq": 1,
      "nodeId": "audience",
      "kind": "branch",
      "outcome": "yes",
      "at": "2026-10-01T09:00:00.000Z",
      "detail": {}
    },
    {
      "seq": 2,
      "nodeId": "wait_30d",
      "kind": "delay",
      "outcome": "waiting",
      "at": "2026-10-01T09:00:00.000Z",
      "detail": {
        "until": "2026-10-31T09:00:00.000Z"
      }
    },
    {
      "seq": 3,
      "nodeId": "email_30d",
      "kind": "send",
      "outcome": "intended",
      "at": "2026-10-31T09:00:00.000Z",
      "detail": {
        "templateRef": "tpl_f6f24fa7b8d24351a003ff6c590deecb",
        "reasons": []
      }
    },
    {
      "seq": 4,
      "nodeId": "wait_60d",
      "kind": "delay",
      "outcome": "waiting",
      "at": "2026-10-31T09:00:00.000Z",
      "detail": {
        "until": "2026-11-30T09:00:00.000Z"
      }
    },
    {
      "seq": 5,
      "nodeId": "email_60d",
      "kind": "send",
      "outcome": "intended",
      "at": "2026-11-30T09:00:00.000Z",
      "detail": {
        "templateRef": "tpl_ab9cad1d14c44d469fa7a683d4f7f29b",
        "reasons": []
      }
    },
    {
      "seq": 6,
      "nodeId": "wait_90d",
      "kind": "delay",
      "outcome": "waiting",
      "at": "2026-11-30T09:00:00.000Z",
      "detail": {
        "until": "2026-12-30T09:00:00.000Z"
      }
    },
    {
      "seq": 7,
      "nodeId": "email_90d",
      "kind": "send",
      "outcome": "intended",
      "at": "2026-12-30T09:00:00.000Z",
      "detail": {
        "templateRef": "tpl_2f31488a5a114864bf7ae0a124f3963f",
        "reasons": []
      }
    },
    {
      "seq": 8,
      "nodeId": "done",
      "kind": "exit",
      "outcome": "completed",
      "at": "2026-12-30T09:00:00.000Z",
      "detail": {}
    }
  ]
}

HTTP 200. Read path[] in order; status completed or converted means the walk finished.

Another supported request

Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.

Input · payload.json:

{
  "id": "jny_a5e9a5d4bd8a4271a446eeda5bcb3db4",
  "sample": {
    "segmentIds": [
      "seg_431b6329c182487f9843963bcbb0d494"
    ]
  },
  "startAt": "2026-10-01T09:00:00Z"
}

CLI:

topolo actions validate app_topolo_nurture.journeys.simulate --data @payload.json --json
topolo actions plan app_topolo_nurture.journeys.simulate --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_nurture.journeys.simulate --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json

MCP tool and arguments:

{
  "tool": "topolo_read_action",
  "arguments": {
    "actionId": "app_topolo_nurture.journeys.simulate",
    "input": {
      "id": "jny_a5e9a5d4bd8a4271a446eeda5bcb3db4",
      "sample": {
        "segmentIds": [
          "seg_431b6329c182487f9843963bcbb0d494"
        ]
      },
      "startAt": "2026-10-01T09:00:00Z"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>"
  }
}

Captured local response · HTTP 200:

{
  "journeyId": "jny_a5e9a5d4bd8a4271a446eeda5bcb3db4",
  "version": null,
  "subject": "sample",
  "status": "completed",
  "exitReason": null,
  "truncated": false,
  "startedAt": "2026-10-01T09:00:00.000Z",
  "endedAt": "2026-10-11T09:00:00.000Z",
  "path": [
    {
      "seq": 1,
      "nodeId": "audience",
      "kind": "branch",
      "outcome": "yes",
      "at": "2026-10-01T09:00:00.000Z",
      "detail": {}
    },
    {
      "seq": 2,
      "nodeId": "email_1",
      "kind": "send",
      "outcome": "intended",
      "at": "2026-10-01T09:00:00.000Z",
      "detail": {
        "templateRef": "tpl_57303be174cf4067a1d9d075edf73d23",
        "reasons": []
      }
    },
    {
      "seq": 3,
      "nodeId": "wait_1",
      "kind": "delay",
      "outcome": "waiting",
      "at": "2026-10-01T09:00:00.000Z",
      "detail": {
        "until": "2026-10-04T09:00:00.000Z"
      }
    },
    {
      "seq": 4,
      "nodeId": "check_back",
      "kind": "branch",
      "outcome": "no",
      "at": "2026-10-04T09:00:00.000Z",
      "detail": {}
    },
    {
      "seq": 5,
      "nodeId": "email_2",
      "kind": "send",
      "outcome": "intended",
      "at": "2026-10-04T09:00:00.000Z",
      "detail": {
        "templateRef": "tpl_99bf9ec6fadb402cba4bbd105af37821",
        "reasons": []
      }
    },
    {
      "seq": 6,
      "nodeId": "wait_2",
      "kind": "delay",
      "outcome": "waiting",
      "at": "2026-10-04T09:00:00.000Z",
      "detail": {
        "until": "2026-10-11T09:00:00.000Z"
      }
    },
    {
      "seq": 7,
      "nodeId": "email_3",
      "kind": "send",
      "outcome": "intended",
      "at": "2026-10-11T09:00:00.000Z",
      "detail": {
        "templateRef": "tpl_c4207893b92d44f5857c81ff7ae59b84",
        "reasons": []
      }
    },
    {
      "seq": 8,
      "nodeId": "done",
      "kind": "exit",
      "outcome": "completed",
      "at": "2026-10-11T09:00:00.000Z",
      "detail": {}
    }
  ]
}

HTTP 200. Read path[] in order; status completed or converted means the walk finished.

Refused request · invalid_journey

Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.

Input · payload.json:

{
  "id": "jny_4f942667aade411badf0d7bd89c7f1ce"
}

CLI:

topolo actions validate app_topolo_nurture.journeys.simulate --data @payload.json --json
topolo actions plan app_topolo_nurture.journeys.simulate --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json

Captured local response · HTTP 422:

{
  "error": {
    "code": "invalid_journey",
    "message": "Fix the journey graph before simulating it.",
    "details": {
      "problems": [
        "The entry node \"nope\" does not exist.",
        "Node \"hello\" cannot be reached from the entry node.",
        "Node \"wait\" cannot be reached from the entry node.",
        "Node \"check\" cannot be reached from the entry node.",
        "Node \"nudge\" cannot be reached from the entry node.",
        "Node \"done\" cannot be reached from the entry node."
      ]
    }
  }
}

HTTP 422. Preserve the refusal details and do not claim success.

Refused request · not_found

Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.

Input · payload.json:

{
  "id": "jny_missing"
}

CLI:

topolo actions validate app_topolo_nurture.journeys.simulate --data @payload.json --json
topolo actions plan app_topolo_nurture.journeys.simulate --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json

Captured local response · HTTP 404:

{
  "error": {
    "code": "not_found",
    "message": "Journey was not found in this workspace."
  }
}

HTTP 404. Preserve the refusal details and do not claim success.

Refused request · version_not_found

Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.

Input · payload.json:

{
  "id": "jny_4f942667aade411badf0d7bd89c7f1ce",
  "version": 3
}

CLI:

topolo actions validate app_topolo_nurture.journeys.simulate --data @payload.json --json
topolo actions plan app_topolo_nurture.journeys.simulate --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json

Captured local response · HTTP 404:

{
  "error": {
    "code": "version_not_found",
    "message": "This journey has no such published version."
  }
}

HTTP 404. Preserve the refusal details and do not claim success.

Verify the result

  • Read path[] in order; status completed or converted means the walk finished.

Errors and recovery

  • organization_required (HTTP 403): Select an organization available to the verified caller before choosing a Nurture workspace.
  • permission_denied (HTTP 403): Grant the credential the required Nurture workspace permission.
  • workspace_required (HTTP 409): Create a Nurture workspace, or pass the workspace resource context.
  • invalid_input (HTTP 422): Correct the fields named in error.details using inputSchema, then retry.
  • not_found (HTTP 404): List journeys to find a valid id in this workspace.
  • version_not_found (HTTP 404): Call app_topolo_nurture.journeys.versions.list for the published version numbers.
  • invalid_journey (HTTP 422): Fix the problems app_topolo_nurture.journeys.validate reports first.

Auth or gateway failures may precede this handler. Preserve the exact response shape, error string/code, request id and credential context; no synthetic fixture establishes live credential access.

Recovery boundary

This action does not change service state.

  • Publish journey version: Freeze the current draft as the next immutable version and make it live: new trigger matches and manual enrollments use it from now on. Existing enrollments stay pinned to the version they entered on. Refused when the draft is invalid or unchanged since the last publish.

Evidence

Actual dispatcher and migration-created SQLite or Worker handlers; identity/workspace and external service dependencies are simulated. Fixture identifiers and timestamps are synthetic. These responses establish no live authorization, paid generation, credential provisioning or message delivery. Test scenario and capture digests are retained with each fixture.