Implementing a link tracking and user click logging system.Implementing a link tracking and user click logging system.

This commit is contained in:
2026-10-01 15:59:18 +03:30
parent ae21d9bbc7
commit 5d5b3a3213
20 changed files with 978 additions and 8211 deletions
@@ -40,6 +40,10 @@ export type AutomationContext = {
dealId?: string | null;
ownerId?: string | null;
assigneeId?: string | null;
/** مثلاً id کمپین SMS برای فیلتر قانون */
sourceId?: string | null;
sourceType?: string | null;
clickCount?: number | null;
};
type AutomationFacts = {
@@ -151,6 +155,14 @@ export class AutomationsService {
for (const rule of rules) {
try {
const config = asConfig(rule.config);
if (
config.sourceId &&
ctx.sourceId &&
config.sourceId !== ctx.sourceId
) {
continue;
}
if (config.sourceId && !ctx.sourceId) continue;
const steps = normalizeAutomationSteps(
rule.action as AutomationAction,
config,
+1
View File
@@ -24,6 +24,7 @@ const TRIGGERS = [
'invoice_issued',
'invoice_paid',
'activity_done',
'sms_link_clicked',
] as const;
const ACTIONS = [
'create_activity',