Inspect every layer of the Admiyz sales automation engine. From sub-3-second inbound visitor qualification to verified CRM deal closure.
Injects tenant-isolated verified documents (`BusinessKnowledge` schema) into the system prompt context. Extracts intent, BHK, budget, and phone with strict Zod validation before advancing state.
{
"intent": "INVENTORY_INQUIRY_AND_VISIT",
"qualification": {
"visitorName": "Pooja Sharma",
"phone": "+919876543210",
"bhk": ["3 BHK"],
"budgetMax": 9000000,
"confidence": "high"
},
"ragCitations": ["Phase_2_Price_List.pdf#L42"]
}Watch natural visitor dialogue get parsed into typed, validated CRM properties in real time. Never misses a phone number, budget range, or high-intent buying signal.
We have 2 ready-to-move 3BHK units at Skyline Palms (Jagatpura) starting at ₹84 Lakhs with RERA approval (#RAJ/P/2023/182) and 80% bank loan sanction. Would you like to schedule an accompanied site visit this Saturday at 11 AM?
{
"intent": "INVENTORY_INQUIRY_AND_VISIT",
"leadContext": {
"visitorName": "Pooja Sharma",
"phone": "+919876543210",
"budgetMaxINR": 8500000,
"configuration": "3BHK",
"localityPreference": "Jagatpura",
"timeline": "30_DAYS"
},
"qualificationScore": 92,
"handoverTriggered": true,
"crmStage": "SITE_VISIT_SCHEDULED"
}Real estate buyers cannot be quoted inaccurate square footage or outdated payment schedules. Our three-stage grounding pipeline enforces absolute document adherence.
Verified Business Knowledge Ingestion
Property brochures, RERA registration sheets, floor specs, and pricing matrices are chunked and persisted directly in the MongoDB `BusinessKnowledge` schema.
Cryptographic Workspace Context Isolation
Every Gemini inference prompt is dynamically injected with only the verified documents matching `{ workspaceId, isActive: true }`. Cross-tenant data leakage is physically impossible.
Deterministic Safe Failure Mode
If a prospect inquires about unverified pricing, off-market inventory, or unreleased towers, the model never guesses. It gracefully pivots to collect phone/email for the relationship manager.
// 1. Mandatory workspace-scoped document retrieval
const verifiedKnowledge = await this.knowledgeModel.find({
workspaceId: new Types.ObjectId(workspaceId),
isActive: true,
category: { $in: ["pricing", "inventory", "rera_specs", "faq"] }
}).select("title content tags").lean();
// 2. Dynamic Gemini System Prompt Context Injection
const groundedPrompt = `
You are the senior sales executive for ${workspace.name}.
Answer visitor inquiries STRICTLY from the verified context records below.
If the exact answer or pricing is NOT in the records, DO NOT GUESS.
Gracefully request the visitor's WhatsApp number to have a relationship manager confirm.
--- VERIFIED BUSINESS KNOWLEDGE CONTEXT ---
${verifiedKnowledge.map(k => `[${k.title}]: ${k.content}`).join("\n")}
`;Eliminate lead leakage with zero-loss atomic deduplication, automated sales rep distribution, and instant Meta Cloud API WhatsApp notifications.
Every inbound lead is parsed through E.164 phone formatting and canonical email hashing. MongoDB evaluates the compound index `{ workspaceId: 1, phone: 1 }` atomically within a single database roundtrip.
MongoDB findOneAndUpdate() with $setOnInsert and $inc touchCounter
Fallback to email index if phone unavailable
// apps/api/src/modules/leads/leads.service.ts
const lead = await this.leadModel.findOneAndUpdate(
{
workspaceId: new Types.ObjectId(workspaceId),
phone: normalizeE164(dto.phone),
},
{
$setOnInsert: {
createdAt: new Date(),
status: LeadStatus.NEW,
qualificationScore: dto.qualificationScore,
source: dto.source || 'WIDGET',
},
$set: {
lastInteractionAt: new Date(),
leadContext: dto.leadContext,
},
$inc: { touchpointCount: 1 }
},
{ upsert: true, new: true, session }
);Admiyz adapts its deterministic entity extraction and CRM stage pipeline to your unique commercial ontology without requiring custom backend code.
High-Ticket Property Acquisition & Buyer Qualification
Automate high-intent discovery across residential apartments, luxury villas, and commercial spaces. Extracts carpet area, budget tiers, payment preference, and instantly schedules physical site visits.
Locks 3BHK inventory spec, creates deal in 'SITE_VISIT_SCHEDULED' stage, dispatches WhatsApp calendar invite to buyer and sales manager.
Every transaction, inference payload, and session is fortified with memory-hard cryptography, physical workspace tenant scoping, and ACID transactional guarantees.
Cryptographic context guarantees across every database collection.
Cross-tenant data exposure is structurally prevented at the middleware layer. Every inbound request passes through `WorkspaceAuthGuard`, resolving active workspace claims and automatically binding `{ workspaceId }` to every query.
Memory-hard password hashing and automatic refresh token reuse detection.
Admiyz implements Argon2id with strict parameters (memoryCost: 65,536 KB, timeCost: 3, parallelism: 4). Session tokens are SHA-256 hashed in database session families with immediate invalidation upon replay detection.
MongoDB Replica Set rs0 transactions paired with Redis AOF persistence.
All critical financial and sales pipeline mutations—such as deal creation, unit booking locks, and round-robin pointer increments—execute inside atomic sessions with `majority` write concern.
Fine-grained permissions across Owner, Admin, Sales Rep, and Viewer roles.
Ensure organizational team members operate only within their designated authority. Access levels govern knowledge base edits, deal stage progressions, API key generation, and webhook configurations.
// apps/api/src/common/guards/workspace-auth.guard.ts
@Injectable()
export class WorkspaceAuthGuard implements CanActivate {
canActivate(context: ExecutionContext): boolean {
const req = context.switchToHttp().getRequest();
const user = req.user;
const workspaceId = req.headers['x-workspace-id'] || user.defaultWorkspaceId;
const hasAccess = user.workspaces.some(
(w) => w.workspaceId.toString() === workspaceId.toString()
);
if (!hasAccess) throw new ForbiddenException('Tenant access denied');
req.workspaceId = new Types.ObjectId(workspaceId);
return true;
}
}Takes under 5 minutes to embed. No infrastructure management, no prompt engineering, and zero model hallucinations.