Implementing a link tracking and user click logging system.Implementing a link tracking and user click logging system.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -24,6 +24,7 @@ const TRIGGERS = [
|
||||
'invoice_issued',
|
||||
'invoice_paid',
|
||||
'activity_done',
|
||||
'sms_link_clicked',
|
||||
] as const;
|
||||
const ACTIONS = [
|
||||
'create_activity',
|
||||
|
||||
Reference in New Issue
Block a user