# Trigger User Flows via External Navigation Links

## Introduction

This section provides instructions on triggering a User Flow through a button command of type "**External Navigation Link**." In the given example, Open ID is set up in the Flow Server to utilize **Azure AD as the Identity Provider (IDP)**. Additionally, IFS is configured to use Azure AD as its IDP. With this configuration, Flow can utilize the Auth token cached in the browser, facilitating a (almost) seamless transition to the User Flow.

If the customer is **not utilizing Azure AD** and Single Sign-On (SSO), it is still possible to initiate a User Flow following the instructions outlined in this guide. The key distinction is that in this scenario, users will be required to log in using their Flow credentials through Basic Authentication against the Flow Server.

## How to trigger a User Flow via External Navigation Link

{% hint style="info" %}
In this example parameters are passed to the User Flow. You can of course run a User Flow without starting parameters from IFS.
{% endhint %}

### Configuring the User Flow and generate Web Link

1. Locate the parameter you want to pass to Flow.&#x20;

<figure><img src="/files/O1uTWy0EW5YSp0juOn9e" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
New to IFS debugging? Read this section: [Aurena debugging](/flow-ifs-cloud-development-guidelines/flow-development-with-odata/debugging-and-testing/aurena-debugging.md)
{% endhint %}

2. Go to Flow studio and create your User Flow with the corresponding start variables. The naming in the start step can be different from the IFS parameters. &#x20;

<figure><img src="/files/tiBFRYylVObCVhSiqK4a" alt=""><figcaption></figcaption></figure>

3. Right mouse button (RMB) click the Flow and press **Generate Web Link**&#x20;

<figure><img src="/files/AGsnGG7kRZYlnfcyVuOA" alt=""><figcaption></figcaption></figure>

4. Add the **NG client URL** (<https://web.novacuraflow.com/>) in the "Web Client Url" field.&#x20;

{% hint style="info" %}
The "**Execute Only**" option locks the user to the execution view and prohibits the user from quitting the workflow or returning to a menu after execution.&#x20;
{% endhint %}

4. Click the **Copy (NG)** link to copy the URL to the clipboard. Now it's time to configure the command in IFS.

<figure><img src="/files/ShWGPfwpxcGEYRibySGH" alt=""><figcaption></figcaption></figure>

If you want to learn more about Generating Links visit the Flow help docs:

{% embed url="<https://help.novacuraflow.com/development/flow-studio/applications/server-content/generate-link>" %}

### Configure the command in IFS

1. Open the **page designer**.

<figure><img src="/files/VvlXRaKomZGGKyfFv984" alt=""><figcaption></figcaption></figure>

2. Add a element to the command group of type **ExternalNavigationLink.**&#x20;

   <figure><img src="/files/B9v1fa5pXtwUrq4YunKW" alt=""><figcaption><p>Adding element</p></figcaption></figure>

   <figure><img src="/files/Pf9KuGjl5XYwH60U5jFV" alt=""><figcaption><p>Choose type</p></figcaption></figure>

3. Give the element (button) a **label** and paste the **link** you got from Flow link generation

<figure><img src="/files/kkwDZ5e4MJBYbuZ1zIvP" alt=""><figcaption></figcaption></figure>

4. **Map** the parameters that you configured in the Flow start step.&#x20;

<figure><img src="/files/Fj8AuTs10UM8KWWMWzuQ" alt=""><figcaption><p>Open key value mapping</p></figcaption></figure>

<figure><img src="/files/PCzQBlgm1vCd82Wn5A8l" alt=""><figcaption><p>Map the parameters</p></figcaption></figure>

5. **Confirm and close** x2

<figure><img src="/files/97z8oLXm95NNGS4woTMD" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/3s5FSRWitvVmkIsvGfsU" alt=""><figcaption></figcaption></figure>

6. **Save** and **publish** to context

<figure><img src="/files/og3SC6BgaHjnBPFe93KX" alt=""><figcaption><p>Save</p></figcaption></figure>

<figure><img src="/files/Pn8DkWHVxPtZ0Kvib1GW" alt=""><figcaption><p>Publish</p></figcaption></figure>

7. Click the button you just create to run the User Flow. When clicking the button element a new tab will open a navigate to the configured URL.&#x20;

<figure><img src="/files/qM7x5c1lxU4K466jFSIM" alt=""><figcaption></figcaption></figure>

If this is the first time the user runs the Flow within the current IFS session, they will be prompted with the Flow login page. If Open ID is configured just click "**OPENID**". In the latter case the User Flow will start immediately, no auth against Microsoft is needed.&#x20;

<figure><img src="/files/ObMN9t37jQXZ4Hdc6oCO" alt=""><figcaption><p>Login</p></figcaption></figure>

And voila! The user can now enjoy Flow.

<figure><img src="/files/HA6Yso4uo3Mvd0XLvMt8" alt=""><figcaption></figcaption></figure>


---

# 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.novacura.com/flow-ifs-cloud-development-guidelines/flow-development-with-odata/trigger-flows-from-ifs-cloud/trigger-user-flows-via-external-navigation-links.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.
