# How can I restrict flow steps or routes based on the logged-in Novacura user role?

**URL:** <https://forum.novacura.com/t/how-can-i-restrict-flow-steps-or-routes-based-on-the-logged-in-novacura-user-role/1035>\
**Category:** Flow Connect\
**Tags:** engineering, sales\
**Created:** [October 7, 2025, 6:32am UTC](https://forum.novacura.com/t/how-can-i-restrict-flow-steps-or-routes-based-on-the-logged-in-novacura-user-role/1035 "2025-10-07T06:32:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![kerimon1223](https://avatars.discourse-cdn.com/v4/letter/k/7C9FD7/32.png) [@kerimon1223](https://forum.novacura.com/u/kerimon1223)\
**Post date:** [October 7, 2025, 6:32am UTC](https://forum.novacura.com/t/how-can-i-restrict-flow-steps-or-routes-based-on-the-logged-in-novacura-user-role/1035/1 "2025-10-07T06:32:17Z")

</div>

Hello everyone,

I’m building a flow that needs to behave differently depending on the user who is logged in. For example, users from the _Sales_ department should only see certain steps, while _Finance_ users should follow a different path in the same process.

I know that the `environment` variable provides information such as `userId`, `environmentType`, and `clientType`. However, I would like to know if there is any **native way in Novacura Flow to manage user roles or groups** — for example, something similar to swimlanes, permissions, or user-based routing.

If that’s not possible, what would be the **recommended approach** to handle this kind of role-based split?  
(For instance, using a script with `environment.userId`, a custom table with user roles, or another best practice.)

Thanks in advance for your help!

---

<div class="post-metadata">

**Author:** ![OlaCarlander](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.novacura.com/olacarlander/32/205_2.png) [@OlaCarlander](https://forum.novacura.com/u/OlaCarlander)\
**Post date:** [October 7, 2025, 6:53am UTC](https://forum.novacura.com/t/how-can-i-restrict-flow-steps-or-routes-based-on-the-logged-in-novacura-user-role/1035/2 "2025-10-07T06:53:45Z")

</div>

Hi,

Unfortunately, the users running the app at the time of writing do not have access to the APIs where they can check role membership. It has been discussed, if you want to follow the progress you can create an idea at [ideas.novacura.com](http://ideas.novacura.com).

But for now, both your solutions would work fine, using a global flow script where you keep the data or a SQL table where you store the userId and something (“Finance”, “Warehouse”, etc) that indicates which path to take (combined with a decision step in the app).

---

<div class="post-metadata">

**Author:** ![ivstde](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.novacura.com/ivstde/32/146_2.png) [@ivstde](https://forum.novacura.com/u/ivstde)\
**Post date:** [October 7, 2025, 8:01am UTC](https://forum.novacura.com/t/how-can-i-restrict-flow-steps-or-routes-based-on-the-logged-in-novacura-user-role/1035/3 "2025-10-07T08:01:18Z")

</div>

Hi,

i have used the environment connector to first fetch the roles for a user and then script / decision /assertion steps to restrict access / execution based on a role.

For example this is for a button in portal:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/novacuratalk/original/1X/7ab6e776945903a59dd867e4438b1f820e864b55.png)

(Maybe not the most performance optimal way…but it works…and if it works…you know 🙂 )

Hope this helps!

B R

Ivan

---

<div class="post-metadata">

**Author:** ![ivstde](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.novacura.com/ivstde/32/146_2.png) [@ivstde](https://forum.novacura.com/u/ivstde)\
**Post date:** [October 7, 2025, 8:02am UTC](https://forum.novacura.com/t/how-can-i-restrict-flow-steps-or-routes-based-on-the-logged-in-novacura-user-role/1035/4 "2025-10-07T08:02:29Z")

</div>

Ah…missed the flow connect tag…well…just gonna leave the post here, maybe it helps someone who misses the tag looking for Flow Classic fix 🙂

---

<div class="post-metadata">

**Author:** ![daniel](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.novacura.com/daniel/32/708_2.png) [@daniel](https://forum.novacura.com/u/daniel)\
**Post date:** [October 10, 2025, 3:08am UTC](https://forum.novacura.com/t/how-can-i-restrict-flow-steps-or-routes-based-on-the-logged-in-novacura-user-role/1035/5 "2025-10-10T03:08:26Z")

</div>

For now (until the API is exposed and useable) I would recommend simply creating a csv file with two columns: user, role. Input all your users and preferred roles into said csv file. Then, create a Table Step, and import the csv.

Once you do that, you can then use scripts to determine which user should see what.

Good luck!

---

<div class="post-metadata">

**Author:** ![kerimon1223](https://avatars.discourse-cdn.com/v4/letter/k/7C9FD7/32.png) [@kerimon1223](https://forum.novacura.com/u/kerimon1223)\
**Post date:** [October 14, 2025, 6:18pm UTC](https://forum.novacura.com/t/how-can-i-restrict-flow-steps-or-routes-based-on-the-logged-in-novacura-user-role/1035/6 "2025-10-14T18:18:31Z")

</div>

```auto
Thanks, Daniel

Is there any documentation on how to use swimlines in Flow Connect? I see that the existing documentation I found is classic, and most of the features don't exist in Connect.

```

---

<div class="post-metadata">

**Author:** ![daniel](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.novacura.com/daniel/32/708_2.png) [@daniel](https://forum.novacura.com/u/daniel)\
**Post date:** [October 14, 2025, 6:39pm UTC](https://forum.novacura.com/t/how-can-i-restrict-flow-steps-or-routes-based-on-the-logged-in-novacura-user-role/1035/7 "2025-10-14T18:39:28Z")

</div>

Swimlanes _do not exist_ in Connect. There is already a feature request for this [here](https://ideas.novacura.com/forums/956630-novacura-flow-connect/suggestions/49242734-swimlanes) and also [here](https://ideas.novacura.com/forums/956630-novacura-flow-connect/suggestions/48991301-push-notifications).

---

<div class="post-metadata">

**Author:** ![kerimon1223](https://avatars.discourse-cdn.com/v4/letter/k/7C9FD7/32.png) [@kerimon1223](https://forum.novacura.com/u/kerimon1223)\
**Post date:** [October 15, 2025, 5:38am UTC](https://forum.novacura.com/t/how-can-i-restrict-flow-steps-or-routes-based-on-the-logged-in-novacura-user-role/1035/8 "2025-10-15T05:38:12Z")

</div>

Thank you for your response. However, what steps should I follow to create the intermediate table? I was thinking of creating a table with the information, then adding a decision point to validate whether it is a specific role — if it is, it should follow the sales flow; if not, the finance flow. Could you please explain if this is the correct approach, what components I should use, and if not, could someone tell me what steps I should take instead?
