Skip to content

CAP-CRM-DQ-006Reuse a contact during portal registration

Markdown

CAP-CRM-DQ-006

Reuse a contact during portal registration

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationPartially observed

KindCapabilityProduct areaCRMModuleDuplicate Review and Record MergingRevision1

Read atservices-crm a8d1364freact-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Registration can offer an existing contact to a returning member.Declined suggestions remain available for later staff review.
Surfaces
portaljob
Constraints
The pinned development environment provides no customer-facing portal registration flow.

Controls

16 controls apply, from the corpus control catalogue.

TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-IAM-001 TC-IAM-002 TC-IAM-004 TC-IAM-005 TC-IAM-006 TC-LOG-005 TC-PI-001 TC-PI-005 TC-PRV-001 TC-PRV-002 TC-TEN-001 TC-TEN-002 TC-TEN-003

Business Rules

11 rules, 10 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
Portal candidate selection returns no more than three contacts scoring at least 50, ordered by shared e-mail first, then score and contact number.
no proof recorded yet
calculationdatabasetest
services-crm:modules/duplicates/tests/integration/db/portal-sign-up-contacts.integration.spec.js#answers the three best contacts above the floor, the e-mail match first and a tie in contact-number order, with what Platform masks
02must prove
Proposed
Candidates exclude contacts linked to a workspace portal user, deleted contacts and contacts belonging to another workspace.
no proof recorded yet
policydatabasetest
services-crm:modules/duplicates/tests/integration/db/portal-sign-up-contacts.integration.spec.js#never offers a contact a portal user of the tenant already links
03must prove
Proposed
Only shared e-mail or phone information can reach portal candidate selection; a registration sharing neither returns no suggestions.
no proof recorded yet
calculationdatabasetest
services-crm:modules/duplicates/tests/integration/db/portal-sign-up-contacts.integration.spec.js#offers nothing for a sign-up that shares no e-mail address and no number with any contact
04must prove
Proposed
Portal candidates use the same contact scores and evidence as the staff-side scorer.
no proof recorded yet
invariantdatabasetest
services-crm:modules/duplicates/tests/integration/db/portal-sign-up-contacts.integration.spec.js#scores every contact of the neighbourhood with the score and the reasons the TypeScript scorer gives it
05must prove
Proposed
When suggestions are declined, contact creation applies ordinary conventions, makes the registration e-mail primary and its phone the preferred mobile, and attributes the write to portal registration.
no proof recorded yet
lifecycledatabasetest
services-crm:modules/duplicates/tests/integration/db/portal-sign-up-contacts.integration.spec.js#writes the contact with a UUIDv7 id, the next number, the names trimmed and computed and the stamps of portal-sign-up
06must prove
Proposed
Creation stores an open portal-sign-up pair with the best declined contact, retaining at least low confidence and an explanation of the rejection.
no proof recorded yet
lifecycledatabasetest
services-crm:modules/duplicates/tests/integration/db/portal-sign-up-contacts.integration.spec.js#records the declined pair, open, with origin portal_sign_up and the score and reasons the scorer gives it
07must prove
Proposed
Detection may refresh and group portal-sign-up pairs but preserves their origin and does not retire them.
no proof recorded yet
lifecycleservicetest
services-crm:modules/duplicates/tests/integration/db/portal-sign-up-contacts.integration.spec.js#keeps the declined pair through detection pass over the new contact, which groups it
08must prove
Proposed
A repeated registration within one minute returns its existing contact without another write.
no proof recorded yet
invariantdatabasetest
services-crm:modules/duplicates/tests/integration/db/portal-sign-up-contacts.integration.spec.js#answers the same contact for the same sign-up retried within a minute, and writes nothing more
09must prove
Proposed
Creation rejects an e-mail already reserved as an active contact's primary address and rejects registration without either first or last name.
no proof recorded yet
validationdatabasetest
services-crm:modules/duplicates/tests/integration/db/portal-sign-up-contacts.integration.spec.js#refuses an address that is already the primary address of a contact it did not just create
10must prove
Proposed
Only Platform registration may call the workspace candidate and create functions; the CRM application role is denied that access.
no proof recorded yet
permissiondatabasetest
11
Proposed
A declined contact that has been absorbed by a merge resolves to its survivor.
policydatabasedocumented
services-crm:docs/merging/duplicate-detection.md#15. Portal sign-up (the `portal_sign_up` origin)

Scenarios

IdGivenWhenThenProvenance
01A member provides a new e-mail address and a mobile already held by a contact.Platform requests registration suggestions.The existing contact appears among at most three candidates, with member-facing masking supplied by Platform.test
services-crm:modules/duplicates/tests/integration/db/portal-sign-up-contacts.integration.spec.js#ranks the neighbourhood as the scores say: 70 for the nickname with the address and the mobile, 50 for the name and the number, 38 for an initial
02A member rejects the offered contacts.Registration creates their contact.The new record and best rejected candidate form an open review pair.unknown

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.