docs
/
AI skills

The customer account portal (My Account)

Every section of a site's built-in /account area — overview, orders, returns, invoices, subscriptions, gift cards, store credit, wishlists, addresses, profile, files, bookings, event tickets, support tickets, forms, messages, benefits, affiliates and shared accounts — what each shows and lets a customer do, the My Account settings (sections, layout page, preset), and how to give customers a page of your own.

Every Appmint site has a customer portal at /account. It is a fixed route drawn by the platform (base-app app/account/), not a page of the site. A signed-out visitor is sent to /login?redirect=<the address> first. /account itself redirects to /account/overview. What frames it (the site's root header and footer) is in Built-in pages and templates. How customers get an account is in The site's sign-up form, and sign-in itself is in App auth and sign-in.

This page covers what is inside the portal, section by section, and the three settings that shape it. "Tested" means checked on the local engine with a @test.local customer (deleted afterwards). Everything else is read from the code, with the file named.

How the portal loads

  • Every section's page first calls GET client-data/all with the customer's token (base-app lib/appmint-auth.ts 329–375; appengine client-account/client-account.controller.ts 662–670). The engine answers one bundle: user, orders (newest 50), reservations, tickets, messages, notifications, invoices, addresses, wishlist, files, benefits, affiliate. Each part fails on its own, so one broken source leaves its section empty rather than the whole page (client-account.service.ts 1165–1221).
  • Some sections use only that bundle. Others fetch their own data through the site's /api (returns, subscriptions, gift cards, store credit, addresses, forms, events, affiliates).
  • A dead session sends the visitor to /login?expired=1, which clears it (appmint-auth.ts 370–372).
  • The sidebar shows the customer's name and the sections that are on. Sign Out goes to /auth/logout and empties the cart kept on the device (components/my-account/Layout.tsx 186–197).
  • The portal is noindex, nofollow (app/account/layout.tsx 13; tested). Its browser title is the platform default, not the site's (tested).

Tested with a signed-in test customer: every section below answered 200, except /account/benefits, which answered 500 ("document is not defined" while drawing on the server). An unknown section (/account/bogus) and any deeper address (/account/orders/123) are 404.

Every section

The section name is both the address (/account/<name>) and the value used in myAccount.features. Sidebar groups and labels come from components/my-account/links.ts 1–150. Each section's component is in components/my-account/.

Commerce

SectionWhat the customer seesWhat they can do
orders · OrdersTheir orders (matched by account, email, or a proven phone; newest 50, no paging), with search and a status filter. The detail shows items and rentals, shipping, addresses, totals, refunds and RMA numbersTrack Order (the carrier's link, else /order/<email>/<number>); Request a return on an order past payment (not new, awaiting payment, failed, cancelled, refunded or returned) with a product line (returns-view.ts 44–50); Report Issue (links to tickets). Orders.tsx
returns · Returns (on whenever orders is)One card per return (RMA): status, refund, items, label and the address to send to, timelineMark as shipped (carrier and tracking) once approved; Cancel return while requested or approved. Calls storefront/returns/my-returns, …/request, …/rma/:rma/ship, …/rma/:rma/cancel (Returns.tsx, ReturnRequestForm.tsx). The store's 30-day window and order email are checked by the engine. See Refund, cancel or return an order
payments · PaymentsInvoices, not saved cards: "To pay" (balance over 0) and "Paid", including invoices of shared accounts they manage. Drafts, quotes, declined and cancelled invoices are hiddenPay now goes to the site's Payment page (/pay?invoiceNumber=…) when the Payment feature is on; otherwise "use the payment link in the invoice email". PaymentMethods.tsx; getClientInvoices 1532–1588. See Take payments on the site
subscriptions · SubscriptionsEach subscription: plan, price per period, status (on trial, active, payment failed, paused, cancelled, ending…), next payment, card, payments historyOnly the buttons the engine allows for that subscription: Change plan (next payment or now), Add / Update card (goes to the payment provider and back), Keep my subscription, Cancel subscription. Subscriptions.tsx; storefront/subscriptions/:sk/<action>. See Subscription plans
gift-cards · Gift cardsCards they hold (balance, expiry, code, ledger) and cards they gave (code masked)Copy code; open /gift-card?code=…; Top up (adds the store's reload product to the cart); Send some to someone (moves part of the balance to a new card). GiftCards.tsx; client/giftcards/me. See Gift cards
store-credit · Store credit & rewards (on with orders or gift-cards)Store credit balance, reward points and their worth, activity ledgerTurn points into a gift card. StoreCredit.tsx; client/finance/rewards, …/rewards/convert
wishlists · WishlistsNamed lists with their items (name or SKU and price, no picture or link)New list, Delete list, Remove item. Items are added from product pages. Wishlist.tsx; client-data/wishlist…
shared-accounts · Shared AccountsPending invitations, the accounts they can order for, and for managers the members and recent ordersOrder for this / Myself (switches the account the cart bills); Accept an invitation; managers: Invite (an existing customer is added straight away and told; a new email gets an invitation link to /account/shared-accounts?invite=…), change role, suspend or restore. The last manager can't step down. SharedAccounts.tsx
reservations · ReservationsTheir bookings, in the business's time zone, with search and a status filterReschedule and Cancel while the booking is new, upcoming, confirmed or pending and still in the future. Both run the public manage-booking calls by email and confirmation code, and email (and text) the customer. Reservations.tsx
events · Events & TicketsMy Tickets (held by their email) and Browse EventsTicket detail with perks; Transfer to another email (the engine allows it only for confirmed or already transferred tickets; it emails both people). No buying and no QR code here. Events.tsx; client/events/tickets/mine
benefits · Benefits & RewardsBenefits they hold (from a group or given directly), pending and rejected applications, and benefits they can apply forApply (accept the agreement, fill the benefit's form). /account/benefits?apply=<name> opens one. Answers 500 on the local engine (above). See Price lists and customer-group pricing
affiliates · AffiliatesPrograms they joined (code, referral link, referrals, earnings, wallet and payouts) and programs they can joinJoin (makes a pending affiliate and emails them); copy the link; payout methods and payout requests. Affiliates.tsx; client/affiliate/*, client/finance/*
forms · FormsEvery form submission made with their email, with the answers labelled from the form, and links they asked for and haven't used ("Not finished")Finish this form on one with no answers. It opens the form fresh: earlier answers are not resumed. Forms.tsx; client-data/forms

Management, communication and settings

SectionWhat the customer seesWhat they can do
overview · Overview (always on)"Welcome back", up to four tiles for the sections that are on (invoices due, active orders, upcoming reservations, open tickets, unread notifications, shared files), recent orders or invoices, pending applications, next reservation, totals, quick linksLinks only. Overview.tsx
files · FilesFiles they uploaded to their own private folder, with view links that last 15 minutesUpload (one or many), Delete. Files.tsx; client-data/files…
messages · MessagesEmails and texts the business sent them (sign-in links, password resets and codes are left out; client-account.service.ts 519–532)Read only. There is no reply or new message, and "mark read" isn't saved
tickets · Support TicketsTheir tickets with status, priority and numberCreate a ticket of any ticket type (the engine fixes the reporter to their account email and emails them it was received); search their own tickets by number. No reply, close or attachments here: they reply to the ticket email. See Customer support ticket flow
notifications · NotificationsThe same list as Messages, with filtersMark read, archive, delete and the preferences panel exist on screen only. Nothing is saved
profile · ProfileName, phone (verified or not), email (read only), security and preferences tabsEdit first name, last name and phone only (a new phone is marked unverified; customer-profile.ts 5–71); Change Password (current and new, 8 or more characters). Photo, email, 2FA and notification preferences are "not available here"
addresses · AddressesSaved addresses with Default, Billing and Shipping tagsAdd, Delete. Editing a saved address and Set as default don't work (see "What it can't do yet")
help · HelpSample help articles, FAQs and contact buttonsPlaceholder content only: every article is a sample and the contact buttons do nothing. Turn it off

These answer at their address but are not in the menu: projects ("Projects are not available in this portal yet"), sites and stats ("Coming Soon"). All three are stubs.

Ask first

  • Which site? Account settings are per site.
  • Which sections should customers see? Ask in the business's words ("orders, invoices and bookings"), then map them to section names. Suggest turning off sections the business doesn't use: help always (it is sample content), notifications (nothing is saved), and any of shared accounts, affiliates, benefits, events or reservations they don't offer.
  • A look? One of the six presets, or keep default.
  • Something the portal doesn't have? For a page of their own, get its content and the address it should live at.

Steps

1. Site Config: read the site

repo_find on site by data.name, then repo_find_one by its id. Note data.myAccount exactly (layout, features, preset) and which Site Features are on (data.features). Payment, Storefront and others decide whether some sections have anything in them.

Hands on: the site id and its myAccount as stored. Check: Studio /app/welcome: the site card shows My Account (Layout page and Sections) under Site Features. Site Config → My Account is the same panel (websitemint components/welcome-screens/buttons/client-portal-drawer.tsx).

2. Site Config › My Account: the sections

myAccount.features lists the sections that are on. Empty or missing means every section. Rules (components/my-account/links.ts 158–166):

  • overview is always on;
  • returns is on whenever orders is;
  • store-credit is on whenever orders or gift-cards is;
  • a section that is off disappears from the menu (and its tile from the overview), and its address redirects to /account/overview.

Write the whole object, keeping layout and preset: repo_update on site with patch: { "myAccount": { "layout": "<as stored>", "features": [ … ], "preset": "<as stored>" } } (leave out keys that weren't there). By API: POST repository/update-partial/site/<id> with { "data.myAccount": { … } }.

Studio: Sections, tick the ones to show (none ticked = all), Save. Studio's list has no Gift cards (and no Store credit or Returns, which follow Orders). Once any box is ticked there, /account/gift-cards is off unless "gift-cards" is added with repo_update (client-portal-drawer.tsx 29–50).

Never send { "data": { … } } to update-partial: it replaces the whole data. Never touch features (Site Features) while changing myAccount.

Tested: with features: ["orders", "profile"], /account/orders, /returns, /store-credit and /profile answered 200; /wishlists, /gift-cards, /tickets and /addresses redirected (307) to /account/overview; and the menu showed only Overview, Orders, Returns, Store credit & rewards and Profile.

Stop: this changes what every signed-in customer sees. List the sections that will show, and wait for yes.

Hands on: myAccount as saved. Check: sign in as a test customer (step 5) and open /account/overview: the menu lists exactly the sections expected, and a section that is off redirects to the overview.

3. Site Config › My Account: the look and the layout page

SettingFieldWhat it does
Preset (not in Studio)myAccount.preset: default, minimal, modern, elegant, dark, midnightColours and type of the portal and of /login, /register, /forgot-password (app/account/layout.tsx 23, 43; app/(auth)/layout.tsx 17, 32–33; components/my-account/themes.ts 45–239). /demo on the site shows all six. Set it with repo_update (send the whole myAccount)
Layout pagemyAccount.layout: a page nameOnly frames the portal on a site without a usable root; with one, root frames it. Also loads that page's Style on the portal. Details: Built-in pages and templates

Studio's comment says no presets are built (client-portal-drawer.tsx 12). That is out of date: the six exist in base-app.

Stop: the preset changes the sign-in pages too. Show the person /demo and wait for yes.

Check: open /login and /account/overview (signed in): both are in the chosen look.

4. Build Studio: a page of the site's own for signed-in customers

The portal can't take new sections. Its menu is fixed in code (links.ts), and every /account/<x> that isn't a built-in section is a 404, including deeper addresses (tested), so a page of the site never shows under /account/. To give customers something the portal lacks (a members' area, downloads, a loyalty card):

  1. Build an ordinary page at its own address, e.g. /members. See Build a website page.
  2. Show content only to signed-in customers with data-show="customer.current.data.email" and a sign-in prompt with data-hide="customer.current.data.email". Don't use customer.signedIn: it is true for everyone. Read their data with window.appmint (customer.current(), customer.addresses(), order.list(), reservation.list(), ticket.list() and the rest, all through /api with their session; base-app runtime/index.ts 70–99). The worked, tested example (a customer's own orders) is in The AppMint JS engine on a page.
  3. Link it from the site's header next to My account (<a href="/account" data-show="customer.current.data.email">), in root: see Shared header and footer. The portal's own sidebar can't link to it.

A signed-out visitor sees the page's sign-in prompt, not a redirect. Send them to /login?redirect=/members so they come back.

Hiding with data-show only hides. The page's HTML is public, so put nothing secret in the page itself. Anything private must come from the customer's own data, read with their session.

Stop: the page and the header link are live. Show both and wait for yes.

Check: open the page signed out (the sign-in prompt shows) and signed in as a test customer (their content shows).

5. Check as a customer

Sign up a @test.local customer (it is sent a welcome email and a sign-in link: acceptable only for @test.local). Then open, with its session:

  • /account/overview and every section that is on: each answers 200 and shows its empty state ("No Orders Found", "No gift cards yet", …);
  • one section that is off: redirected to the overview;
  • the page from step 4, if one was made.

Then delete the test customer with call_appengine DELETE user/customer/profile/<email> (it is emailed "Your account has been removed"; the repository delete refuses customers). Confirm with repo_find that it's gone.

When it's done

Tell the person:

  • which sections customers now see, and that returns and store credit follow orders;
  • what customers can do there in practice (track, return, pay invoices, manage subscriptions, bookings and gift cards, raise tickets), and what they can't (below);
  • the preset and the frame, and any page of their own and where it's linked from.

Open Site Config → My Account and /account/overview on the site.

What it can't do yet

  • New sections or menu links. The menu is fixed; extra pages live at their own address (step 4).
  • /account/benefits errors (500) on the local engine while drawing on the server.
  • Saved cards. payments lists invoices only. The saved-card calls (client-data/payment-methods) return nothing or 501 "not available in the customer portal yet".
  • Addresses: edit and default. Set as default calls an address the engine doesn't have and only changes the screen. Saving an edited address either fails quietly or adds a new one beside the old. Delete removes only the signed-in customer's own address; a failed delete keeps the card and shows the error in the confirm box (client-account.service.ts address delete; base-app AddressList.tsx).
  • Messages and notifications are read only. No reply or compose. Mark read, archive, delete and notification preferences aren't saved.
  • Help is placeholder content: sample articles and contact buttons that do nothing.
  • Tickets can't be replied to, closed or given attachments in the portal. Staff notes and comments are not shown.
  • Forms can't be resumed: "Finish this form" starts it again.
  • Bookings: the cancel reason box is not saved, and the "24 hours" policy text is fixed.
  • Events: no buying and no QR code. Transfer shows for tickets the engine won't transfer.
  • Overview: recent orders show no pictures and today's date. "Active orders" counts completed and refunded orders too.
  • Orders shows the newest 50 only. A return can't be requested on an order found by phone rather than email.
  • Gift cards: a failed load looks like "No gift cards yet".
  • Profile: email, photo, 2FA and notification preferences can't be changed here.
  • Studio's Sections list misses Gift cards, and the preset isn't offered.
  • Title: the portal keeps the platform's default browser title.

Don'ts

  • Don't build a page named account or under /account/…: the route always wins.
  • Don't promise customers a section that isn't wired (Help, notification preferences, saved cards); turn it off instead.
  • Don't write myAccount partially or touch Site Features in the same write; never data: { … } through update-partial.
  • Don't hide private content with data-show alone.
  • Don't test with real customers. Use @test.local, and delete it after.