> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/projects/use-cases/portals-and-partner-sites/customer-order-tracking.md).

# Build an Order Tracking Portal in Salesforce Experience Cloud

Show customers their own orders and delivery milestones with Avonni List and Timeline in Salesforce Experience Cloud.

<figure><img src="https://3857391697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdHOej9Pd5IxJNGEJMZKW%2Fuploads%2FAfI1oj4WfULX7xynp1At%2Fcustomer-order-tracking-cover.jpg?alt=media" alt="Customer Order Tracking in Experience Cloud with two orders in Avonni List and three delivery milestones for ORD-1041 in Avonni Timeline."><figcaption><p>The selected order’s delivery milestones in the customer portal.</p></figcaption></figure>

## Build the project

Choose how you want to build:

✨ **Build with AI** — Give your AI assistant a ready-to-use prompt.

🛠️ **Build it** — Follow the steps yourself.

{% tabs %}
{% tab title="Build with AI" icon="wand-magic-sparkles" %}
{% stepper %}
{% step %}

#### Prepare the assistant and site

Follow [Build with AI](https://docs.avonnicomponents.com/build-with-ai) and use the avonni-experience-components skill. Work in a sandbox with an existing authenticated Experience site and Avonni Experience Components.
{% endstep %}

{% step %}

#### Copy the prompt

{% code title="Order tracking build prompt" collapsedlinecount="10" %}

```
Build an order tracking page for an authenticated Salesforce Experience site. Verify AX List and AX Timeline properties with the Avonni MCP. Use Avonni_Project_Order__c and Avonni_Project_Milestone__c as described in the manual path. Confirm the target sandbox, site, profiles and sharing plan before writes.
Use the List to display the current user's orders and the Timeline to load milestones for the selected order. Map the selected ID from orderList.selectedRecord.Id. Keep external sharing private on orders, grant read access by the user's account through a sharing set, and make milestones inherit the parent order's sharing. Leave the portal read-only.
Seed the four sample orders across two separate accounts. Sign in as two external users and compare visible order IDs. Select two orders to check that only the selected order's milestones appear. Do not deploy to a production site.
```

{% endcode %}
{% endstep %}

{% step %}

#### Review and test

Inspect the permission set and sharing set before running both users through the Try it steps.
{% endstep %}
{% endstepper %}
{% endtab %}

{% tab title="Build it" icon="screwdriver-wrench" %}
{% stepper %}
{% step %}

#### Prepare the sandbox and data model

Use a sandbox Experience site with Lightning Web Security, Avonni Experience Components and two active external test users linked to different accounts. Create a Tracking Order object (Avonni\_Project\_Order\_\_c) with a text Name, Account\_\_c lookup to Account and Status\_\_c text field.

Create Tracking Milestone (Avonni\_Project\_Milestone\_\_c) with a text Name, master-detail Order\_\_c to Tracking Order, Occurred\_At\_\_c date/time and Details\_\_c text. Set external sharing on orders to Private and use Controlled by Parent for milestones.
{% endstep %}

{% step %}

#### Set up read access and sample data

Give the two external test users Read access to the two objects and their display fields. In the sharing set for their profile, map the user's Account to Tracking Order.Account\_\_c with Read access. Preserve any existing mappings and check that each user is a site member.

Give the first account orders ORD-1041 and ORD-1042. Give the second account ORD-2041 and ORD-2042. Add dated milestones under their corresponding parent orders.

{% code title="Sample orders and milestones" collapsedlinecount="10" %}

```
ORD-1041 | In transit | Order received, Packed at the warehouse, In transit
ORD-1042 | Packed | Order received, Packed for pickup
ORD-2041 | Delivered | Order received, Dispatched, Delivered to site
ORD-2042 | Received | Order received
```

{% endcode %}
{% endstep %}

{% step %}

#### Connect the list and timeline

In Experience Builder, create a page for authenticated customers. Add AX List with API name orderList. Query Tracking Order, use Id as the item key, Name as the label and Status\_\_c as the description. Enable Highlight on Click.

Add AX Timeline and query Tracking Milestone. Filter Order\_\_c equals the selected order ID. Use Name as the title, Details\_\_c as the description and Occurred\_At\_\_c as the event date. Use a clear empty state when no order is selected.

{% code title="Timeline filter value" collapsedlinecount="10" %}

```
{{orderList.selectedRecord.Id}}
```

{% endcode %}

Publish the page in the sandbox only and test it as the two customer users.
{% endstep %}
{% endstepper %}
{% endtab %}
{% endtabs %}

## Try it

1. Sign in as the first customer. Confirm ORD-1041 and ORD-1042 appear. Select each and check that the timeline changes to that order's milestones.
2. Sign in as the second customer. Confirm ORD-2041 and ORD-2042 appear and that the first account's orders and milestones are absent.
3. Test a customer with no visible orders and check the empty message.

**Sandbox result.** In the Experience Cloud sandbox, the first customer account saw only ORD-1041 and ORD-1042. The second saw only ORD-2041 and ORD-2042. Switching orders updated the timeline without reloading the page and removed the previous order’s milestones. Salesforce records confirmed four orders and nine milestones linked to the intended accounts and orders.

## Component references

* [AX List](https://docs.avonnicomponents.com/experience-cloud/experience-components/ax-list)
* [AX Timeline](https://docs.avonnicomponents.com/experience-cloud/experience-components/ax-timeline)


---

# 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.avonnicomponents.com/projects/use-cases/portals-and-partner-sites/customer-order-tracking.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.
