> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/flow/tutorials/interactions/send-users-to-an-external-site-or-another-lightning-page.md).

# Send users to an external site or another Lightning page

Link Data Table header buttons to a website, an app tab or the Home page, and choose where the External URL opens, a new tab or the current window.

A sales rep reviewing their pipeline needs the pricing guide on the company wiki, the **Pipeline Review** app page, and a way back to **Home**. Three buttons in the Data Table header do it, each with a Navigate interaction. The first leaves Salesforce, the other two stay in Lightning.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FRpwH8ssLlyM0OYAPVVnR%2Fnavigate-send-users-to-an-external-site-or-another-lightning-page-result.png?alt=media" alt="Data Table of open opportunities with Pricing Guide, Pipeline Review and Home buttons in its header"><figcaption><p>Three header buttons, each with its own Navigate interaction.</p></figcaption></figure>

## Before you start

* A screen flow with an Avonni Data Table of open Opportunities.
* For the app page: the API name of its tab, here `Pipeline_Review`. Find it in Setup, **Tabs**.

## Steps

{% stepper %}
{% step %}

### Add the three header buttons

1. Select the Data Table, click **Open Component Builder** and open the **Header** group of the **Properties** tab.
2. Under **Actions**, add three items, each with a **Label** and a **Name**: `Pricing Guide` (`pricing_guide`), `Pipeline Review` (`pipeline_review`) and `Home` (`home`).
   {% endstep %}

{% step %}

### Open the pricing guide with External URL

1. In the **Interactions** tab, add a **Header Action** interaction, **Target Name** **Pricing Guide**, **Type** **Navigate**.
2. Set **Page Reference Type** to **External URL** and **Url** to the full address, for example `https://wiki.example.com/pricing`.

From a header button, the address always opens in a new tab. The **Target** under **Page Reference Type** has no effect on an External URL.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FepanBpjtqGjoI1Ze15Cw%2Fnavigate-send-users-to-an-external-site-or-another-lightning-page-external-url.png?alt=media" alt="Header Action interaction set to Navigate, External URL, with the Url of the pricing guide" width="320"><figcaption><p>From a header button, the general Target does not apply to an External URL.</p></figcaption></figure>
{% endstep %}

{% step %}

### Open an app page with Navigation Item Page

Add a second **Header Action** interaction, **Target Name** **Pipeline Review**:

* **Page Reference Type**: **Navigation Item Page**.
* **Tab Api Name**: `Pipeline_Review`, the unique name of the tab.
* **Target**: **Current Window** to replace the flow screen, **New Window** to keep it open.
  {% endstep %}

{% step %}

### Go back Home with Named Page (Standard)

Add a third interaction, **Target Name** **Home**, with **Page Reference Type** **Named Page (Standard)** and **Page Name** **Home**. **Page Name** also offers **Chatter**, **Today**, **Data Assessment** and **File Preview**.

The fields of each type are listed in the [Navigate](https://docs.avonnicomponents.com/flow/component-builder/interactions-panel/navigate.md) reference, starting with [External URL](https://docs.avonnicomponents.com/flow/component-builder/interactions-panel/navigate.md#external-url).
{% endstep %}

{% step %}

### Save and test

Click **Done**, save the flow and run it. **Pricing Guide** opens the wiki in a new browser tab, and the flow stays on screen. **Pipeline Review** opens the app page, in the window you chose. **Home** opens the Home page in the current window.
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
The two Targets depend on what fires the interaction. A header button or a Button shows the general **Target** and opens an External URL in a new tab whatever it says. A row action shows no general **Target**, but its External URL has its own **Target**: **New Tab/Window** (the default) or **Current Window**.
{% endhint %}

## Troubleshooting

<details>

<summary>The link opens inside Salesforce or shows an error</summary>

The **Url** has no protocol. Type the full address with `https://`.

</details>

<details>

<summary>The external site opens in a new tab though I chose Current Window</summary>

The interaction fires from a header button, where the **Target** does not apply to an External URL. To open the site in the current window, fire it from a row action and set the External URL **Target** to **Current Window**.

</details>

## Related tutorials

* [Add a New Opportunity button that opens a prefilled record form](https://docs.avonnicomponents.com/flow/tutorials/interactions/how-to-create-an-interaction-to-navigate-to-an-object.md): a header button on the Object Page type.
* [Open a record from a Data Table row](https://docs.avonnicomponents.com/flow/tutorials/interactions/how-to-create-an-interaction-to-a-record-page.md): row actions on the Record Page type.
* [Open records in Console tabs and subtabs](https://docs.avonnicomponents.com/flow/tutorials/interactions/open-records-in-console-tabs-and-subtabs.md): keep the flow open in a Lightning Console app.


---

# 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.avonnicomponents.com/flow/tutorials/interactions/send-users-to-an-external-site-or-another-lightning-page.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.
