Dev GuideAPI Reference
Dev GuideUser GuidesGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Overview

Build a custom app on the Optimizely Connect Platform (OCP), from planning through release.

The Optimizely Connect Platform (OCP) app development lifecycle guides you from initial planning to public release. Each of the following stages depends on the previous one:

  • Plan your app – Choose your app type, plan your version strategy, and verify prerequisites.
  • Register and scaffold your app – Reserve your app ID and generate the project structure with the OCP CLI.
  • Build your app – Configure the app manifest, define the settings form, add dependencies, and implement app logic.
  • Test your app – Write unit tests, test locally with ocp dev, and install pre-release versions into test accounts.
  • Release your app – Validate, publish, submit for review, and release your app to the OCP App Directory, the marketplace where users discover and install OCP apps.
  • Troubleshoot your app – Use app logs and Activity Log notifications to debug issues.

Prerequisites

Before you start, ensure you have the following:

  • OCP CLI – Install the OCP command-line interface and log in.
  • Node.js – Install Node.js 22 or later. OCP apps require Node.js 22 or later. See Node22 migration guide for details.
  • OCP account access – Have developer access to an OCP account for testing. Contact Optimizely Support if you do not have developer access.

Prepare, publish, and install

The following CLI actions move your app from your machine to an end-user's OCP account. Each step depends on the previous one:

  1. Prepare – Run ocp app prepare to upload your local code and build the app in OCP. Only a prepared app can be published. For release versions, such as versions without a -dev pre-release tag, ocp app prepare also starts the Optimizely code review process. See App versioning for details. You cannot publish until your review is approved.
  2. Publish – Run ocp directory publish YOUR_APP_ID@VERSION to make a prepared version available in the OCP App Directory. After you publish, the version is available to install, but is not yet active in any account.
  3. Install – Add a published version to a specific OCP account, identified by its tracker ID (the unique identifier for an OCP account). End-users install public apps from the App Directory. Developers install pre-release, private, or test versions from the CLI with ocp directory install YOUR_APP_ID@VERSION TRACKER_ID. Install triggers the app's onInstall lifecycle hook (the function that runs when the app is added to an account).

Run ocp directory install only once per app and OCP account. After the initial install, OCP automatically upgrades the installation when you publish a higher patch or minor version. Major version upgrades require a manual reinstall. See App versioning for details.

Follow a typical development path

The following steps reflect the most common sequence for developing and releasing an OCP app:

  1. Develop locally with ocp dev.
  2. Run ocp app prepare to build in OCP. Release versions also enter review at this step.
  3. Run ocp directory publish to add the version to the App Directory.
  4. Run ocp directory install to add the app to a test account.
  5. Iterate, then publish a release version.
  6. End-users install from the App Directory.
📘

Note

For versions that do not require review, such as -dev versions, combine prepare and publish in one step with ocp app prepare --publish.

Related guides