> For the complete documentation index, see [llms.txt](https://docs.ins-pi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ins-pi.com/freelucy/work-in-the-app/create-relationship.md).

# Create a relationship

Adding a relationship means bringing a record in from the Data Hub and attaching it to your primary element on the upstream or downstream side. You can do this with a click or with a drag, in any editing view.

## Click to add

This is the quickest and most forgiving path, and it works the same in every view.

1. Open the [Data Hub](/freelucy/work-in-the-app/data-hub.md) and find the record you want to relate.
2. On that record, choose **Add to Upstream** or **Add to Downstream**.
3. If more than one relationship type is valid, pick the one you want. If only one applies, YouDesign Freelucy uses it automatically.

<figure><img src="/files/l3LrFTOxz44BoFDAAcG9" alt="" width="375"><figcaption></figcaption></figure>

The relationship is now staged on the chosen side.

## Drag to add

You can also drag a record out of the Data Hub onto a valid drop target. Freelucy lights up only the sides your metamodel allows.

* In **Flow**, drop the record into the upstream or downstream column.
* In **Classic**, drop the record onto the circular drop indicator that appears next to the primary element on the allowed side. Releasing anywhere else cancels the add.

If more than one relationship type is valid, pick one when prompted.

<figure><img src="/files/CgvYV3KhbJ290js7TQAF" alt="" width="375"><figcaption></figcaption></figure>

## How a staged add looks

A new relationship is staged, not yet committed. Freelucy marks staged additions so you can tell them apart from relationships that already exist. In Flow, a staged add shows a green accent and a plus badge.

<figure><img src="/files/kPI1BxETL0GOkYnVNd5t" alt="" width="375"><figcaption></figcaption></figure>

The relationship is not written to ServiceNow until you [commit](/freelucy/work-in-the-app/commit-changes.md).

***

## What's next

* [Create multiple relationships at once](/freelucy/work-in-the-app/create-multiple.md)
* [Commit your changes](/freelucy/work-in-the-app/commit-changes.md)


---

# 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://docs.ins-pi.com/freelucy/work-in-the-app/create-relationship.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.
