fix(leads): give a new form lead the same owner as its first call

When a form has no round-robin assignees, the lead now follows the person the automation assigns to the first call.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-29 19:30:13 +03:30
co-authored by Cursor
parent b9bb2ff9fa
commit 99d686fefb
5 changed files with 78 additions and 1 deletions
@@ -391,6 +391,7 @@ export class LeadFormsService {
sourceId: form.id,
sourceType: 'lead_form',
leadId,
syncLeadAssignee: !ownerId && leadCreated && !!leadId,
mobile: mapped.mobile ?? mapped.phone ?? null,
formName: form.name,
formValues: values,