---
title: "Creating hierarchical custom data models for instruments"
slug: "creating-custom-data-models-for-entities"
updated: 2025-12-16T10:05:16Z
published: 2025-12-16T10:05:16Z
canonical: "support.lusid.com/creating-custom-data-models-for-entities"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.lusid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating hierarchical custom data models for instruments

In this tutorial we’ll create the following custom data models (CDMs):

1. A parent CDM applicable to all instruments that mandates a FIGI identifier and a country code property.
2. A child CDM applicable to all entities that further mandates an exchange code property.
3. A child CDM applicable to all bonds that further mandates an ISIN identifier.

With these CDMs in place, you can [create entities](/v1/docs/how-do-i-create-entities-under-a-custom-data-model) under (that is, in the context) of these models in order to enforce the requirements.

### Step 1: Creating a parent custom data model applicable to all instruments

We *could* call the [CreateCustomDataModel](https://www.lusid.com/docs/api/lusid/endpoints/custom-data-models/CreateCustomDataModel) API, but the LUSID web app offers the best experience:

1. Navigate to **Data Management > Custom Data Models** and select **Instrument**: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(702).png)
2. Right-click on the **Instrument** widget and select **Add child** from the context menu: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(703).png)
3. On the left-hand side of the screen, give the custom data model a **Scope**, a **Code** that is unique within the scope, a **Display name** and **Description**: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(714).png)

#### Making the custom data model applicable to all instruments

On the **Conditions** tab, the default behaviour is to make the custom data model applicable to all instruments.

Since this is the required behaviour for our custom data model, there is no need to add a condition.

#### Mandating particular identifiers

On the **Identifiers** tab, click the **Add identifiers** button to add the FIGI identifier and make it **Required**:

![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(715).png)

#### Mandating particular properties

On the **Properties** tab, click the **Add properties** button to add a suitable country code property and make it **Required**:

![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(716).png)

You can add multiple properties using the **Add wildcard** button, for example `Leg/*` to add all properties from the `Leg` domain, or `Instrument/MyScope/*` to add all properties from the `Instrument` domain in the specified scope. Note, however, that multiple properties added using wildcards cannot be made **Required**, so these properties appear prominently in create/edit dialogs but LUSID users are not forced to enter values.

#### Specifying more intuitive names for data fields, identifiers and properties

On the **Aliases** tab we can optionally specify more intuitive names for instrument data fields, identifiers and properties, for example:

![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(717).png)

These names are used instead of the LUSID default names on screens where instruments are listed.

#### Configuring the sort order when instruments are listed

On the **Sort order** tab we can optionally change the default way in which screens containing lists of instruments are sorted. *More info coming soon*.

#### Creating the custom data model

Click the **Save** button to create the model and examine the new hierarchy:

![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(718).png)

### Step 2: Creating a child custom data model applicable to bonds

1. Right-click on the newly-created **All Instruments** widget and select **Add child** from the context menu.
2. On the left-hand side of the screen, give the child custom data model a **Scope**, a **Code** that is unique within the scope, a **Display name** and **Description**. Note the **Entity type**, **Level** and **Parent code** fields are inherited from the parent custom data model.
3. On the **Conditions** tab, click the **Add condition** button to restrict applicability using any combination of instrument data fields, identifiers and/or properties. For example, to restrict the model just to instruments of type `Bond`: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(722).png)

Note that to restrict the model to all LUSID types of bond (`Bond`, `ComplexBond` and `InflationLinkedBond`) we would need to use **Advanced mode** and create an expression using [LUSID filter syntax](/v1/docs/filtering-information-retrieved-from-lusid), for example `instrumentDefinition.instrumentType in 'Bond','ComplexBond','InflationLinkedBond'`.
4. On the **Identifiers** tab, add the ISIN identifier and make it **Required**: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(723).png)
5. Click the **Save** button to create the model and examine the new hierarchy: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(724).png)

### Step 3: Creating a child custom data model applicable to equities

1. Right-click on the **All Instruments** widget and select **Add child** from the context menu.
2. On the left-hand side of the screen, give the child custom data model a **Scope**, a **Code** that is unique within the scope, a **Display name** and **Description**. Note the **Entity type**, **Level** and **Parent code** fields are inherited from the parent custom data model.
3. On the **Conditions** tab, click the **Add condition** button to restrict applicability using any combination of instrument data fields, identifiers and/or properties. For example, to restrict the model just to instruments of type `Equity`: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(725).png)
4. On the **Identifiers** tab, add a suitable exchange code property and make it **Required**: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(728).png)
5. Click the **Save** button to create the model and examine the new hierarchy: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(727).png)
