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:
- Prepare – Run
ocp app prepareto 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-devpre-release tag,ocp app preparealso starts the Optimizely code review process. See App versioning for details. You cannot publish until your review is approved. - Publish – Run
ocp directory publish YOUR_APP_ID@VERSIONto 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. - 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'sonInstalllifecycle 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:
- Develop locally with
ocp dev. - Run
ocp app prepareto build in OCP. Release versions also enter review at this step. - Run
ocp directory publishto add the version to the App Directory. - Run
ocp directory installto add the app to a test account. - Iterate, then publish a release version.
- End-users install from the App Directory.
NoteFor versions that do not require review, such as
-devversions, combine prepare and publish in one step withocp app prepare --publish.
Related guides
- For data sync implementation guides, see Data syncs.
- For Opal tools implementation guides, see Add a custom tool to Optimizely Opal and the Opal tool reference app end-to-end guide.
Updated about 23 hours ago
