The OCP database is not included in the free version of OCP. The free version syncs data in real-time without using the OCP database, letting you access public apps and data syncs.
Contact your Customer Success Manager if you have any questions.
Use the Optimizely Connect Platform (OCP) Custom Endpoints (real-time) app to create a webhook endpoint URL that you can send data to for real-time ingestion into your OCP account without using the OCP database. You can also sync the URL to other Optimizely products.
This is a good option to sync data with OCP without requiring developer resources.
Install and configure the app
This app does not use the OCP database, so you handle the data schema configuration directly in the app settings, unlike the Custom Endpoints (scheduled) app. You can only configure one object (database table) per app installation.
- Go to Data Setup > App Directory.
-
Select the Custom Endpoint (real-time) app.
- Click Install App, then go to the Settings tab.
- Complete the following settings for each field you want to add to the object (database table), and then click Add Field.
- Field Name – Enter the field name. Must be lowercase with underscores in place of spaces. For example, customer_name.
- Display Name – Enter the field's display name. For example, Customer Name.
- Field Type – Select the field's data type. For example, string.
-
Is Primary Key – Select Yes for the field that you want to set as the primary key, which can only be one field. Select No for all other fields. The primary key is the unique identifier for the object (database table).
-
(Optional) Remove a field by selecting an Existing Field, then clicking Remove Field.
Sync data to Optimizely Graph
- Go to Data Setup > Sync Manager.
- Click New Sync.
- Enter a Sync Name. For example, Custom Endpoint (real-time) Data Sync.
- Complete the following for the sync Source:
- Source – Select OCP App.
- App – Select Custom Endpoint (real-time).
-
Object – Select custom_object, which is the default name OCP gives to the object you created in the app settings.
- Complete the following for the sync Destination:
- Product – Select Optimizely Graph.
- Instance – Select the Optimizely Graph instance to which you want to sync your data.
- Content Type – Select the Optimizely Graph content type to which you want to sync your data, like CMPImage.
- Status – Select the CMS status for the content. See View versions.
-
Language – Select the Optimizely Graph
localefor the content. See Locale.
-
Connect your custom app's fields with Optimizely Graph fields in the Field Mapping section.
To add a field mapping, click Add Mapping, then select the Source Field and the Destination Field that you want to connect.
You can add as many mappings as needed, but ensure the data types are compatible between mappings. For example, if the source field data type is string, the destination field data type must also be string.
The following image shows an example of three field mappings between the source (the OCP Custom Endpoint (real-time) app) and destination (Optimizely Graph).
-
Click Save.
Access the endpoint URL
When you save the data sync, OCP automatically generates your endpoint URL.
- Go to Data Setup > App Directory.
- Select the Custom Endpoint (real-time) app.
- Go to the Settings tab of the app.
- Expand the Webhooks section. Each data sync has its own unique endpoint. Use your Data Sync ID to find the corresponding endpoint.
Send data to your custom endpoint
Send data to your custom endpoint in the following format:
{
"field1": "value1",
"field2": "value2"
}
You can only sync data that you have already configured a custom object for in the Custom Endpoints (real-time) app.
Do not send arrays or nested objects. Each field in the JSON payload must match the schema you defined in the app settings.
Article is closed for comments.