--- title: "How do I create a custom data model?" slug: "how-do-i-create-a-custom-data-model" updated: 2025-12-03T09:46:09Z published: 2025-12-03T09:46:09Z canonical: "support.lusid.com/how-do-i-create-a-custom-data-model" --- > ## 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. # How do I create a custom data model? You can create a custom data model (CDM) for a supported entity type to control the behaviour of entities of that type (all of them or a subset). A CDM can be standalone, or part of a hierarchy with parents and children of its own. [Work through a tutorial](/v1/docs/creating-custom-data-models-for-entities). With a CDM 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) the CDM in order to enforce the requirements. If you have existing entities created separately, you can optionally [induct them](/v1/docs/managing-membership-of-custom-data-models) in order to enforce the requirements going forward. ## Methods LUSID web appLUSID APILuminesce Call the [CreateCustomDataModel](https://www.lusid.com/docs/api/lusid/endpoints/custom-data-models/CreateCustomDataModel/) API and specify a supported entity type as a parameter in the URL, for example: ```json curl -X POST 'https://.lusid.com/api/api/datamodel/Instrument'  -H 'Content-Type: application/json-patch+json'  -H 'Authorization: Bearer '  -d '{  "id": {    "scope": "CDMs",    "code": "Equity"  },  "displayName": "Equity instruments",  "description": "CDM controlling the behaviour of equities",  "parentDataModel": {    "scope": "CDMs",    "code": "All"  },  "conditions": "InstrumentDefinition.InstrumentType eq 'Equity'",  "properties": [    {      "propertyKey": "Instrument/MyProperties/ExchangeCode",      "required": true    }  ],  "identifierTypes": [    {      "identifierKey": "Instrument/default/Isin",      "required": true    }  ],  "attributeAliases": [    {      "attributeName": "Instrument/MyProperties/ExchangeCode",      "attributeAlias": "Exchange"    }  ],  "recommendedSortBy": [    {      "attributeName": "Name",      "sortOrder": "ASC"    }  ],  "supplementalPropertyKeys": ["Portfolio/MyProperties/ManagerName"] }' ``` Navigate to **Data Management > Custom Data Models** and select a supported entity type: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-ZLGH9TFM.png?sv=2026-02-06&spr=https&st=2026-11-09T06%3A42%3A08Z&se=2026-11-09T07%3A42%3A08Z&sr=c&sp=r&sig=CTqUXS69Zd0ems31XSAeULqi1%2FyEDPntKfoZBcqtU28%3D) Right-click the chosen widget and select **Add child**: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-3WVKBMSY.png?sv=2026-02-06&spr=https&st=2026-11-09T06%3A42%3A08Z&se=2026-11-09T07%3A42%3A08Z&sr=c&sp=r&sig=CTqUXS69Zd0ems31XSAeULqi1%2FyEDPntKfoZBcqtU28%3D) Complete the **New data model** dialog: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-IJ65IH93.png?sv=2026-02-06&spr=https&st=2026-11-09T06%3A42%3A08Z&se=2026-11-09T07%3A42%3A08Z&sr=c&sp=r&sig=CTqUXS69Zd0ems31XSAeULqi1%2FyEDPntKfoZBcqtU28%3D) ***Coming soon*** ## Request fields This section supplements the [API documentation](https://www.lusid.com/docs/api/lusid/endpoints/custom-data-models/CreateCustomDataModel/) and on-screen help text in the LUSID web app. A CDM: - Must have a `scope` and a `code` that together uniquely identify it. - Must have a `displayName` and can have a `description`. - Can have a `parentDataModel`, identified by its scope and code. Note a CDM inherits every attribute of its parent (all the following points), so there is no need to specify these again. - Can have `conditions` that use [LUSID filter syntax](/v1/docs/filtering-information-retrieved-from-lusid) to restrict applicability to a subset of entities. - Can specify a set of allowed `identifierTypes` for entities that support market or user-defined [identifiers](/v1/docs/what-is-an-identifier) (such as `Instrument`), and optionally make values `required`. No other identifiers can be added to entities. - Can specify a set of allowed `properties`, and optionally make values `required`. No other properties can be added to entities. Note you can use a wildcard expression to match multiple properties, for example `Instrument/MyProperties/*` (though these cannot be made `required`, so users are not forced to enter values). - Can specify a set of `attributeAliases` to give fields, identifiers and properties more intuitive names in LUSID web app dashboards. - Can specify an ordered set of fields, identifiers and properties to `recommendedSortBy` in LUSID web app dashboards. - Can specify a set of `supplementalPropertyKeys`. These are automatically returned in LUSID web app dashboards, to reduce the need for dashboard configuration. ## Subsequent updates You can call the [UpdateCustomDataModel](https://www.lusid.com/docs/api/lusid/endpoints/custom-data-models/UpdateCustomDataModel) to update any aspect of an existing CDM. Note any fields omitted in the request are removed; there is no patch facility. To delete a CDM, call the [DeleteCustomDataModel](https://www.lusid.com/docs/api/lusid/endpoints/custom-data-models/DeleteCustomDataModel) API.