Retool Portals & Embed Use Case

First off, I'd like to say that it's fantastic to see the recent feature update. I've gone through the accompanying blog post and the documentation, but I'm having a bit of difficulty figuring out how to set it up for my specific use case.

Here's what I'm aiming for:

  1. Workspace Setup for Role: I want to configure a Retool workspace specifically for a role named 'agent'.
  2. Company Assignment for Each Agent: Each agent would be associated with a 'company', which in our context, is a B2B entity within Retool.
  3. Expected Workflow: Ideally, a company would have multiple agents. When these agents utilize the Retool app, their specific company ID should drive their interactions and the components they interact with.

The challenge: When a user signs in, I imagine we'd need to initiate a database query to fetch the user's associated 'company'. This company ID is assigned externally, in another application, which presumably the company admin has access to.

End Goal: Our vision is to develop a portal where users can sign in, get associated with a company (akin to a franchisee), and then operate the Retool dashboard from the perspective of that company. I'm leaning towards setting up a dedicated company database and manually assigning users to their respective companies.

Has anyone implemented something similar or have insights on the best way to approach this? I'd greatly appreciate any guidance or best practices!

1 Like

Hi @Thomas_Webb1

Thanks for reaching out about this! I'm bumping this to a new topic from the Portals & Embed intro post.

For 1, are your referring to the Retool Workspace feature? If so, you can assign a workspace home page (default Retool app) per permission group under Permissions->"Agent"->Advanced

For 2 & 3, will you be using Retool Embed? (Will users be authenticating outside of Retool?) If so, I'm wondering if you could pass the company id in as the user's metadata. Would you have access to the company id outside of Retool - in your parent app?

was this solved or in a workable environment ? I am having trouble linking my Firestore DB with the current logged in user.

Hi @JustinSides Thanks for reaching out! Can you share some screenshots or more context on how you want to use the current_user?

Hey, it sounds like you're trying to assign specific metadata to each user and then leverage that in your apps. This is definitely possible, and a good use case for user attributes. I'd be curious to learn more about the type of portal you're trying to build and current challenges, as this is something we're actively working to support well.