# Link to other objects

You can link your External Objects to other existing Objects in a few different ways which are described in detail [here](https://help.salesforce.com/articleView?id=external_object_relationships.htm\&type=5).

Linking objects will enable CRM users to drill up and down between objects. For example, users will be able to drill-down from native Salesforce objects like Accounts and Contacts to External Objects from your data warehouse like Orders or Transactions.

Linking objects is achieved by converting Salesforce fields from their native type, to a Lookup field. Omnata Connect offers a simplified setup process:\\

![](/files/tnjW5K3UB1jdfO3b6bSa)

## Child of Salesforce Object <a href="#indirect-most-common" id="indirect-most-common"></a>

![](/files/7ZlNCPwtphdJZjy7p0Xd)

Within Salesforce, this type of lookup is known as Indirect, and is the most common use case with External Objects.

To use Indirect, you must first have a Salesforce Object (Standard or Custom) with a custom field that contains identifiers matching those in your Snowflake table. For example, if you had a Snowflake table named FINANCIAL\_TRANSACTIONS:

| TRANSACTION\_ID (text, PK) | MERCHANT\_ID (number(10,0)) | TRANSACTION\_DATETIME (datetime) | TRANSACTION\_AMOUNT (number(10,2)) |
| -------------------------- | --------------------------- | -------------------------------- | ---------------------------------- |
| 6b8a942c                   | 123                         | 2017-04-09 17:05:03.000          | 45.67                              |
| 3c9a9e4d                   | 123                         | 2017-04-09 17:05:08.000          | 100.00                             |
| cec0b3c7                   | 123                         | 2017-04-09 17:05:12.000          | 21.00                              |
| 42e8d696                   | 123                         | 2017-04-09 17:05:30.000          | 50.45                              |

You could link to a Merchant ID field on the Account Object, provided it had a compatible data type, and had the "unique" and "external" flags set:

![](/files/q2dVoDded3sJIWofAbuO)

**Note: The custom field should also be marked as case sensitive, to ensure its values match with those in Snowflake.**

Now that the objects are linked in this way, the external objects should automatically appear on the 'Related' tab of the parent object ('Account' in this example), provided there are matching records.

## Child of another External Object <a href="#external-lookup" id="external-lookup"></a>

![](/files/CoxMqZDUTFCuxlgrLN6U)

Within Salesforce, this type of lookup is known as External. It is similar to Indirect Lookup, except that the parent record also sits outside of Salesforce. This is useful when your Data Warehouse contains hierarchical data and you need to drill down.

## Parent of Salesforce Object

![](/files/WIXsY9lp2PlUea8Udw0E)

This less-common pattern is used when multiple Salesforce Standard or Custom objects need to be linked to a single record in the Data Warehouse.


---

# Agent Instructions: 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:

```
GET https://docs.omnata.com/omnata-product-documentation/omnata-connect-for-salesforce/omnata-with-salesforce-connect-external-objects/link-to-other-objects.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
