Topolo Docs Topolo Platform
Open workspace

Migrate enrollments to live version

Explicitly move active enrollments from an older version (fromVersion) to the journey's live version, up to 500 per call (more true means call again). Safe rule: an enrollment moves only when the node it stands on exists in the live version with the same id and kind; it then continues from that node. Others stay pinned and are listed in skipped[] with a reason. dryRun true reports without changing anything.

Outcome

Explicitly move active enrollments from an older version (fromVersion) to the journey's live version, up to 500 per call (more true means call again). Safe rule: an enrollment moves only when the node it stands on exists in the live version with the same id and kind; it then continues from that node. Others stay pinned and are listed in skipped[] with a reason. dryRun true reports without changing anything.

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:write; required workspace access is read_write. 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.
  • Obtain authorization for the documented effect or personal-data export before supplying CLI --confirm or MCP confirm:true.

Discover the target

topolo whoami --json
topolo actions get app_topolo_nurture.journeys.enrollments.migrate --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
  • id: journeys record id in the selected workspace.
  • fromVersion: Integer source version within the selected journey; inspect enrollment migration blockers and dryRun first.

Request

POST /api/journeys/{id}/enrollments/migrate

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}
fromVersionRequiredintegerInteger source version within the selected journey; inspect enrollment migration blockers and dryRun first. {"minimum":1,"maximum":100000}
dryRunOptionalboolean{}

Exact input schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "fromVersion": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100000
    },
    "dryRun": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "fromVersion"
  ],
  "additionalProperties": false
}

Effects

  • Re-pins each migratable active enrollment to the live version at the same node; history is kept.

Interpret the response

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

Call app_topolo_nurture.journeys.enrollments.list and confirm migrated enrollments show the live version.

Exact success schema:

{
  "type": "object",
  "required": [
    "journeyId",
    "fromVersion",
    "toVersion",
    "dryRun",
    "migrated",
    "skipped",
    "more"
  ],
  "properties": {
    "journeyId": {
      "type": "string"
    },
    "fromVersion": {
      "type": "integer"
    },
    "toVersion": {
      "type": "integer"
    },
    "dryRun": {
      "type": "boolean"
    },
    "migrated": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "skipped": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "enrollmentId",
          "nodeId",
          "reason"
        ],
        "properties": {
          "enrollmentId": {
            "type": "string"
          },
          "nodeId": {
            "type": "string"
          },
          "reason": {
            "type": "string",
            "enum": [
              "node_missing_in_target",
              "node_kind_changed",
              "advanced_concurrently"
            ]
          }
        }
      }
    },
    "more": {
      "type": "boolean"
    }
  }
}

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_9ab0cd109acd4055938361d96ec5f9d3",
  "fromVersion": 1
}

CLI:

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

MCP tool and arguments:

{
  "tool": "topolo_call_action",
  "arguments": {
    "actionId": "app_topolo_nurture.journeys.enrollments.migrate",
    "input": {
      "id": "jny_9ab0cd109acd4055938361d96ec5f9d3",
      "fromVersion": 1
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 200:

{
  "journeyId": "jny_9ab0cd109acd4055938361d96ec5f9d3",
  "fromVersion": 1,
  "toVersion": 2,
  "dryRun": false,
  "migrated": [
    "jen_bd02e3ea6b7a4fcba5a0d8d8ef3a4071"
  ],
  "skipped": [
    {
      "enrollmentId": "jen_6b451cb668d64629aa32976e2aa6c4b8",
      "nodeId": "nudge",
      "reason": "node_missing_in_target"
    }
  ],
  "more": false
}

HTTP 200. Call app_topolo_nurture.journeys.enrollments.list and confirm migrated enrollments show the live version.

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_9ab0cd109acd4055938361d96ec5f9d3",
  "fromVersion": 1,
  "dryRun": true
}

CLI:

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

MCP tool and arguments:

{
  "tool": "topolo_call_action",
  "arguments": {
    "actionId": "app_topolo_nurture.journeys.enrollments.migrate",
    "input": {
      "id": "jny_9ab0cd109acd4055938361d96ec5f9d3",
      "fromVersion": 1,
      "dryRun": true
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 200:

{
  "journeyId": "jny_9ab0cd109acd4055938361d96ec5f9d3",
  "fromVersion": 1,
  "toVersion": 2,
  "dryRun": true,
  "migrated": [
    "jen_bd02e3ea6b7a4fcba5a0d8d8ef3a4071"
  ],
  "skipped": [
    {
      "enrollmentId": "jen_6b451cb668d64629aa32976e2aa6c4b8",
      "nodeId": "nudge",
      "reason": "node_missing_in_target"
    }
  ],
  "more": false
}

HTTP 200. Call app_topolo_nurture.journeys.enrollments.list and confirm migrated enrollments show the live version.

Refused request · permission_denied

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_2f1edea9fb014621bb1a6dbbd35085ce",
  "fromVersion": 1
}

CLI:

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

Captured local response · HTTP 403:

{
  "error": {
    "code": "permission_denied",
    "message": "The credential lacks workspace:write.",
    "details": {
      "requiredPermission": "workspace:write"
    }
  }
}

HTTP 403. 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",
  "fromVersion": 1
}

CLI:

topolo actions validate app_topolo_nurture.journeys.enrollments.migrate --data @payload.json --json
topolo actions plan app_topolo_nurture.journeys.enrollments.migrate --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 · invalid_version

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_9ab0cd109acd4055938361d96ec5f9d3",
  "fromVersion": 1
}

CLI:

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

Captured local response · HTTP 422:

{
  "error": {
    "code": "invalid_version",
    "message": "fromVersion must be older than the live version 1."
  }
}

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

Verify the result

  • Call app_topolo_nurture.journeys.enrollments.list and confirm migrated enrollments show the live version.

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.
  • journey_not_published (HTTP 409): Only a published journey has a live version.
  • invalid_version (HTTP 422): Pass a fromVersion older than the live version.
  • version_not_found (HTTP 404): Call app_topolo_nurture.journeys.versions.list for valid version numbers.

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

Migration only moves forward to the live version; run with dryRun true first and review skipped[].

  • List journey enrollments: List a journey's enrollments, newest first, optionally by status (active, completed, converted, exited); up to 200. Each enrollment is pinned to a version and shows the node it will run next and when (dueAt).

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.