The Ontology Software Development Kit (OSDK) allows builders to leverage the full power of the Ontology within Slate's code environment. The OSDK is accessible as a library within the Functions editor, providing type-safe access to object types, link types, actions, and functions from your Ontology.
The OSDK in Slate uses the same underlying APIs as the TypeScript OSDK. Slate uses JavaScript but provides IntelliSense for code completion and type hints.
The OSDK panel in Slate enables you to:
The available Ontologies depend on your platform setup and permissions. You may only have access to one Ontology. You will have to delete and reconfigure the OSDK to switch to a different Ontology later.

Once you have selected an Ontology, you can add four types of entities to your OSDK configuration:
Object types represent the core data entities in your Ontology. Link types define relationships between object types and appear nested under their parent object type.
Action types allow you to execute operations that modify Ontology data.
Functions let you call custom logic defined in your Ontology.
Functions without an API name or those that edit the Ontology cannot be selected.
After configuring your entities:
The generation tag displays the application's OSDK version.

The Functions editor allows you to access and transform data fetched through the OSDK. To get started, select any entity in the OSDK panel to view its documentation and code snippets in the right panel. These snippets are tailored to your specific configuration and can be copied directly into your Slate functions.
For example, selecting an object type displays:
For detailed syntax reference on filtering, aggregations, actions, and other operations, see the TypeScript OSDK guide. Note that Slate uses OSDK version 1 and is in JavaScript, so type annotations are omitted.
After you configure link types in your OSDK, use the pivotTo method to traverse a link from every object in an object set to its linked objects.
For example, if you have a Dealer object type with an orders link to an Order object type, you can retrieve the related orders for a set of dealers:
Copied!1 2 3 4 5import { client } from "@slate/osdk"; const linkedOrders = await client.ontology.objects.Dealer .pivotTo("orders") .fetchPage({ pageSize: 30 });
To traverse a link from a single object instead, access the link directly on that object:
Copied!1 2 3 4 5import { client } from "@slate/osdk"; function getLinkedOrders(source) { return source.orders.fetchPageWithErrors({ pageSize: 30 }); }
To use pivotTo:
pivotTo method is then available and type-safe for the configured link names.Select a link type in the OSDK panel to view the generated snippets for that link, including the exact object type and link API names for your configuration.
Select any entity in the OSDK panel to view detailed documentation in the right panel, including:
The OSDK panel displays indicators for unsaved changes:
If you need to regenerate the OSDK (for example, after Ontology changes):
To troubleshoot generation issues:
If the OSDK fails to load, Slate displays the errors in the health check dialog.
For more information about the health check dialog, see Debug applications.
When you import or duplicate a Slate application that uses the OSDK, the behavior of the OSDK bundle varies:
To remove the OSDK configuration entirely:
Deleting the OSDK removes all configuration and generated code. This action cannot be undone, and you will need to reconfigure the OSDK if needed later.
fetchPage() with appropriate page sizes instead of loading all objects at once.