docs: Port "Manipulating Contacts" extension page to 7.2#592
docs: Port "Manipulating Contacts" extension page to 7.2#592promptless-for-oss wants to merge 3 commits into
Conversation
| .. vale on | ||
|
|
||
| Many Plugins that extend Mautic manipulate Contacts in some way. This guide shows you how to read the currently tracked Contact and how to create and merge Contacts from your own code. | ||
|
|
| .. vale on | ||
|
|
||
| Reading and setting the tracked Contact | ||
| *************************************** |
There was a problem hiding this comment.
Replaced the legacy LeadModel::getCurrentLead()/setCurrentLead()/setSystemCurrentLead() calls with ContactTracker::getContact(), getTrackingId(), setTrackedContact(), and setSystemContact(), since those methods now live on ContactTracker in Mautic 7.x.
Source: https://github.com/mautic/mautic/blob/7.x/app/bundles/LeadBundle/Tracker/ContactTracker.php
|
|
||
| Creating and merging Contacts | ||
| ***************************** | ||
|
|
There was a problem hiding this comment.
UPGRADE-6.0.md documents that FieldModel::getUniqueIdentiferFields/getUniqueIdentifierFields were removed in favor of FieldsWithUniqueIdentifier::getFieldsWithUniqueIdentifier, so the create-and-merge sample uses FieldsWithUniqueIdentifier instead of the legacy LeadModel/FieldModel call.
Source: https://github.com/mautic/mautic/blob/7.x/UPGRADE-6.0.md
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions.
- Rewrite the leads terminology note in active voice - Remove the vale off/on wrapper around that note (format 'leads' as inline code to stay Vale-clean) - Wrap the 'Reading and setting the tracked Contact' heading in vale off/on per reviewer suggestion - Add 'The' before mautic_session_id in the cookie paragraph per reviewer suggestion
|
Thanks for the review, @adiati98 — all four comments have been addressed in this PR:
Vale passes on |
Address @adiati98's review comment on PR mautic#592: the legacy 'content requires a major update' placeholder note no longer applies now that the Manipulating Contacts page has full ported content. Removes the note and its wrapping vale off/on directives.
Open this suggestion in Promptless to view citations and reasoning process
Ports the legacy "Manipulating Contacts" developer guide into docs/plugin_extensions/manipulating_contacts.rst, converting Markdown to RST and modernizing the code for Mautic 7.x. Reading/setting the tracked Contact now uses ContactTracker, merging uses ContactMerger, and unique-identifier lookups use FieldsWithUniqueIdentifier (the old LeadModel methods were removed). Resolves docs issue #325 against the 7.2 base branch.
Trigger Events
blockedlabel is to set content, structure, and tone in one branch, then backport/cherry pick i...Tip: Enable auto-create PR in your Configuration to review suggestions directly in GitHub 🤖