# Defining walkthrough Decision

### Creating Decisions

**Decisions** allow you to change the sequential flow of a Walkthrough by setting **conditions**. When met, these conditions can be used to skip or return to certain steps.

After [accessing Adopt Editor](https://docs.nexthink.com/platform/user-guide/adopt/guide-content-development-from-in-app-adopt-editor/..#accessing-specific-guide-in-adopt-editor) for Walkthroughs, from the **+** menu:

1. Select **Decision** to create one.
2. Define your conditions based on [Element](#element-conditions-for-decisions) or [Rule](#rule-conditions-for-decisions). If one option is enabled, Adopt automatically disables the other to prevent conflicts.

#### Element conditions for Decisions

Set conditions based on whether a selected element is **visible** or **present** on the page.

* **Visible** indicates the element can be seen on the page.
* **Present** indicates the element is available in the DOM.

{% hint style="info" %}
Optionally, **Ignore key page selections** and modify **Element locations** by changing or deactivating selectors, similarly to [enabling or disabling element selector overrides](https://docs.nexthink.com/platform/user-guide/guide-creation-and-management-from-nexthink-applications/configuring-adoption-settings#enabling-disabling-element-selector-overrides) from Nexthink Applications.
{% endhint %}

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-46d0892d3443486347bffb9b2f189ea0dc0da345%2Fdecisions_element_condition_1.png?alt=media" alt=""><figcaption></figcaption></figure>

Select which guide step Adopt displays after confirming whether the selected element is present or not.

* The asynchronous nature of webpage element rendering can cause Decisions not to resolve properly. Therefore, you can optionally add a delay, measured in seconds.
* Adopt waits for the delay to end before checking if the conditions of the Decision are met.

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-0036453bd0bdb9c6c3de378c2975b1f09ca66d0e%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Rule conditions for Decisions

Set conditions based on guide **engagement** or **occurrence**. The available conditions are similar to those used for displaying [Context help](https://docs.nexthink.com/platform/user-guide/guide-creation-and-management-from-nexthink-applications/creating-guides#defining-conditions-to-include-guides-in-context-help).

* **Engagement** conditions focus on customer interaction with the **current guide** or **related guides**.
* **Occurrence** conditions focus on the frequency of views or interactions with the current guide.

{% hint style="info" %}
Optionally, you can define multiple conditions to achieve a more targeted or granular Decision. You can also **Ignore key page selections**.
{% endhint %}

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-2725a08ba0ca5f4642ae7b245815c354e5d216ff%2Fdecisions_rule_condition_1.png?alt=media" alt=""><figcaption></figcaption></figure>

Select which guide step Adopt displays after confirming whether your defined conditions are **true** or **false**.

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-e459b0d433ea280ef05815eef46f2eac675f27b4%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Decisions and permissions

When creating Decisions, it is important to consider the permissions that users hold within the application. Users often have different levels of access, and you can adapt guides accordingly to ensure a consistent experience. Configuring Decisions based on permissions helps avoid situations where a user encounters steps they cannot complete.

You can verify how permissions affect guide behavior by reviewing data in the [Guides dashboard](https://docs.nexthink.com/platform/user-guide/adopt/guide-insights-and-analytics/understanding-the-adoption-tab). Use the **Breakdown** widget and switch the breakdown to **Adopt user** to review metrics by user role. A 0% completion rate for a specific role, assuming a reasonable number of starts, can indicate that users in that role are unable to complete the guide due to restricted access.

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-24017321f67588c6c34610b2a03a8aa351996895%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

If permission-related issues appear, you can:

* Make the affected step optional or skip it entirely.
* Limit the guide’s availability to specific people at the condition level.
* Display an error message or redirect users who lack the necessary permissions.
