hayat help
Help › Hayat ERP

AI settings, credits and limits

hayaterp.com/settings/ai ↗

Settings → AI for business admins (the AI service, monthly credits, every feature's switch and availability, usage by feature and by user, the messages AI can show), the super-admin AI pages (credits per subscriber, usage, churn risk and upsell signals), the server settings such as Ai:ApiKey, and the limits of the public help, Bazaar, hotel and school chats.

Open AI settings

Control panel → AI settings (hayaterp.com/settings/ai), or AI settings → on the ✦ AI card in Settings. The workspace sites (hospital, school, hotel…) have the same page. Everyone may look at it; only users with Company, branch and system settings (admin.settings) can change switches and see usage — others read Only an administrator can switch features on or off.

The page header has ✦ Setup assistant (see Setup assistant) and Refresh.

Card What it shows
AI service Connected with the two models (smart · fast), or Not set up: The AI key is a server setting (Ai:ApiKey), so it never reaches browsers. Statistics features work without it. Also Help assistant knows N help sections.
AI credits this month Used / limit as a bar (amber from 80%, red at 100%), credits left · renews on the 1st, and how credits are counted. From 80%, admins get Need more? Billing & plan.
Features Every AI feature your business has, grouped by area, with its switch.
Usage Admins only: what was used in any month.

Switch features on or off

Each row of Features has:

  • the switch (admins only; it takes effect at once on every screen and phone — a panel disappears, a button hides);
  • the name, a badge — AI, Statistics or Statistics + AI (see Statistics and AI write-ups) — and the module;
  • one line on what it does;
  • whether you can use it now: Available; Partly (Works without the AI write-up: … — the key or credits are missing, the figures still work); Not available with the reason (switched off for the company, needs a module, needs a permission, no AI key, credits used up); or Off.

Find a feature… searches the list, Not available only shows only what cannot run, and each area has All on / All off. Features of modules your subscription does not have are not listed. New companies start with everything on.

Area Features (as named on the page)
General Ask your business · Morning briefing · Assistant can prepare drafts · Voice entry · Smart search · Read documents · Explain this screen · Urdu ⇄ English · Help chatbot
Sales & CRM Churn risk · Cross-sell suggestions · Price suggestion · Follow-up messages · Lead score · Win probability · Call notes
Accounts Collections priority · Bank match · Bank statement reader · Cash-flow forecast · Account suggestion · Month-end review · Tax helper · Statement explained
Inventory & purchasing Smart reorder · Dead stock · Duplicate items · Item from photo · Stock count variances · Supplier score · Read delivery challan · Read receiving sheet · Read supplier bills
POS Cashier risk · Till staffing · Bought together · Recognise product photo · End-of-day summary
Marketing & loyalty Promotion results · Customer segments (RFM) · Best time to message · Campaign writer
Online store & Bazaar Product descriptions · Similar products · Review summary and fake-review flags · Cash-on-delivery risk · Bazaar smart search · Bazaar similar products · Bazaar shopping assistant · Bazaar category mapping
HR & payroll CV screening · Job descriptions · Attendance anomalies · Attrition risk · Payroll check · HR policy questions
BI reports Ask for a report · What changed and why · Forecast · Summary in scheduled e-mails
Hospital Prescription from notes · Lab report in plain words · Beds and no-show forecast · Unbilled services
School Fee default risk · Report card remarks · Timetable proposal · Parents' questions
Hotel Rate suggestions · Guest reviews · No-show risk · Booking website assistant
Travel Itinerary and quotation · Passport reader · Umrah and Hajj pricing
Import & export Document check · HS code finder
Shipping Delivery risk · Rider routes · Address cleaner · Courier delivery risk
Fuel station Leak and theft check · Sales and stock forecast · Meter anomalies
Charity & NGO Donor retention · Appeal writer · Duplicate beneficiaries · Impact report
Sustainability Utility bill reader · Emissions forecast · Report narrative
Quality, gate & helpdesk Ticket triage · Reply drafts · SLA risk · Defect from photo · Number plate reader
Platform Setup assistant

Where each one appears and who may use it: AI features by module.

Usage

Pick a Month. The totals are Requests, Credits used (of the limit), Tokens (in / out) and Estimated cost in US dollars (a list-price estimate for your information; you are not billed per request). Below:

  • By feature — requests (and how many of them called the AI model), Failed, credits and a share bar. No AI use this month. when empty.
  • By user — requests and credits per person.

Statistics features show requests but no credits. Requests from scheduled jobs and the public chats of your business (hotel booking website, school parents) have no user.

AI messages and what to do

Message Why What to do
AI is not set up on this server yet. Ask your administrator to add the AI key. No AI key on the server. The host adds Ai:ApiKey (below). Statistics keep working.
This AI feature is switched off for your company. An admin can switch it on in Settings → AI. The switch is off. An admin switches it on (admins see an Open Settings → AI link).
You do not have permission to use this AI feature. Your role lacks the feature's permission. Ask for the permission listed in AI features by module.
This month's AI credits are used up. They renew on the 1st; an admin can see usage in Settings → AI. The monthly limit is reached. Wait for the 1st, or ask the Hayat team for a higher limit through Billing & plan.
The AI service could not answer just now. Please try again in a minute. The AI service was busy, timed out, or could not read the file. Try again; for a document, try a sharper photo or the PDF.
Too many AI requests. Please wait a minute and try again. More than 30 AI requests a minute from your company. Wait a minute.
This AI draft has expired or is not yours… Drafts last 7 days and open only for the person who asked. Ask the assistant again.

Admins who see an AI panel that is switched off get a dashed one-line hint (Switched off for your company.) with a link here, instead of the panel.

End-of-day summary settings

The owner's WhatsApp / SMS / e-mail summary of the day's till sales is set on POS → POS insights → End-of-day summary for the owner (changing it needs admin.settings). See POS.

Super admin: AI credits, usage and signals

On admin.hayaterp.com the menu section AI has three pages, linked by tabs. They are for the Hayat team only.

✦ AI credits (/ai)

  • Pick a month; search Subscriber or plan; tick 80% used or more.
  • Each subscriber: plan, Used, Limit (marked default when not set), a use bar and %, Left.
  • Set limit → a number from 0 to 10,000,000 → Save; Default goes back to the standard 2,000. The new limit applies at once and is logged on the subscription as AI credits changed.
  • History opens the last 12 months as bars; a month at or over its limit is red.

✦ AI usage (/ai/usage)

  • Totals for the month: requests, credits and estimated cost, plus the public help chat (questions and cost).
  • Subscribers, highest credits first; open one to see its features (calls, credits, tokens, Cost (USD)). A by feature, all subscribers table sums them. Search Subscriber or feature.

✦ Churn risk & upsell (/ai/signals) — statistics only, no AI key needed.

  • Churn: each active subscriber's Score with Risk (high from 70, medium from 40), Why (the reasons), plan, status, users, Sign-ins (4 wk), Entries (4 wk / before) with the trend, Last sign-in and Paid until. Filter all / medium and high / high. What raises it: nobody signing in for 7, 14 or 30 days; entries down by a quarter or a half, or nothing entered for 2 weeks; suspended or past due, overdue invoices, a cancel request; a trial ending within 7 days with no plan; auto-renew off near the end; a single user.
  • Upsell (?tab=upsell): Score, Why, Suggest (the cheapest plan with a higher limit) and Asked for — modules their staff searched for with smart search but do not have — with a link to the subscription. What raises it: users, branches or companies at 80–100% of the plan; invoices at 80% of the monthly limit; searches for missing modules; AI credits at 80%; strong growth; a busy trial; add-on requests.

See also Super-admin panel.

Server settings

For whoever hosts the API (appsettings, user-secrets or environment variables such as Ai__ApiKey):

Setting Default What it is
Ai:ApiKey empty The AI key. A secret: keep it out of files you share. Without it every AI feature is unavailable and statistics still work.
Ai:BaseUrl https://api.anthropic.com The AI service address.
Ai:Model / Ai:FastModel claude-sonnet-5-5 / claude-haiku-5-5 The smart and fast models.
Ai:MaxTokens / Ai:MaxToolRounds 2048 / 6 Longest assistant answer; how many look-ups it may make per question.
Ai:DefaultMonthlyCredits 2000 Credits a month for a subscriber without its own limit.
Ai:SmartCreditWeight 5 How many times a smart-model token counts.
Ai:FastInputUsdPerMTok, FastOutputUsdPerMTok, SmartInputUsdPerMTok, SmartOutputUsdPerMTok 1 / 5 / 3 / 15 Prices per million tokens, only for the cost estimates.
Ai:HelpContentPath help-content next to the API The folder of these help pages (docs-site/content/*.md, copied at publish) that the help chatbot reads, re-read every 30 minutes.
Ai:HelpBaseUrl https://help.hayaterp.com Where the chatbot's links point.
Ai:PublicHelpDailyCap 500 Questions a day to the public help chat, all visitors together; 0 switches it off.
Ai:PublicHelpPerIpPerHour 20 Questions per visitor (IP address) per hour.
Bazaar:AiTenantId the Bazaar messaging business The business whose switches and credits run Bazaar smart search, similar products and the shopping assistant. Give it enough credits.
Bazaar:AiSearchDailyCap / Bazaar:AiChatDailyCap 2000 / 1000 AI search rewrites and AI chat replies a day on Hayat Bazaar.

The help site's ✦ Ask the help widget calls the API from help.hayaterp.com, so that address must be in the API's Cors:Origins; the widget's backend address is in assets/help-config.js (set enabled: false there to hide it).

Unused drafts are deleted after 7 days, usage rows after 400 days and credit rows after 24 months.

Public chats and their limits

Some AI runs for people who are not signed in. Each has its own limits so nobody can run up your credits:

Chat Who pays Limits When the limit is reached
✦ Ask the help on help.hayaterp.com Hayat (no subscriber) 10 a minute and 20 an hour per visitor; 500 questions a day in all The help assistant has answered all it can for today…
Hayat Bazaar search and 💬 Ask chat The Bazaar business (Bazaar:AiTenantId) 30 requests a minute per visitor; 2,000 AI search rewrites and 1,000 AI chat replies a day Search keeps working without AI; the chat answers with plain search results
Hotel booking website 💬 Ask us The hotel's own credits 20 messages a minute per visitor; 400 messages a day per hotel call or message the hotel
School parent portal ✦ Ask The school's own credits 300 questions a day per school and 25 per parent phone The server's message is shown
Shop and Bazaar similar products Statistics, no credits The store's normal limits The product's own related list shows

The hotel's 💬 Ask us and the parents' ✦ Ask tab are hidden when the feature is switched off here, when AI is not set up on the server, or when the month's credits are used up. A day's limit does not hide them; they show the message above.