> For the complete documentation index, see [llms.txt](https://docs.jetadmin.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.jetadmin.io/ai-app-builder/practical-guides/build-a-customer-portal.md).

# Build a customer portal

Build a read-only order portal where each signed-in customer can access only their own records.

## Prepare data and test accounts

Use Customers and Orders, with an explicit relationship from each order to its customer. Decide how a signed-in user maps to a customer. Prepare two invited test users and at least one order for each customer.

Configure the access rules with [App and data permissions](/access-and-sharing/app-and-data-permissions.md). A visual filter alone is not proof of customer isolation.

## Generate the portal

1. Select the connected source.
2. Adapt this prompt:

> Build a customer order portal using Customers and Orders. Use the configured relationship between the signed-in user and customer. Show only that customer's orders, with delivery status and a read-only detail view. Do not add update or refund actions.

3. Inspect the generated queries and record access configuration.
4. [Preview as the first invited user](/ai-app-builder/preview-and-troubleshoot/preview-as-an-invited-user.md), then the second.

## Verify isolation

| Check                              | Expected result                                  |
| ---------------------------------- | ------------------------------------------------ |
| Customer A opens the list          | Only A's orders appear.                          |
| Customer B opens the list          | Only B's orders appear.                          |
| A requests B's order directly      | Access is denied and B's record is not returned. |
| Anonymous visitor opens the portal | The configured authentication rule is enforced.  |

If isolation fails, correct the permission rules before sharing the app. Do not solve it only by hiding links or buttons.

Check the same cases with real sign-ins in the published app. Use [device previews](/ai-app-builder/preview-and-troubleshoot/control-app-preview.md) to review order details on mobile.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.jetadmin.io/ai-app-builder/practical-guides/build-a-customer-portal.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
