Choose page to navigate to based on user role

I have a user avatar in a sidebar in my app that show’s the user’s profile picture. I’d like for them to click the avatar (and also a link from the mobile menu) and get routed to a “coach-view” page. And, if they’re an athlete they need to get routed to a “athlete-view” page. How do I do this?

Combining both types of pages into a single “user-profile” page isn’t the best option for the app so I wan’t to avoid this. But, in a more general sense, how do I apply “if / then” logic for any workflow if I need to test a value to determine if the next step should proceed to Path 1 or Path 2…?


This is how I solved it… Not sure this is the best approach but you can apply some basic conditional logic with the “When Element is Clicked” action…

Hope this helps someone. I check their “role” and then route them to a page based on that role, I had to add two separate workflows to handle each case. Then, I pass the data to the page that I need based on the current user ID…

1 Like