Repository navigation
fix(sales): an unqualified lead imports with its Disqualification Reason (#2780) - #2781
Merged
Merged
Conversation
…son (#2780) The lead import mapping produced status Unqualified (from Disqualified / Closed - Not Converted) and Qualified with no column for the companion fields the lead's own rules require, so such rows were always refused. Add Disqualification Reason (with synonyms), Need Type and Estimated Amount columns; the shipped leads template now imports whole. Fixes #2780
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Collaborator
Author
|
Seat record · 独立评审 · head 结论:通过(有 nit)。类别:reviewer。 正文写的
评审实际做过的检查
Findings
与其他 PR:未发现与在途 PR 冲突。 |
…2780) - Not Interested files as Other: it is the prospect's answer, not a fit judgement. - The mapping comment names how a duplicate is really marked (Duplicate Of + Duplicate Status), not a nonexistent action. - The generic-guard test comment says it walks valueMap spellings only. - The unknown-reason test asserts the refusal's field and message. - zh docs: 被判为重复而取消资格的线索 / 被判為重複而取消資格的線索.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2780
What was wrong
crm_lead_importmapsLead Status=Disqualified/Closed - Not Converted(andUnqualified) tounqualified, but no column wrotedisqualification_reason, socrm_lead.disqualification_reason_requiredrefused every such row, and a saved mapping gave the user no way to repair the file.While pinning this I found the same shape for Qualified:
qualified_needs_qualificationneedsneed_type+estimated_amount, and the mapping had neither column. Measured through the real import on a fresh DB before the fix:assets/import-templates/leads.csvimported 42/50, and the 8Qualifiedrows were refused.Direction: (a), add the companion columns
The repo's facts argue for importing the reason, not for dropping the rows. The reason is a plain select with ordinary options (
not_a_fit,no_budget,wrong_persona,unreachable,competitor,other,duplicate). The rule exists so a dropped lead records why, and a migration from another CRM carries exactly that information. Dropping the synonyms would lose history the user has.Disqualification Reason(value map: Bad Fit / Poor Fit → not_a_fit, Not Interested → other (the prospect's answer, not a fit judgement), Budget → no_budget, Wrong Contact / Not a Decision Maker → wrong_persona, No Response / Unresponsive → unreachable, Lost to Competitor → competitor; option labels/codes still match case-insensitively),Need Type,Estimated Amount.other, and the row fails with the lead's own message.Duplicate(needs a surviving record, whichduplicate_disqualification_requires_survivorrequires and a file can't name) and statusConverted(converted_only_by_conversion).Tests:
test/import-values-accepted.test.ts, all throughPOST /data/<object>/importunqualifiedwith the reason. 12 reason spellings land on their option.disqualification_reason_required's message, nothing stored. An unknown reason, orDuplicate, → refused.COMPANIONStable names the values that need a second cell.Audit of the other mappings
No other mapping has this shape: every translated value of account, contact, invoice and payment is accepted. Unrelated note: the one-row
invoices.csv/payments.csvtemplates fail on an empty DB only withreference_not_found, because they reference example records. That is a column guide, not this defect, so it is left as is.The
_record:prefix in the wizard's error text is platform, already filed as objectstack-ai/objectstack#36980, and not touched here.Verification
pnpm verify: passed (333 files, 6420 tests).Disqualification Reason, and the preview shows the 未通过原因 column. I uploaded 2 rows:Disqualified+Budget, andClosed - Not Convertedwith a blank reason. Result: 新建 1 条, 已跳过 1 条. Row 2 was refused with "线索标记为不合格时必须填写取消资格原因". The stored row readsstatus=unqualified, disqualification_reason=no_budget.Metadata-impact: reviewer