> For the complete documentation index, see [llms.txt](https://learn.coremodels.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.coremodels.io/user-guides/json-ld/merge-json-ld.md).

# Merge (JSON-LD)

This guide assumes that you have already imported your schema, or at least followed the [Dynamic Import (JSON-LD)](/user-guides/json-ld/dynamic-import-json-ld.md) guide, and imported the sample schema, thus having an import profile ready.

The Merge JSON-LD feature enables users of synchronizing a model that has been changed outside CoreModels, by detecting and applying the changes in CoreModels.

Note: you can use the merge import feature to import into an empty space, the merge grid will show that all the nodes are new, and will be created during the process.&#x20;

***

First, open the profile UI:

After an import has been done, the profile UI tab should exist in the CoreModels tab, but if you close it, you can find the profile here: Features Tray → Grids → JsonLd Import/Export Config Grids → your profile.

In the profile Settings (right pane), set the 'Import Type' to 'Merge', you'll notice that the wizard now has an additional step called 'Merge'.

{% hint style="info" %}
If you have used a file for the import, and updated the file, you can upload the new file by clicking on the edit button under the 'Data Source' field in the profile settings.
{% endhint %}

Click on the 'Merge' button to go to the Merge grid.

CoreModels will fetch the data source then detect and list out all the changes that has happened, which are necessary to synchronize the space, it will also show the number of changes categorized by their status in the stats bar.

you can now review the changes that has happened, and unmark the changes that you don't want to apply in CoreModels, you can also mark/unmark the changes based on their status.

***

#### JSON-LD Merge Algorithm, How does it work ?

When merging an external data source with a CoreModels space (destination), it uses the '@id' field to find the matching nodes, once it matches the nodes, it compares the source data that is parsed from the *data source*, with the stored data based on the mappings provided in the profile.

It also detects label changes and order updates that has happened to the source, both the order of the objects, and the order of the JSON array elements inside the properties.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://learn.coremodels.io/user-guides/json-ld/merge-json-ld.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
