> For the complete documentation index, see [llms.txt](https://developer.emporix.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.emporix.io/document-intake-cockpit/configuration/form-layouts/form-layout-related-tabs.md).

# Related Tabs and AI Insight

Add related-entity tabs and an optional AI Insight Box to show linked records and recommendations on the document.

Use **Related Entity Tabs** and **AI Insight Box** on a [Form Layout](/document-intake-cockpit/configuration/form-layouts.md) to show linked records and an optional recommendation panel in [Managing Documents](/document-intake-cockpit/cockpit-views/managing-a-document.md).

## Related entity tabs

Each tab shows a read-only form for a linked record. The tab name is the **Tab label** you enter, for example **Customer**. Select **Add tab**, then **Configure…** on a row to edit it.

<figure><img src="https://1808414410-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPBaf05o2vgbdikMFDTyz%2Fuploads%2Fgit-blob-999eb6b56bf24ba046d19956a8eaec4dfecaf20d%2Fform_layouts_related_tabs.png?alt=media" alt="Related Entity Tabs list with a Customer tab and Configure"><figcaption><p>Related Entity Tabs with tab list and configure</p></figcaption></figure>

{% stepper %}
{% step %}

#### Set the tab source

Set **Tab label**, **ID binding**, and **API URL**. **ID binding** is the document field whose value is the related entity ID. Use `{tenant}` for the current tenant and `{id}` for that ID, for example `https://api.emporix.io/schema/{tenant}/custom-entities/ZG_VENDOR/instances/{id}`.
{% endstep %}

{% step %}

#### Test the connection

Enter a **Sample ID for test**. Use a real ID that the endpoint returns, then select **Test connection**.
{% endstep %}

{% step %}

#### Design the tab form

On the nested **Form layout**, use **Add section**, **Add field**, **Binding**, **Control**, and **Label** the same way as in [Form Layout Sections](/document-intake-cockpit/configuration/form-layouts/form-layout-sections.md). The tab is read-only on the document.
{% endstep %}

{% step %}

#### Save

Select **Save** on the layout.
{% endstep %}
{% endstepper %}

<figure><img src="https://1808414410-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPBaf05o2vgbdikMFDTyz%2Fuploads%2Fgit-blob-58108577fcabec0c83e8be9ebe6455a4a8a14425%2Fform_layouts_related_tab.png?alt=media" alt="Configure related entity tab with Tab label, ID binding, API URL, Sample ID for test, and nested Form layout"><figcaption><p>Configure related entity tab with identity, API URL, and nested form</p></figcaption></figure>

Open one document whose **ID binding** has a valid value and one where it is empty. Confirm that the first shows the expected record and the second reports that no related ID is available. Also test an invalid ID so the loading error is clear rather than misleading data.

## AI Insight Box

The **AI Insight Box** is an optional panel on the side-by-side view in [Managing Documents](/document-intake-cockpit/cockpit-views/managing-a-document.md). It shows a title, the recommendation, and the buttons you add. The box appears when the layout includes it and the recommendation field has text.

On the **AI Insight Box** tab, set **Box title** and optionally select **Add button**, then **Save**. The fallback title is **AI Insight**.

**Recommendation source** is fixed to `mixins.process.aiRecommendation.recommendation` and is read-only in the editor. The component that generates the recommendation must write it to this path.

Select **Add button** to add a **Cloud function**, **Approval**, **Transform document**, or **Open modal** action. Configure its label, access, conditions, and type-specific settings as described in [Document Actions](/document-intake-cockpit/configuration/form-layouts/form-layout-actions.md). Edit, cancel, save, and refresh actions are intended for the document header and do not apply to the AI Insight Box.

Open a document with recommendation text and confirm the box title, content, and buttons. Open one without recommendation text and confirm that the box does not appear.

<figure><img src="https://1808414410-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPBaf05o2vgbdikMFDTyz%2Fuploads%2Fgit-blob-017eb4dc6038ca785ec1a903eeca11c179f330df%2Fform_layouts_ai_insight.png?alt=media" alt="AI Insight Box with Box title, Recommendation source, Add button, and a Revalidate action"><figcaption><p>AI Insight Box with title, recommendation source, and action buttons</p></figcaption></figure>


---

# 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://developer.emporix.io/document-intake-cockpit/configuration/form-layouts/form-layout-related-tabs.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.
