Skip to content
MyAppBuilder
StableGuide

Build a customer portal

A customer portal is a part of your app where customers sign in and see only what belongs to them: their quotes, orders, jobs, files or requests. MyAppBuilder makes this safe by design: pages are restricted to the Customer role, and "own records" rules make the server return only

A customer portal is a part of your app where customers sign in and see only what belongs to them: their quotes, orders, jobs, files or requests. MyAppBuilder makes this safe by design: pages are restricted to the Customer role, and "own records" rules make the server return only the records whose owner field matches the signed-in customer. This guide sets up roles, portal pages, own-records rules and customer sign-up.

When to use

Use a portal when outside people need to follow their own work (repairs, projects, orders), approve something (a quote), send you requests or files, or chat with your team. The Customer Portal template contains a ready-made example with Requests, Files, Messages and Projects.

How the pieces fit together

Example
Role "Customer" ──▶ can open portal pages only
                 ──▶ permission rule on Quotes: read, "Only their own"
                       (Customer Email = signed-in user's email)
Customer signs up ──▶ gets the Customer role ──▶ lands on the portal page

1. Understand the roles

Every app has six built-in roles: Owner and Admin (full access), Staff, Viewer, Customer (external customers using the portal) and Public (visitors who are not signed in). Customers can do nothing with your data until you give them a rule. Open Users → Roles & permissions to see the role cards and the permission matrix (roles × entities). You can add custom roles with New role.

2. Create the portal pages

  1. In Build → Pages, click New. Name the page My quotes, choose Who can open it? → Customers only (portal) and create it. Repeat for every portal page (My requests, Profile, …).
  2. To change access later, open the page menu … → Page settings → Access: Everyone (public), Your team, Only specific roles or Any signed-in user. Access is enforced on the server: users without access never receive the page.
  3. Add a sign-in page for customers: New → pick the starter Sign-in page (it drops the Customer Login component, a sign-in/sign-up form). Alternatively rely on the built-in /login screen.

3. Drop portal components

The Components library has a Portal category: Quotes, Quote Approval, Orders, Order Status, Jobs, Project Status, Files, Messages, My Repairs, My Requests, Request Form, Support Request, Booking, Customer Login and Profile.

Drop Quotes on My quotes. It creates the Quotes entity if needed and, because it is a portal component, it also creates the permission rule Customer × Quotes: read, only their own, scoped on the Customer Email field. The component's query is filtered the same way, so a customer sees only quotes whose Customer Email equals their sign-in email. Request Form and My Requests work the same for Requests (read and create), and forms pre-fill the owner field with the current user's email.

4. Check or write own-records rules yourself

  1. Open Users → Roles & permissions and click the cell Customer × Quotes in the matrix.
  2. Tick the operations (Read, Create, Update, Delete).
  3. Under scope choose Only their own and pick the field that holds the customer's email (for example Customer Email). All records gives every customer everything; Custom filter lets you write your own filters.
  4. Optionally hide fields (Hidden fields, never sent to this role) or make them read-only.
  5. Save. The rule now applies to every query, form and action for that role. A customer can only create records whose owner field is their own email and can never move a record outside their scope.

5. Let customers sign up

  1. Open Users → Sign-in. Turn on at least one method: Email & password, Magic link or Google.
  2. Keep Allow sign-up on so customers can create their own accounts, or turn it off and add them yourself under App users.
  3. Set Role for new sign-ups to Customer (full-access roles can never be assigned automatically) and After sign-in, go to your portal's first page.
  4. Optionally require email verification.

6. Test as a customer

  1. Click Preview, choose Preview as → Customer and type a customer's email in as user email. Use an email that appears in the Customer Email field of a few test records.
  2. Only portal pages are in the menu; the quotes list shows that customer's quotes only. Switch the email to see another customer's view.
  3. Open Storyboard and set View as → Customer to confirm every portal page is reachable for that role.

7. Publish

Publish to Staging preview first: staging runs on test data, and you can create a test user under Users → App users to sign in for real. When everything works, publish to Production.

Common mistakes

  • Customers see nothing, or "Your role can't read quotes": no rule exists for Customer × Quotes. Add one in the permission matrix.
  • A customer sees other people's records: the rule scope is All records, or the owner field is wrong. Choose Only their own with the email field.
  • The owner field is empty on new records: make sure the form sets it from Current user › email (portal components do this for you).
  • New sign-ups get Staff access: check Role for new sign-ups under Users → Sign-in.

Related

Was this helpful?