> 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

Add a record from the Data Hub as an upstream or downstream 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="https://4267074599-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJwX0HDB6chAHkVR797eQ%2Fuploads%2FhKyBy6qbjoMuFbSOovpk%2Fimage.png?alt=media&amp;token=34ca5050-345d-4876-a6ce-95711656f80b" 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="https://4267074599-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJwX0HDB6chAHkVR797eQ%2Fuploads%2FlAlqkpDcC6VieZgT7PiG%2Fimage.png?alt=media&amp;token=7032f9c2-013b-4632-8360-cd9389f0b83a" 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="https://4267074599-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJwX0HDB6chAHkVR797eQ%2Fuploads%2FQAbAHRtZzGj04rVefGVp%2Fimage.png?alt=media&amp;token=ccad68ac-3854-464a-adc3-e3ad439b102f" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ins-pi.com/freelucy/work-in-the-app/create-relationship.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
