Core Concepts
App structure
To build a complete application in Connect Platform for Optimizely Data Platform (ODP), you must have the following files src/ / / . yml .
Lifecycle
The Lifecycle is how you manage all the stages of an app Install Settings Form submission Upgrades Uninstalls App template generated by ocp app init contains a skeleton of lifecycle methods. Add any logic your application needs there.
Jobs
A job is a unit of work that you can schedule or trigger manually. A common use for jobs is to handle historical and incremental imports.
Functions
In Connect Platform for ODP, functions are small, executable blocks of code typically triggered off of a real-time event. An app can have any number of functions stored in the src/functions directory.
Global functions
In Connect Platform for ODP, global functions are very similar to regular functions , with the notable exceptions being they do not execute in an installation context (single ODP account), and they are versioned differently. Global functions are typically required as webhook receivers when providers do not support the registration of webhooks at the installation (ODP account) level.
Channel apps
After a user installs a channel app, they can add it to any Optimizely Data Platform (ODP) campaign touchpoint, shown below The typical channel interface flow is as follows Check if the channel is ready to use. For example, ensure the app user has configured their credentials before you attempt to send touchpoints through the channel.
Forms
Connect Platform for Optimizely Data Platform (ODP) apps have two tabs that display to users Overview – Provide an overview of your app to users, including steps required to complete the installation and setup. Settings – Provide the required fields for users to configure the integration, such as entering their third-party app credentials to connect with ODP.
Storage
Connect Platform for Optimizely Data Platform (ODP) apps have access to the following three types of storage to support storing sensitive data, configuration data, and general data structures necessary for the operation of your app. Your app must use the provided storage layers and should not attempt to store data outside Connect Platform for ODP or on a file system.
Schema for objects and fields
Data in Optimizely Data Platform (ODP) is stored in collections called objects (also known as a database table). Objects are composed of fields.
App logs and troubleshooting
To assist in development and debugging, apps can log messages using the Connect Platform App SDK's logger. Log access differs by role, as described below Optimizely Support – Can view all logs for all Connect Platform for Optimizely Data Platform (ODP) applications.
Activity Log notifications
You can log important account-level events to the Optimizely Data Platform (ODP) Activity Log using the App SDK's notifications . The ODP Activity Log provides detailed information regarding significant activity, such as data and file load jobs, campaign execution, and more.
Test your app
Connect Platform for Optimizely Data Platform (ODP) app templates include a Vitest configuration ( vitest. config.
OAuth authentication
Connect Platform for Optimizely Data Platform (ODP) provides building blocks to help you implement OAuth authentication for your app. OAuth lets your app call third-party APIs on behalf of the owner of the ODP account where your app is installed.