Register and scaffold your app
Use the OCP CLI to register your app ID and scaffold the project structure.
Register your app
Register your app and complete the prompts to give your app a unique app ID and name, define OCP as the target product, and mark the app as shareable with other developers in your organization.
Important
Ensure you choose Connect Platform as the app's target product. Your app ID must be in snake_case: each word is lowercase, with spaces replaced by underscores.
ocp app registerThis command returns the following prompts that you must complete:
The app id to reserve: YOUR_APP_ID
The display name of the app: YOUR_APP_DISPLAY_NAME
Target product for the app: Connect Platform
Keep this app private and not share it with other developers in your organization? NoYour answer to the Keep this app private prompt controls who can access your app:
- Yes – Your app is visible only to your developer account. Other developers in your organization cannot see or modify the app.
- No – Your app is shared with other developers in your organization. They can view, modify, and publish new versions.
Scaffold the app
The CLI downloads a template and creates the project directory with the necessary files. The following templates are available:
- Empty Project – A minimal app without example code.
- Basic Sample – A starter app with example functions and jobs.
- Opal Template App – A template for building Opal tool apps.
Important
Do not select any of the following categories:
- Loyalty & Rewards
- Reviews & Ratings
- Commerce Platform
- Content Management
- Offers
ocp app initThis command returns the following prompts that you must complete:
Name of your app (e.g., My App): YOUR_APP_DISPLAY_NAME
ID of your app [ocp_quickstart]: YOUR_APP_ID
Version [1.0.0-dev.1]: 1.0.0-dev.1
App Summary (brief): YOUR_APP_SUMMARY
Support URL: YOUR_SUPPORT_URL
Contact email address: YOUR_SUPPORT_EMAIL
Select the category for the app: YOUR_APP_CATEGORY
Select a template project: Empty Project- Support URL – The URL where OCP users can find support resources for your app. This displays in the App Directory listing.
- Contact email address – The email address where OCP users can contact you for support. This displays in the App Directory listing and in the app settings tab.
See App versioning for details on versioning your app.
Open the project in your preferred editor and run git init to initialize version control.
Retrieve your tracker ID
To publish and install your app, you need the tracker ID of the OCP account where you want to install it. Run the ocp accounts whoami command to list every account you can reach, grouped by organization. The OCP/ODP accounts table gives the tracker ID, name, availability zone, and type of each account.
$ ocp accounts whoami
Profile
id c19a5189-5a0d-4b7f-8272-f26b5d954320
email [email protected]
role deployer
vendor acme
username jsmith
github username johnsmith
created 2025-01-01 15:00
OptiID account access
Organization Acme Corporation
OCP/ODP accounts
tracker Id name availability zone type
euYdNiVdeR Acme Test us OCP
KcTMuByrxc-eu1 Acme Test EU eu OCP
KDMqBYgRRd-au Acme Test AU au ODP
Personal apps (1)
john_personal_app
Vendor apps (1)
acme_appCopy the tracker ID of the account where you want to install your app, and note its availability zone.
Note
Your account does not display if you lack access to the OCP instance where you want to install your apps. Ask an administrator of the organization that owns the instance to grant you a role using the Admin Center. Any role is sufficient. You do not need the Developer role. See Developer accounts and organizations for information on access levels.
For a description of each section of the output, see Retrieve your tracker ID.