Diamond StoneDiamond StoneAll plans

Diamond Stone Platform: Modules

Date: 2026-11-11. Revision 2. Status: draft for owner review.

Companion to docs/PLAN.md (what is built and in what order), docs/DESIGN.md (how it looks and behaves) and docs/SCREENS.md (every screen and card). This document sets out how eleven parts of the system work, from eight research passes and the earlier DiyaOS and Diamond Stone planning documents.

  1. Stone trading rules
  2. Logistics, drivers and carriers
  3. Inbox: email and WhatsApp together
  4. Channels: change it once, publish everywhere
  5. Setting up a company and its people
  6. Roles, limits and controls
  7. How every workflow is designed
  8. Signing in
  9. Automatic messages by email and WhatsApp
  10. Website chat and the helpdesk
  11. Notifications

1. Stone trading rules

A survey of stone-industry software found no product built for a small trader that sources against orders and exports, and none offering Arabic. The good ones share a short list of features. Those are adopted here; fabrication features are not.

What is adopted

Feature Problem it solves How it works here
Lot as the unit of stock, with slab lines when a packing list supplies them Two slabs of the "same" stone differ; selling by product code ships the wrong one Each lot has a photo, the supplier's own reference (staff only), finish, thickness, grade, location and status. No photo, no offer
Gross and net measure The supplier invoices one area and the customer pays another; the most common dispute in the trade Both are stored on every lot and slab line. The allowance rule is set per supplier and per sale, and both figures print on the quote, packing list and invoice
Holds with an owner and an expiry The same material sold twice A hold shows who it is for and until when, releases itself, and becomes firm when the advance is received
Packing-list import Typing a hundred slab lines per container Import from the supplier's spreadsheet at receipt; the same lines produce the export packing list
Landed cost per lot The purchase price hides freight, duty, clearing and inland transport A short wizard spreads each cost over the lot by area or weight. Late bills adjust the lot
Cost hidden, margin shown as a light Sales staff discounting to cost; cost leaking to customers Only the owner, finance and purchasing see cost. Sales see Healthy, Thin or Needs approval. Cost never leaves the server for anyone else
Whole-bundle pricing with a split charge Picking the best slabs leaves the rest unsellable Taking part of a bundle adds a charge and needs approval
Supplier claims with deadlines Shortage and breakage claims expire in days A claim opens against the supplier with a countdown, photos and the linked customer claim
Quote that shows the actual material "That is not the stone I chose" The customer sees the range (the lightest, the typical and the most veined piece) and approves it before accepting. The link also shows the validity date and the hold date, with accept and counter-offer
Incoterm, HS code and payment terms on every order Document errors and payment risk in export Fields on the order; a letter of credit is a checklist of documents and dates
Document consistency check Banks and customs reject mismatched weights, marks and counts Invoice, packing list, bill of lading and certificate of origin are checked against each other before release
Container weight by route Overweight containers are refused; limits differ by route The limit is a setting per destination. Weight uses gross size and the stone's own density. Amber at 95%, stop at 100%
Alternate names One stone, several trade names Every stone is found by any of its names
Live "available now" link A weekly list is stale the next day A link per customer that shows what you choose, with photos, and expires
Ageing stock and margin by lot Dead stock goes unnoticed One report: lots by days held and value
A fixed photo routine Photos that do not match the stone cause claims Same distance and angle, a colour reference card, dry surface, finish labelled, no HDR

One correction to the accounting

The plan valued stock at weighted average cost. Stone lots are not interchangeable, and the accounting standard expects items like that to be costed individually. Stock is now costed by specific lot. The accountant confirms this before the stock tables are built, because it shapes them.

Not for a trader

Photo stations and slab scanners, vein-matching and nesting, CAD and CNC links, RFID, kitchen visualisers, offcut management, an own marketplace. If cutting is ever outsourced, one simple screen adds the cutting cost to the lot.

To settle with the owner

2. Logistics, drivers and carriers

Own trucks and outside carriers are both supported, at any volume.

What a phone can and cannot do

A web app cannot report a phone's location once the screen is off or another app is in front. The published standard allows location only to a visible page. Continuous tracking therefore needs either a real Android app running a background service, or a tracker on the vehicle. WhatsApp's business interface does not pass on live location, only single pins.

Three levels of tracking

Level How it works Needs Used for
1. Milestones The driver opens a link and taps each stage. Every tap records one location, the time and a photo Nothing but a phone and the link Every shipment, any carrier
2. Live tracking, driver app A small Android app for drivers reports position in the background during an active job The driver installs the app and consents Own drivers; regular carrier drivers who agree
3. Vehicle and vessel feeds Position from the truck's own tracker; container milestones from a tracking service The carrier shares its feed; a per-container fee Carriers with trackers; sea freight

Oman already requires approved trackers on trucks, so for outside carriers the cheapest source of live position is often their existing tracker, if they will share it.

Staff can always enter or correct any milestone by hand. A manual entry overrides an automatic one and records who changed it, when and why. Every event shows its source: driver, carrier, staff, tracker or tracking service.

The record

Part Holds
Shipment Order, mode, who arranges it (us or the customer), Incoterm, origin, destination
Leg Road or sea; carrier, vehicle, driver or container
Stop Place as a map pin with a Plus Code, landmark, gate photo, contact and time window
Event Stage, time, source, location with its accuracy
Proof Photos, signature, receiver's name, one-time code result, seal number
Documents Delivery note, packing list, invoice, certificate of origin, bill of lading, customs papers
Money Carrier's quote with a validity date, agreed rate, charge to the customer, freight bill
Equipment A-frames out and returned

Statuses are kept short: planned, booked, loaded, in transit, arrived, delivered, closed, with on hold beside them. Finer steps (at the border, customs cleared, gate-in) are dated events on the timeline, not separate states.

The driver

Proof of delivery

In order of strength:

  1. A one-time code sent to the receiver named on the order.
  2. The receiver's name, signature on the screen and a photo.
  3. Refused or nobody there, with a reason and photos.

Each is stamped with time and place. A delivery signed far from the site, or by someone not named in advance, is flagged for review. Shortage or damage opens a claim with the photos attached; nothing is quietly edited.

The logistics company

Sea freight

Maps

What the customer sees

A stage list with dates, an arrival window, the documents, and their contact. A map appears when the load is on the road. They never see the driver's phone number, the carrier's name or any cost.

Rules of the road built in

3. Inbox: email and WhatsApp together

One contact, one place; one screen to answer on either channel (revision 3)

Owner's instruction, 11 November 2026. Screens: "Inbox: one contact, one place" in the sketch. This subsection is the rule; the tables below it give the detail.

The inbox is a list of people, not of threads or channels. Each person appears once, however many numbers and addresses they write from and whichever channel they last used. The row shows who they are, their company, the channels they use as small marks, the latest message, and the reply timer.

Opening a person shows everything said with them, in one timeline. WhatsApp messages, emails, website chat, comments and reviews from social channels, calls logged, documents sent, and the team's own notes, in the order they happened.

In the timeline How it shows
A WhatsApp message A bubble, with a small "WhatsApp" mark, the time and whether it was read
An email A card with its subject in bold, the first lines, attachments as chips; tap to read all. Quoted earlier text is folded away. Shows who was copied and whether it was opened
A note between staff A dashed box with a lock. It can never be sent to the customer
Something the system did A thin line: "Proforma sent", "Delivery signed"
Filters All, WhatsApp, Email, Notes, Files
The record it is about A small card pinned at the top: the order, quote or shipment, with its stage

Answering happens on the same screen, on whichever channel fits. The composer at the bottom has a channel switch on its left.

Behaviour
Which channel it starts on The one the customer used last. Replying to a particular message picks that message's channel and, for email, that subject
WhatsApp One line to type. Shows how long the free-reply window stays open; when it has closed, typing is replaced by the approved templates
Email The composer grows on the same screen: To, copy, subject (carried on from the thread, or made from the record), the message, attachments, the sender's signature. It continues the customer's existing email thread
Both For a document: the file goes by email and a short note by WhatsApp saying it has been sent
Which number or address If the person has several, the one they last used; the others are one tap away
What the switch sheet shows Each channel with the address, whether it is free to reply now, what the person prefers, their language and quiet hours
A draft Kept per person and per channel; switching channel keeps the words

A person and their company.

The team in one place. One owner per conversation; assign or hand over; mention a colleague in a note; "Salim is replying" so two people do not answer at once, with a warning if someone answered since you started; who has seen it; snooze; open, waiting on the customer, waiting on us, closed. Suppliers, carriers and drivers have the same kind of timeline.

What this means for the build

One place for every conversation with customers and suppliers.

How it works

Part Design
Conversation One timeline per customer showing email and WhatsApp in order, each message marked with its channel. Underneath, email keeps its subject threads and WhatsApp its single stream
Who it is A contact has many addresses and numbers. Messages are matched automatically only on an exact match. Possible matches are suggested, never merged by the system. Every merge can be undone
Owner One person owns each conversation; there is an unassigned queue. A conversation goes first to the customer's account owner
Status Open, waiting on customer, waiting on us, closed, and snoozed until a time. A reply from the customer reopens it
Reply timer One first-reply timer in working hours (Sunday to Thursday). It feeds the customer promises and the Halo
Collision warning "Salim is replying" and a warning if someone else answered since you started
Internal notes Kept separately from messages so they can never be sent by mistake; a mention notifies a colleague
Linked record A conversation attaches to a quote, order or shipment; the record shows at the top as a small card. A quote can be sent from the record into the conversation
Templates Short replies with fields filled from the record, always editable before sending
Out of hours One automatic reply per closed period, saying when a person will answer
Two languages The original always stays; a translation can be shown beside it and is marked as machine-made

Email

WhatsApp

Not in the first version

Automatic merging, chatbots, marketing broadcasts and calling. (Suggested replies are now planned with the inbox, as drafts a person sends: docs/AI.md. Comments and messages from Instagram and Facebook arrive once Meta approves access: docs/SOCIAL.md.)

What is kept and what is not

Messages and attachments are stored encrypted. Nothing from a message appears in a notification beyond who it is from. Correspondence tied to an order is kept with the order; enquiries that went nowhere are cleared after a set period. An audit log records who read and exported what.

4. Channels: change it once, publish everywhere

The full plan for social posting (what is automatic, the screens, how this app and the channel service talk, settings, risks) is in docs/SOCIAL.md. This section keeps the facts about each platform.

The connector service as it stands

The service in the screenshot was found in C:\vaiprojects\hba-marketing-module-api. It was built for the Al Hiba portacabin business, and every channel in it is simulated: nothing is sent to any platform yet. It is reachable on a public address and falls back to built-in default keys. It should be closed off until it is rebuilt (see the plan's risks).

Worth keeping from it: the list describing what each channel can do, approval tied to the exact content, protection against sending twice, the stop switch for all or one channel, and the checks for text length and image type.

Not carried over: the simulated engines, driving sites through an automated browser, the unofficial WhatsApp gateway and its ban-avoidance broadcasts, phone-number lookup and people-graph features, and the helper that lets the service approve its own posts.

What each channel really allows

Channel Official way to publish Plan
Own website, Google Search Console, Bing, IndexNow Yes First. The website is the source everything else points back to
WhatsApp Business (profile, catalogue, messages) Yes First, with the inbox
Google Business Profile (details, posts, reviews) Yes, after an access request and a profile verified for 60 days Early. Apply now
Instagram and Facebook Page Yes; one Meta app covers both and WhatsApp Early. Test the review requirements at the start
LinkedIn company page Yes, but access is vetted and a single small company may be refused Apply; post by hand meanwhile
YouTube Yes; uploads are now cheap in quota When there are videos to post
Pinterest Yes, after review Later
X Yes, paid per post; a post with a link costs $0.20 Later, low value for this trade
Google Merchant Center Yes, but it needs fixed prices Only if prices are published
WhatsApp Channels and Status No official way By hand, with a reminder and ready text
Waze, HERE maps No official way to edit a business listing By hand, checked twice a year
OpenStreetMap By hand only; automated edits need community approval One manual edit
OpenSooq, Dubizzle, Facebook Marketplace No official route found for general goods By hand; ask their sales teams in writing about feeds

Nothing is published through an automated browser or an unofficial gateway. Those break the platforms' terms and put the company's accounts and its WhatsApp number at risk. WhatsApp broadcasts go only to people who opted in, through approved templates.

How "change it once" works

  1. One record for each stone, for company details, and for each offer.
  2. A version per channel is produced from it by a template. A channel's version can be adjusted by hand; if the source later changes, it is marked out of date, not overwritten.
  3. Checked before sending: length, image shape, required fields, Arabic.
  4. One job per channel, sent by a queue. A failure on one channel never undoes the others.
  5. Status per channel: queued, live with a link, failed with a plain reason and a retry, needs reconnecting.
  6. Manual channels become tasks with the text ready to copy, a link to the right page, and a tick recording who did it and when.
  7. Comments, reviews and enquiries come back into the inbox.

On the phone: one edit screen, then a "Where this goes" sheet listing each channel with a preview card and its status. A change to company details shows exactly what will change where: "Phone number changes on 6 channels: 4 automatic, 2 tasks created."

The phone app never talks to the connector service directly. It talks to our own server, which holds the keys and passes on only what a person approved.

5. Setting up a company and its people

The system starts with one company. It is built so more can be added later: every record belongs to a company from the first day, and a second, dummy company exists in testing to prove one cannot see the other.

First-time company setup

About ten minutes, quick steps first:

  1. The owner signs in and saves recovery codes.
  2. Company: legal name in English and Arabic, commercial registration number, time zone.
  3. Money: base currency (OMR, three decimals), first month of the financial year, the date the books start.
  4. VAT: registered or not, number, start date.
  5. Accounts: accept the trading-company template; costing by specific lot.
  6. Numbering, one site, logo.
  7. A second administrator, and the first two or three people by role.

Then straight to a real first task, not a tour. Research on tutorials found people who skipped them did as well as those who read them.

Fixed once the first entry is posted: base currency, financial-year start, costing method.

A checklist on the home screen covers the rest, each item opening its task: opening balances, bank accounts, catalogue and stock, customers and suppliers, approval limits, document templates, payroll, the portal, the website, and a first access review at day 30. During setup the Halo's rings show this progress.

The company starts empty. A separate demonstration company is available for practice; no sample rows are ever mixed into the real books.

Adding people

Who How they join How they sign in
All staff An administrator adds their name, phone number and role. They receive a WhatsApp invitation, or scan a QR code shown in person (valid ten minutes) Phone number and a one-time code the first time, then a passkey on their own phone
Outside drivers A job link by WhatsApp The link, confirmed once by a code to their phone
Customers Staff create the first contact, with their phone number, as the customer's administrator Phone number and a one-time code the first time, then a passkey
A customer's colleagues Added by the customer's own administrator, by phone number The same

Customers and the portal

A link in a WhatsApp or email message is convenient but is not proof of identity, and there are no sign-in codes or sign-in links by email (section 8). So a portal page opened from a link can look, and anything that binds asks again:

When people move or leave

6. Roles, limits and controls

Roles

Eight fixed roles. One person may hold two; a small company needs that.

Role Does
Owner Sees everything; approves; releases payments and payroll; reviews exceptions
Administrator Manages people, roles and settings. Cannot post or approve money
Accountant Records bills, invoices and journals; prepares payments; reconciles; closes the month
Sales Enquiries, customers, samples, quotes and orders. Sees a margin light, not cost
Purchasing and shipping Suppliers, orders, inspections, shipments. Sees cost
Warehouse and driver Receives, counts, loads, delivers. Sees quantities only
HR and payroll Staff records, leave, prepares payroll. Sees salaries
Marketing Website, channels, media. Sees no cost

Plus a read-only role for the outside accountant or auditor, and four portal roles for customers: administrator, approver, payer, viewer.

A permission is an area, an action and a reach: for example, "create quotes for my own customers". Three things are hidden unless the role allows them: cost and margin, salaries, and bank details. They are held back by the server, including in exports and PDFs.

On the phone, a role is shown as plain sentences ("Can approve purchase orders up to OMR 2,000"), with a "view as this role" preview. When someone is refused, the screen says what is missing and who can grant it, so the fix is not to make everyone an administrator.

Rules that keep duties apart

  1. Nobody approves something they created or last edited.
  2. Whoever adds a supplier or changes its bank details cannot release its payment. A bank change needs a second person, a call back to a known number, and a waiting period before the first payment.
  3. Whoever prepares a payment does not release it.
  4. Whoever prepares payroll does not approve or release it.
  5. The person who orders, the person who receives and the person who approves the bill are three checks.
  6. Bank reconciliation is reviewed by someone other than the payment preparer.
  7. Large manual journals and anything posted to a past period need approval. Posted entries are never edited.
  8. The administrator role carries no money rights; role changes are acknowledged by the owner.
  9. Discounts, credit notes, write-offs and credit-limit increases above the limit are approved by someone other than the salesperson.
  10. Stock adjustments above a threshold are approved from outside the warehouse.

Approval limits

The limits themselves are the owner's decision. The software sets none by default.

When there are too few people to separate duties

A fraud survey of 2,400 cases found small organisations lose the most per case, and that regular management review is linked with roughly half the loss. So where one person must do two jobs, the owner reviews:

Access is reviewed whenever someone joins, moves or leaves; finance and administrator access every quarter; everyone, including portal contacts, every six months.

7. How every workflow is designed

Every process in the system (enquiry to quote, quote to order, order to delivery, bill to payment, month-end, payroll and the rest) is written to one template before it is built.

The rules

Rule Why
Every record has one explicit status, and changes it only through a named step No record ends up in a state nobody designed
Each step says who may take it, in which status, up to what amount Permission depends on the moment, not just the screen
What must be filled in is set per step, not per record A draft saves with almost nothing; sending needs more; posting needs everything
Nothing posted is edited or deleted It is cancelled, or reversed and re-entered, with the two linked
A sent quote never changes; a revision is a new version Acceptance is tied to one exact version
Every submit carries a one-time key A double tap or a retry on a weak signal never creates two
Two people editing see both values Nothing is silently overwritten
Messages and outside effects go out only after the record is safely saved Nothing is sent for something that failed, and nothing is lost
Every record shows who it is waiting for, since when, and why Nobody has to ask
A hold is a status with a reason and an owner Not a comment
A timer can pause, with a reason "Waiting for the customer" does not count against staff
One notification per step, to the one person who must act Too many alerts get ignored
The customer sees a short, mapped set of stages Internal reasons never leak
A hard stop always has a logged way through for the right person People work around stops they cannot pass
Fewer approvals, taken from the phone Each approval adds waiting; most of a process's time is waiting, not working
Checklists are short and sit at natural pauses Imposed tick-boxes are ignored

The template

For each process, one or two pages:

  1. Name, purpose, owner.
  2. What starts it.
  3. Who takes part.
  4. The record, and how it is numbered.
  5. Its statuses, each with a one-line meaning, and what the customer sees for each.
  6. The steps: from which status to which, who may take it, what must be true, what must be filled in, what happens automatically (entries, stock, messages, documents), who is told, and how it is reversed.
  7. Approvals: amounts, who, what happens if nobody answers.
  8. Timers and what pauses them.
  9. Exceptions, holds and cancellation.
  10. Who may see what.
  11. What happens offline and when two people edit.
  12. What is measured.
  13. Test cases.

What is measured

Every step is written to one log, which is also the audit trail. From it: how long each process takes end to end, how much of that is waiting, how long approvals take, how often a record goes through without being sent back, and how often it needs an exception. With tens of cases a week this is a weekly list of the oldest waiting items, not statistics.

The twenty mistakes each workflow is checked against

  1. Status implied by empty fields instead of stated.
  2. A status changed by editing the record directly.
  3. Permission checked on the screen but not on the server.
  4. Another customer's or company's record reachable by guessing its number.
  5. Everything required at creation, so drafts cannot be saved.
  6. Someone approving their own work; a limit avoided by splitting.
  7. An approval with no time limit, alternate or cover.
  8. Approvals in a row that could run side by side.
  9. A rejection with no reason and no way back.
  10. Editing or deleting after posting.
  11. No way to cancel part-way, leaving stock held.
  12. Duplicates from a double tap or retry.
  13. One person's changes silently overwriting another's.
  14. A message sent before the record is saved, or lost after.
  15. Too many notifications, or to the wrong person.
  16. A timer that cannot pause.
  17. A hard stop with no logged way through.
  18. Internal reasons shown to the customer.
  19. A sent quote or price list that can still be edited.
  20. No log of steps, so nothing can be measured; amounts or tax worked out differently at different steps.

The processes to be written first

Enquiry to quote; quote to order; order to sourcing to delivery; advance and payment verification; supplier bill to payment; sample request; claim; leave request; expense claim; payroll run; month-end close; inviting and removing a person.

8. Signing in

The idea

A code sent to a phone proves the phone is yours once. After that, the phone's own fingerprint or face unlock does the signing in, through a passkey. Codes come back only for a new phone or a lost one.

This is deliberate. Security standards treat text-message codes as a restricted method (numbers can be hijacked) and do not accept email as proof of identity at all. A passkey cannot be phished or guessed, and for the person it is simply their fingerprint.

Who signs in how

Who First time Every time after
Staff Enter the phone number, receive a six-digit code on WhatsApp (text message as fallback), then create a passkey Passkey: fingerprint, face or the phone's PIN
Outside drivers Open the job link, confirm the number once with a code The link
Customers The same: phone number, code, then a passkey Passkey
Logistics company The same Passkey

One way in for everyone: phone number, one code, then a passkey. There is no "Continue with Google", no email sign-in and no password. (Owner's decision, 11 November 2026.) Registration is the only time a code is the normal route; afterwards a code is used only to enrol a new phone or recover a lost one. Passkeys are WebAuthn/FIDO2 credentials held by the phone; a hardware security key can be added as a second one for the owner and the accountant.

Only phone numbers that an administrator has invited can sign in to the staff app. An unknown number gets the same message as a known one, so nobody can test which numbers are registered.

The screens

Screen What the person sees Rules behind it
Welcome The company's logo and one field for a phone number with +968 filled in. Nothing else The number keypad opens; the number is checked and tidied as typed
Enter the code Six boxes, where the code was sent, a "paste" that happens by itself where the phone allows, and a resend timer Six digits, valid ten minutes, works once, tied to this phone's session, limited attempts. WhatsApp first; a text message only as a fallback
Use your fingerprint next time A plain explanation and one button. The phone's own fingerprint sheet follows Offered straight after the first code, again after recovery, and in settings. A second device can be added
Welcome back The person's face and name, and "Use fingerprint" The passkey is offered automatically. "Use a code instead" is always there
Confirm it is you What is about to happen and the amount, and a fingerprint prompt Asked for payments, payroll, period close, role changes and bank details, whenever it was last confirmed more than a few minutes ago
Your devices Each phone signed in, where and when it was last used, with "Sign out" beside it A new device sends a notice to the old one. Administrators can sign anyone out
Locked out "Lost your phone?" with two routes: a recovery code saved at setup, or ask an administrator Recovery is never weaker than first sign-in: an administrator re-invites in person or by a fresh link, and the old phone is signed out

Rules

To confirm

9. Automatic messages by email and WhatsApp

What is automated

Messages the company would otherwise have to remember to send. Each is tied to an event or a date, uses an approved template, and stops by itself when it is no longer true.

Automation Starts when Sends Stops when
Enquiry received A lead tool or form is submitted "We have your enquiry; Salim will reply within 15 minutes" —
Out of hours A message arrives outside working hours When a person will answer Once per closed period
Sample follow-up Samples are marked received A check-in two days later They reply or a quote is requested
Quote follow-up A quote is viewed but not answered for three days A short nudge; a second after seven days Accepted, declined, expired or replied to
Quote about to expire Two days before validity ends A reminder Accepted or extended
Order stage updates The order changes stage "Your layout is approved", "Loaded", "On the way", "Delivered" —
Range or layout approval waiting The range, the layout or the photographs of the actual pieces sent, no answer for a day A reminder Approved, or a change asked for
Payment reminder Three days before an invoice is due; then when overdue A reminder with the amount and bank details behind a secure link Paid, or a dispute is open
Document ready A document is added to an order A link to the portal —
Feedback Two days after delivery One question, answered with a tap Answered
Reorder A set time after a delivered project order "Need more of the same lot?" Opted out
Staff reminders A promise is about to be missed; a document expires; an approval waits To the person responsible Done

How it is controlled

What it is built on

The same outbox that sends everything else: a message is queued only after the event is safely saved, each has a one-time key so it is never sent twice, and failures retry and then surface to a person.

10. Website chat and the helpdesk

Website chat

Chat on the public site and in the client portal, under Contact and offered only while someone is on duty, answered by the team from the same inbox as email and WhatsApp. Whether it is on at launch is an open decision (docs/SITE-DESIGN.md section 21).

Part Design
For the visitor Chat is offered under Contact, not as a button on every page. It opens a sheet with a greeting, who will answer and how soon, and a box to type in. No sign-up to start
Who they are Anonymous at first. After the first reply they are asked for a name and a WhatsApp number or email "so we can continue if you leave"
What staff see The conversation in the inbox, marked "Website", with the page the visitor is on, the stones they looked at, and whether they are still there
Reply promise One minute in working hours. If nobody answers in time, the visitor is offered WhatsApp or a callback, and it is never left hanging
Out of hours Chat is not offered. Contact says "Leave a message" and asks for a WhatsApp number or email. No pretending someone is there
Carry on elsewhere "Continue on WhatsApp" moves the same conversation to WhatsApp, where it survives the visitor closing the page
In the portal The customer is already known, and the chat opens attached to their order
Suggested answers Common questions (delivery times, sample cost, sizes) are offered to staff as one-tap replies, always editable

No chatbot answers customers in the first version. Suggested replies are for staff.

Helpdesk

A question or problem that needs following through becomes a case.

Part Design
What a case is A conversation with an owner, a kind, a deadline and a result. Claims are one kind of case
Kinds Question, delivery problem, damage or shortage, document request, payment query, complaint, portal help
How it starts From any message ("Make this a case"), from the portal's Help screen, from a delivery reported with a problem, or by staff
For the customer A case number, who is handling it, the next step and when to expect it, visible in the portal
For staff A case card in the stream: who, what about (with the order's card), how long open, who it waits on
Deadlines Acknowledge the same day; a target to resolve by kind. The Halo warns before either is missed
Handing over To another person or role, with a note, without the customer repeating themselves
Closing A result is recorded (answered, replaced, credited, declined with a reason) and the customer is asked one question about how it went
Learning A monthly view: cases by kind, by stone, by carrier and by supplier, so repeated problems show up

Help centre

Short answers to common questions, on the public site and in the portal: how samples work, how to read a quote, delivery and unloading, care of the stone, how to pay, how to report a problem. Each is one screen with pictures. A person searching Help sees answers first and "Talk to us" second. The same answers feed staff's one-tap replies, so customers and staff say the same thing.

Staff helpdesk

Staff can raise their own cases the same way: "I cannot sign in", "This figure looks wrong", "I need access to…". They go to the administrator, with the screen the person was on attached.

11. Notifications

What notifies whom

Event Who is told How
New website chat or WhatsApp message The conversation's owner; otherwise whoever is on duty Phone notification at once
New enquiry Sales on duty Phone notification; Halo level 3 as the reply promise runs down
Something waits for my approval The approver Phone notification; Halo level 2
A customer accepted, approved or paid The order's owner Phone notification
A shipment is late or reports a problem Operations Phone notification
A promise is about to be missed The owner of the task, then their manager Halo level 3, then a notification
Routine changes Nobody at the time The daily digest

Rules

12. Back-to-back orders, and what the customer may see

Added 11 November 2026 on the owner's instruction.

Back-to-back orders

Many orders never pass through Diamond Stone's own hands. The stone is ordered from the factory for one customer's order and delivered from the factory straight to that customer. This is the normal case, not an exception, so it is a first-class way of fulfilling an order.

Every order line is fulfilled one of two ways, chosen when the order is confirmed and changeable until the supplier order is sent:

From stock Back to back
Stone comes from A lot Diamond Stone already holds The factory, ordered for this order
Supplier order Not needed Created from the order in one tap, linked to it both ways
Sorting and layout Sorted when the lot was received. The layout, or photographs of the actual pieces, still go to the customer for approval before loading At the factory, before loading. The layout (projects), or photographs of the actual pieces (small orders), go to the customer for approval
Pick-up point Diamond Stone's yard The factory
Stock Reduced when loaded Never enters stock. Shown as "goods in transit" between loading and delivery
Delivery booked from The yard The factory, for the day the factory says it is ready
Who the driver deals with Warehouse The factory's loading contact

One order can mix both: some lines from stock, some back to back, on separate shipments.

The flow (drawn in docs/user-flows.html, "Back-to-back order"):

  1. Customer approves the range and accepts the quote. Sales confirms the order.
  2. Purchasing taps "Order from factory": the supplier order is filled from the customer order (stone, finish, quantity, date needed). It never shows the customer's price.
  3. Owner approves if above the limit. The factory receives it and confirms a ready date.
  4. Purchasing sorts and measures at the factory, then lays the job out, photographed and numbered (projects), or photographs the actual pieces (small orders).
  5. The customer approves the layout, or the photographs of the pieces, in the portal, or asks for a piece to be changed.
  6. Purchasing books transport from the factory: own truck or a carrier, with the factory's loading contact and hours.
  7. The customer confirms the delivery day and that the site is ready.
  8. The driver collects at the factory (Loaded), travels (Left), arrives and gets the delivery signed.
  9. The signed delivery triggers the customer's invoice. The factory's bill is matched to the supplier order and the loading record.

Rules

What the customer sees of the journey

The factory is Diamond Stone's supplier. If a customer can see exactly where their stone was collected, they can go there directly next time. So what the customer sees about the origin, the truck and the driver is controlled by the administrator.

Settings, under Settings → Delivering → What customers see. Each has a default and can be set for everyone, and overridden for one customer or one order.

Setting Default Choices
Where the stone comes from City only ("Sohar") Hidden ("Oman"); city only; exact (Diamond Stone's own yard only, never a factory)
Live position of the truck Only once it is in the general area Never (stages and arrival date only); only once in the general area; always
"In the general area" means The truck has left the origin area, and is shown as an area, not a point, until it is near the customer Origin area: 5, 10 or 25 km. Near the customer: 5, 10 or 25 km. From there the exact position may be shown, since that is the customer's own site
Driver Hidden Hidden; first name only; name and photo. Never the phone number
Truck plate Hidden Hidden; shown on the day of delivery (useful for site gates)
Carrier's name Hidden Hidden; shown
Supplier or factory name on any document or screen Hidden Not changeable for customers
Who the customer contacts about the delivery Their Diamond Stone contact Not changeable: never the driver directly

How the general-area rule works, in plain terms:

Enforced by the server. The customer's phone is never sent the factory's coordinates, the exact position while it is hidden, or any driver field. It is not enough to hide them on the screen. The "view as customer" preview in settings shows exactly what a customer receives.

Driver details

The earlier demonstration portal showed the driver's phone number to customers. That is ended by these rules.

Installing and sign-in (added 11 November 2026)

Staff install the app from Chrome first and sign in inside the installed app, so the passkey is made where it will be used. The passkey is tied to the main domain and serves all three apps. Inside another app's browser, sign-in is by code only. See docs/INSTALL.md.

Website chat: how it is offered (changed 11 November 2026)

Section 10 placed a chat button "in the Omnibar position". On the public site and the portal the bar carries the word "WhatsApp", opening it directly; chat sits under Contact and is offered only while someone is on duty. See docs/SITE-DESIGN.md section 21.

The lot as the unit of matching (added 11 November 2026)

Section 1 made the lot the unit of stock. It is now also the unit of matching: one job, one lot, with tone groups, thickness readings, treatment and spare recorded, and checks before an order is confirmed or loaded. No block is ever a stock item. See docs/MATCHING.md sections 6, 8 and 9. The "Reorder" message of section 9 now offers the spare from the customer's own lot.

Logistics, drivers and papers, replanned (12 November 2026)

Section 2 stands for tracking levels, the shipment record and proof of delivery. docs/LOGISTICS.md adds: the five routes, including collection by the customer; what is held about a driver and vehicle in each case; loading witnessed at the factory; the papers by route; delivery terms; claims clocks. Where section 2 says the customer never sees the carrier or driver, the defaults are now in LOGISTICS.md section 4: the vehicle and plate on the day, nothing personal unless switched on.

Controls added after the red-team review (12 November 2026)

docs/CRITIQUE.md section 6 lists 23 controls. Those that change this document:

Salespeople's own WhatsApp (added 12 November 2026)

The critique found that a salesperson's number is where deals really happen, and the plan had deferred it. Researched on 12 November 2026.

Meta offers "coexistence": a number stays on the ordinary WhatsApp Business app on the salesperson's phone and is connected to the official platform, so our system receives what is sent and received. Read on Meta's developer pages:

Fact Detail
What reaches us Messages the salesperson sends from the app, and messages received, as they happen. Up to six months of one-to-one history at connection
What does not Group chats, calls, status. Disappearing and view-once messages are switched off for that number
How it is set up Only through a WhatsApp solution provider's sign-up flow. Not something we can do alone
The app must be opened If the phone is unused for about 14 days the connection drops
Devices The phone and up to four linked devices. The Windows app is not supported
Cost Messages typed in the app stay free. Messages our system sends are charged at the platform's rates
Numbers An account starts with two numbers; up to twenty after Meta verifies the business
Personal WhatsApp A number cannot be on the ordinary app and the Business app at once. It must be moved to the Business app first
Contacts The phone's contacts are shared too, so a mixed personal and work phone would share personal contacts

The plan.

  1. Each salesperson has a company-owned number on the Business app, connected by coexistence. Not their personal number.
  2. Customers may keep writing to that person. Everything lands in the one inbox, under the customer.
  3. Templates, automatic messages and anything sent after 24 hours of silence go from the system; the day's conversation is typed in the app as now.
  4. Rules for staff: open the app at least weekly; no Windows app; no change of phone or number without the administrator; groups and calls are outside the record.
  5. A line on the profile and in the first message: conversations with us are kept in our systems.
  6. When a salesperson leaves, the number and its history stay with the company.

To confirm with a solution provider: that Omani numbers are accepted; how long a number must have been in use; several such numbers under one account and the cost of each; whether the verified badge and display name apply; whether messages the system sends show in the app. Unofficial gateways and automating a personal account stay out of the plan.

Where coexistence is not possible, the fallback is the earlier one: "log to Diamond Stone" from the phone's share sheet, with voice notes written out.

Suppliers, replanned (12 November 2026)

Price requests to suppliers by WhatsApp and email, the reading of their answers, standing prices, and supplier registration are planned in docs/SUPPLIERS.md. It confirms there is no supplier portal: suppliers answer in the channels they use now. Section 3's inbox carries the threads; section 9's automatic messages gain the request, the confirmation, the reminder and the closing message, each approved by a person.