Awesomate docs v0.93.0

Tutorial

Build a customer portal

The same portal as the SDK tutorial, built by asking Claude Code. Customers sign in, see their own jobs, message your team and accept a quote; staff see everything.

This is the sister of the SDK's Build a customer portal. There you write the code; here you ask Claude, and it does each step with the Awesomate tools, using the same code. You'll build the portal for Brightwater Plumbing, a made-up business.

You need: a Pro or Embedded account with Contacts on it (it's reaching accounts in stages), and Claude Code connected. Plan about half an hour, most of it reviewing what Claude proposes.

Start in an empty folder, and check the account first:

Which Awesomate account are you connected to?

1. Describe what you want

I'm a plumber. I want a portal where my customers sign in and see their own jobs, with the status and the quote, and can message us about a job and accept a quote. My staff should see every job.

Claude reaches for the awesomate-portals skill. Before it creates anything it describes the design back to you in a sentence or two, for example: "A job has a title, a status and a quote, and belongs to a customer. Messages belong to a job." Say yes, or change it.

2. The tables

Claude creates the two kinds with awesomate_crm_kinds (action define): job (title, status, quote, linked to a customer contact) and message (body, linked to a job). There's no database to set up.

3. Who sees what

Claude proposes the rules and sets them with awesomate_crm_kinds (action set_access): customers read their own jobs and the messages on them, and write messages on their own jobs; staff read and write everything. Customers can't change a job, so they can't change a price.

The database applies these rules to every read and write, whatever the page asks for. How access works in the SDK docs explains them.

4. The app and the people

Make the app: call it Brightwater portal, invite only. Add me as staff, and add a test customer.

Claude makes the app with awesomate_crm_apps (action create), which gives it a publishable key, and adds people with awesomate_crm_app_users. Each person is matched to your contact with the same email address, which is how "their own jobs" finds them. For a test customer, use an address you can read, such as you+sam@yourdomain with most email providers.

Add two test jobs for Sam: a leaking tap, quoted at $380, and a hot water service, still open.

5. Accepting a quote

Customers should be able to accept a quote, which books the job and tells us.

Customers can't edit jobs, so Claude saves a recipe that does exactly this and nothing more (awesomate_crm_recipes, action save), and opens it to your customers' role (action run_by). It tells you what the recipe changes before opening it, because opening it changes what customers can do.

6. The page

Build the portal page and put it online.

Claude writes the page with the Awesomate SDK, the code from the SDK tutorial, and hosts it as a static app on your hosting (awesomate_app_create, kind: 'static'). It then adds the page's address to the app's allowed addresses (awesomate_crm_apps, action update), because sign-in only works from an address the app lists.

7. Optional extras

Add an AI assistant to the job conversations that drafts replies for my team.

  • An assistant in the conversations (awesomate_crm_assistant), answering from your Knowledge. Each conversation can be off, drafting for staff, or answering by itself. Claude asks which you want, because an AI replying to your customers is your call.
  • Reply emails (awesomate_crm_notifications) when someone replies and the other side isn't looking.
  • Talking by voice: pick one of your agents for the app (awesomate_crm_apps, voice_agent_id).

8. Try it

Open the portal in two browser windows, one signed in as yourself and one as Sam.

  • Sam sees only Sam's jobs; you see every job.
  • Send messages both ways: they appear at once.
  • As Sam, accept the quote: the job turns booked for both of you.
  • Ask Claude to change a job's status, and watch both windows update without a reload.

Where next