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

# Promoting workbook changes to the shared model

> Shared model promotion pushes changes made in the workbook layer into the model layer so the changes are reusable and available in all workbooks.

<Note>
  **Connection Admin** or **Modeler** permissions are required to promote workbook changes to the shared model.
</Note>

Depending on your workflow preferences, you can promote changes to the shared model from a workbook or by editing the model directly in the model IDE.

## How the model layers interact

Omni's model has three layers that stack on top of each other:

| Layer                 | Scope                                                  | How changes get there                                                                                                 |
| --------------------- | ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- |
| **Shared model**      | Global. Governs every workbook on the connection.      | Promoted from a workbook, merged from a branch, or saved directly in the model IDE.                                   |
| **Branch** (optional) | Isolated development space on top of the shared model. | Added from a workbook, or saved from the model IDE with **Save to branch**.                                           |
| **Workbook model**    | Local to a single workbook.                            | Created automatically as you build in the workbook UI (quick aggregates, custom SQL fields, calculations, and so on). |

Changes you make in a workbook land in the **workbook model** first. They're local to that workbook and invisible to other workbooks until you promote them up a layer.

## Reviewing and promoting workbook changes

<Tip>
  Working in Branch Mode? See [Promoting workbook changes in a branch](#promoting-workbook-changes-in-a-branch) below.
</Tip>

Promoting workbook changes directly to the shared model requires that you are in the **published** version of the workbook. Then, to view and promote changes, you can:

* Click **Model > View & promote changes**
* Click the <Icon icon="layer-group" iconType="solid" /> icon in the workbook's sidebar

Either option will open the workbook model changes drawer, where you can review changes before promoting them. This drawer shows all changes made in the current workbook layer, including added, modified, and removed model items:

<img src="https://mintcdn.com/omni-e7402367/ZnBFkFFUmVuz0zf4/modeling/images/workbook-model-changes-summary.png?fit=max&auto=format&n=ZnBFkFFUmVuz0zf4&q=85&s=c15a6148fa6376ab92a609a77c140e06" alt="Workbook model changes Summary tab" width="548" height="818" data-path="modeling/images/workbook-model-changes-summary.png" />

### Reviewing changes

To quickly understand what changed without opening the IDE, click the **Code** tab to view the "diff" of the underlying model YAML:

<img src="https://mintcdn.com/omni-e7402367/ZnBFkFFUmVuz0zf4/modeling/images/workbook-model-changes-yaml-diff.png?fit=max&auto=format&n=ZnBFkFFUmVuz0zf4&q=85&s=2671adac8ff8dcacb43d2f5185d16718" alt="Workbook model changes Code tab" width="588" height="820" data-path="modeling/images/workbook-model-changes-yaml-diff.png" />

The **Code** tab includes:

* The change type (added, modified, or removed) with color-coded styling
* A YAML snippet of the model item showing relevant properties
* For modified items, a side-by-side comparison of the shared model version and workbook version

### Selecting and promoting changes

In the **Summary** tab of the workbook model changes drawer, review the changes. When ready, click **Promote to shared** to promote all of them to the shared model.

When ready, click the **Promote to shared** button to promote the changes.

<Note>
  If you only want to promote some of the changes, use the checkboxes to uncheck the ones to leave out. Partial promotion requires a branch, so the button becomes **Add to branch** and Omni creates a new branch for the selected changes when you confirm. Merge that branch to apply them to the shared model.
</Note>

## Removing unused objects from the workbook

If you've created fields, views, topics, or relationships in your workbook that are no longer referenced by any queries, you can use the **Remove unused** button to clean up the workbook layer. This will not affect the shared model.

While in edit mode, the **Remove unused** button appears in the workbook model changes drawer alongside the **Revert** and **Promote** buttons.

When you click **Remove unused**:

<Steps>
  <Step noAnchor>
    A confirmation dialog appears showing what will be removed
  </Step>

  <Step noAnchor>
    After confirmation, Omni identifies all model objects (fields, views, topics, and relationships) that aren't referenced by any query in the workbook
  </Step>

  <Step noAnchor>
    These unreferenced objects are removed from the workbook layer
  </Step>
</Steps>

Dependencies between fields are preserved. For example, if field A is used by a query and depends on field B, and B depends on C, then B and C are both preserved — even though no query references them directly. Views with non-field metadata changes (such as label or description updates) are also preserved even if their fields are unused.

<Note>
  The **Remove unused** button is disabled when incremental promotion changes are selected, similar to the **Revert** button behavior.
</Note>

## Promoting workbook changes in a branch

If you're working in Branch Mode, you can stage workbook model changes to your branch instead of promoting them directly to the shared model. This lets you validate changes alongside content updates and merge everything to production at once.

<Note>
  **Connection Admin**, **Modeler**, or **Querier** permissions are required to add changes to a branch. **Connection Admin** or **Modeler** permissions are required to merge.
</Note>

To add workbook model changes to a branch:

1. Open the workbook model changes drawer by clicking **Model > View & promote changes** or the <Icon icon="layer-group" iconType="solid" /> icon in the workbook's sidebar.
2. Review the changes and use the checkboxes to select what to include.
3. Click **Add to branch** to stage the selected changes.

<Warning>
  **Add to branch** is a required step. Workbook model fields that haven't been added to the branch stay in the workbook model and won't be in the shared model after the branch is merged. This is distinct from document edits, which are saved to the branch draft as you work.
</Warning>

Once staged, the changes are part of the branch model and appear in the model IDE when viewing the branch. When you're ready, [merge the branch](/content/develop/branch-mode#publishing-and-merging-branches) to apply your model and content changes to production at the same time.

## Directly editing the model

Edits made directly in the model IDE will be promoted to the shared model as soon as the file is saved.

For more structured development processes, explore the [Branch Mode](/content/develop/branch-mode) and [git integration](/integrations/git) options.
