@happyvertical/smrt-sales 0.57.21 → 0.57.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agents/crm.md +23 -0
- package/dist/agreements.js +1 -1
- package/dist/chunks/{__smrt-register__-Cg4G6dIN.js → __smrt-register__-bn1C2AUF.js} +2 -2
- package/dist/chunks/{__smrt-register__-Cg4G6dIN.js.map → __smrt-register__-bn1C2AUF.js.map} +1 -1
- package/dist/chunks/{crm-DaUkdNoG.js → crm-BRICSwf2.js} +192 -2
- package/dist/chunks/crm-BRICSwf2.js.map +1 -0
- package/dist/commissions.js +1 -1
- package/dist/crm/index.d.ts +3 -1
- package/dist/crm/index.d.ts.map +1 -1
- package/dist/crm/services/LeadConversionService.d.ts +49 -0
- package/dist/crm/services/LeadConversionService.d.ts.map +1 -0
- package/dist/crm/services/LeadWorkflowService.d.ts +11 -0
- package/dist/crm/services/LeadWorkflowService.d.ts.map +1 -1
- package/dist/crm.js +3 -3
- package/dist/index.js +3 -3
- package/dist/manifest.json +1 -1
- package/dist/referrals.js +1 -1
- package/dist/smrt-knowledge.json +5 -5
- package/package.json +6 -6
- package/dist/chunks/crm-DaUkdNoG.js.map +0 -1
package/agents/crm.md
CHANGED
|
@@ -60,3 +60,26 @@ required and nonnegative.
|
|
|
60
60
|
status, `unassigned`, and `overdue`; counts retain owner/search scope but ignore
|
|
61
61
|
the selected status/unassigned/overdue tab. Overdue means the earliest open task
|
|
62
62
|
is due strictly before injected `now` (default current time).
|
|
63
|
+
|
|
64
|
+
`LeadConversionService.create({ db: tx, transaction: 'caller' })` records pending
|
|
65
|
+
conversions before an Opportunity is won, using immutable `lead_conversion`
|
|
66
|
+
SalesActivity receipts (no new table). Hosts authorize inputs and serialize the
|
|
67
|
+
lead conversion scope, create downstream records, and record the receipt within
|
|
68
|
+
one caller-owned transaction. `getForLead({ tenantId, leadId, targetKind })` and
|
|
69
|
+
`recordForLead({ ...scope, targetId, actorProfileId, metadata? })` require matching
|
|
70
|
+
ambient tenancy and a same-tenant Lead. A tenant/lead/targetKind has one target;
|
|
71
|
+
exact target/metadata replay returns the original receipt and actor, conflicting
|
|
72
|
+
intent is refused. The service never changes Lead/Opportunity state, invites
|
|
73
|
+
users, or starts a transaction. Only use returned plain receipts after commit.
|
|
74
|
+
|
|
75
|
+
`findForTarget({ tenantId, targetKind, targetId })` reads canonical originating
|
|
76
|
+
Lead receipts for a downstream target in the active tenant, without requiring
|
|
77
|
+
hosts to parse SalesActivity metadata.
|
|
78
|
+
|
|
79
|
+
`LeadWorkflowService.updateLeadContact({ leadId, actorProfileId, name,
|
|
80
|
+
contactName, email, now? })` locks a same-tenant, non-merged Lead and corrects
|
|
81
|
+
editable contact fields in its own transaction. Name is required, email is
|
|
82
|
+
normalized/validated, and at least email or existing phone is required. Exact
|
|
83
|
+
retries are no-ops. Effective changes append one `contact_update` activity with
|
|
84
|
+
before/after values and actor; audit failure rolls back the correction. Profile
|
|
85
|
+
identity, acquisition context/source, CRM status and downstream records stay intact.
|
package/dist/agreements.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./chunks/__smrt-register__-
|
|
1
|
+
import "./chunks/__smrt-register__-bn1C2AUF.js";
|
|
2
2
|
import { a as AgreementExecutionEvent, c as AgreementCollection, d as serializeAgreementParty, f as AGREEMENT_EXECUTION_STATUSES, g as sanitizeSignerIntent, h as sanitizeSignerEvidence, i as AgreementExecutionEventCollection, l as Agreement, m as coerceAgreementDate, n as ExecutedAgreementCollection, o as AgreementExecutionCollection, p as AGREEMENT_STATUSES, r as ExecutedAgreement, s as AgreementExecution, t as AgreementExecutionService, u as parseAgreementParty } from "./chunks/agreements-jBiVmttD.js";
|
|
3
3
|
export { AGREEMENT_EXECUTION_STATUSES, AGREEMENT_STATUSES, Agreement, AgreementCollection, AgreementExecution, AgreementExecutionCollection, AgreementExecutionEvent, AgreementExecutionEventCollection, AgreementExecutionService, ExecutedAgreement, ExecutedAgreementCollection, coerceAgreementDate, parseAgreementParty, sanitizeSignerEvidence, sanitizeSignerIntent, serializeAgreementParty };
|