--- title: "core: FindEntity (Preprocessor)" slug: "core-find-entity" updated: 2026-04-29T07:47:48Z published: 2026-04-29T07:47:48Z canonical: "docs.lobstersoftware.com/core-find-entity" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # core: FindEntity (Preprocessor) The `FindEntity` preprocessor is used to access an entity (or its ID or other data) in an [Import](/v1/docs/en/orchestration-integration-import) for another entity. The data returned by the preprocessor is applied to a newly created *target element* within the parent XML node. This *target element* virtually replaces the preprocessor node within the XML structure of the imported entity. **NOTE:** If the referenced data concerns an *XML attribute* of the imported entity, the preprocessor [core:FindEntityAttribute (Preprocessor)](/v1/docs/en/core-find-entity-attribute) must be used. The following structure can be integrated into the import structure by loading the template `preProcessor:FindEntity` (see [Orchestration templates](/v1/docs/en/orchestration-integration-templates)) at the position where a *target element* with the data of the *entity to be integrated* should appear at runtime. - The *entity to be integrated* is determined by a [Search](/v1/docs/en/core-search). Only the first match will be considered as a search result. - Optionally, a [Resolvers](/v1/docs/en/core-i-value-resolver) can be defined to specify a detail from the data of the referenced entity as a return value. ![images/download/attachments/58590306/image2020-9-28_11-12-36-version-1-modificationdate-1601284358140-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2020-9-28_11-12-36-version-1-modificationdate-1601284358140-api-v2.png) | Parameter | Type | Meaning | Content (*fixed valu*e/example) | | --- | --- | --- | --- | | `xsi:type ` | String attribute | type of preprocessor | `core:FindEntity` | | `type` | String attribute | entity type for the [Search](/v1/docs/en/core-search) to be performed | `base:Role` | | `target` | String attribute | name of the target element replacing the `preProcessor` node | `role` | | `returnId` | Boolean attribute | defines the return value (only ID or complete entity) | `true / false` | | `search` | Subnode | defines a [Search](/v1/docs/en/core-search) for the specified entity type | See example | | `resolver` | Subnode | defines a [Resolvers](/v1/docs/en/core-i-value-resolver) to apply to the returned entity | See example | **NOTE:** The [Resolvers](/v1/docs/en/core-i-value-resolver) (`resolver`) is disregarded if the parameter `returnId` is set to `true`, as this returns only the ID (`id`) instead of an entity. Example: By a [Single import](/v1/docs/en/core-import), a new user "importDemo" should be created, assigned to the role "Administrator" and the company "SL Germany". This user should also be assigned the address of the company "SL Germany". - Since a user cannot be created without a password, the `passwordHash` attribute is used to assign a default password (see [Importing user accounts with a password](/v1/docs/en/orchestration-integration-import-features-password)). - The first preprocessor appears in the `roles` element of the `base:User` object, where the ID (`returnId:true`) of the "Administrator" role is searched for at runtime. It creates a *target element* of the element type `role`. - The second preprocessor appears in the `companies` element of the `base:User` object, where the ID (`returnId:true`) of the company "SL Germany" is searched for at runtime. It creates a *target element* of the element type `company`. - The third preprocessor appears defined as a *target element* the user’s `address` node and assigns the address of the company "SL Germany" to it, which is determined from the search result by a [Resolvers](/v1/docs/en/core-i-value-resolver). Altogether, the [Single import](/v1/docs/en/core-import) is defined by the following XML structure: ```xml                                                                                                                                                                 ```