Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Objects and fields

This topic describes fields for storing custom metadata in Optimizely Data Platform (ODP).

Objects and fields relationship

Data in Optimizely Data Platform (ODP) is stored in collections called objects (also known as a database table). Objects are composed of fields. Fields link objects together via relationships.

See review data fields section to learn how to view your existing default and custom data fields.

Fields

Fields allow storing custom metadata on any ODP Object. Fields can store a variety of data:

TypeNotes
TextAny printable UTF-8 encoded character, including space. Text is limited to 1024 characters.
NumberA number represented in standard decimal format (Example: 0, 3.14159, -2.3, -0.112)
Date & Time

Must be formatted as ISO 8601 format or UNIX epoch (seconds since January 1, 1970). Examples: 1435708800, 2015-07-01T00:00:00-00:00, 2015-07-01T12:30:00-07:00

Note: If time and time zone are not provided, the time is assumed to be 12am UTC.

True/FalseMust be one of 0, 1, true, or false
🚧

Important

Change ODP schema with caution. After you create a field or object, you cannot rename it. To correct a naming or a type mistake, delete and recreate the field or object. You can delete a custom field yourself, but you must submit a support request to delete a custom object. For the steps and workarounds, see Manage custom fields.

Create custom fields

You can create custom fields to capture data that is not already provided in ODP's reserved list for each object. However, the new fields only capture data after you create them. For example, if you wanted data from a custom field for a week, you need to create it beforehand to get that data.

To create custom fields:

Create custom objects

You can request custom objects to be created to capture data from objects that are not already provided by ODP. Also, your custom ODP integrations may create custom objects for you.

🚧

Important

Custom objects and identifiers are available for creation only by app developers and ODP Customer Success Managers (CSM). To learn more, contact your CSM or our support team.

Update objects

Update objects by calling the Update Object REST API endpoint or through the ODP Web SDK.

curl -iX POST \
https://api.us1.odp.optimizely.com/v3/objects/products \
-d '[
  {
    "object_id": "myObjectId",
    "some_custom_field": "myValue"
  },{
    "object_id": "myObjectId_2",
    "some_custom_field": "anotherValue"
  }
]' \
-H 'Content-Type: application/json' \
-H 'x-api-key: example.apiKey'
zaius.object({
  type: "zendesk_tickets", 
  {ticket_id: "12345", status: "open"}
});

zaius.object({
  type: "zendesk_tickets", 
  [{ticket_id: "12345", status: "open"}, 
  {ticket_id: "56789", status: "closed"}
}]);

Fix a custom object with the wrong name or key type

You cannot delete a custom object yourself. After you submit a support request, the support team sends it to engineering to complete the deletion and confirms when it is done. Choose one of the following paths based on what is incorrect.

Follow these steps to fix an incorrect object name:

  1. Recreate the custom object with the correct name to unblock work.
  2. Submit a support request to delete the incorrectly named object.

Follow these steps to fix an incorrect key type and keep the same object name:

  1. Submit a support request to delete the object.
  2. Wait for support to confirm the deletion.
  3. Recreate the object with the correct key type and the same name.
📘

Note

Support works on deletion requests alongside other high-priority tickets, so they can take time. To raise the priority, describe your use case in the request.


Did this page help you?