- Issue created by @jdleonard
- πΊπΈUnited States jdleonard Austin, TX, USA
I'm asking the Member Platform team to dive into this during today's Slack meeting.
- πΊπΈUnited States jdleonard Austin, TX, USA
Taking phone as a simple(r) example, I went down a bit of a rabbit hole.
It's late so I'm going to need to come back to this later, but some quick-ish thoughts...
There are quite a few contrib projects that define their own phone field type. There are some contrib projects that provide validation and/or a formatter for the core telephone field type. I think we should leverage some of the existing functionality provided elsewhere in contrib by A) extending one or more field types, field formatters, and/or field widgets or otherwise ensuring we don't lose out and we don't reinvent the wheel; and/or B) using a field collection or entity (see below) to allow wholesale use of an existing project's field type. Further analysis needed.
https://www.drupal.org/project/telephone_advanced β
https://www.drupal.org/project/telephone_validation β
https://www.drupal.org/project/telephone_formatter β
https://www.drupal.org/project/telephone_plus β
https://www.drupal.org/project/telephone_type β
https://www.drupal.org/project/telephone_international_widget β
https://www.drupal.org/project/phone_international β
https://www.drupal.org/project/phonenumber βI'm increasingly wary of CRM using a field type that is essentially a bunch of fields related to a phone number, but that are quite a bit more than a phone number. More complex use cases could need to track data (that we aren't currently anticipating) about each phone number such that it would be beneficial for a phone number to be fieldable. We can't change the field schema later β¨ Field type modules cannot maintain their field schema (field type schema change C(R)UD is needed) Needs work . While there are obvious downsides, I think we should discuss using a field collection or defining an entity to capture the various data related to a phone number.
Additional things that might warrant tracking per phone number, whether as a field or a reference from some other entity to a Contact's phone number:
- Confirmation status (similar to confirming an email address)
- Opt-in/out
- Communication preferences
- Activity (e.g. calls or texts to/from)
I'm not suggesting that any of these should be tracked for 1.0 (or even necessarily in a future CRM release). Similarly, I think we should not track mobile carrier in 1.0.
I haven't gone down the rabbit hole for the other field types, but I plan to. I suspect I will come to similar conclusions.
- πΊπΈUnited States mradcliffe USA
Would it be helpful to split this issue to tackle each of email, address and telephone separately? That way we can reduce the size of the merge request for reviewers and testers. It could mean an eventual merge conflict for update hooks.
- πΊπΈUnited States freelock Seattle
So it seems like there are several different aspects to this question, from a CRM perspective:
## What is the contact info?
Different aspects here:
- Validating the phone number - does it fit validation rules for the country? Does it allow for PBX things like extensions, or voice rules to reach a person?
- Identifying the phone number -- home, work, mobile, etc
- Can it accept an SMS? Fax?
- How do we know which number the contact wants to use?
- Is there a place to add a note to help answer these questions?## What contact method does the person prefer?
There have been several attempts to provide preferred contact methods a user can select. There used to be Message Framework, Notifications, Courier. For D11, I see DANSE β and I see a dev " Notifier β " module leveraging a Symfony system.
Looks like at the moment DANSE is the clear active project in use that provides a framework for this aspect.
- πΊπΈUnited States jdleonard Austin, TX, USA
@mradcliffe, Yes I think it could make sense to split this issue, but perhaps it would be wise for us to first determine the overall desired approach as there are some analogous needs across the different fields.
@freelock Good considerations. I'm arriving at the conclusion that it might not be realistic for us to determine all the likely needs up front so it would be wise to make phone number related data extensible (i.e. a field collection or entity type rather than a custom field whose columns are immutable).
A quick look at DANSE suggests to me that it isn't set up to handle non-User entities as first-class recipients. However, Notifier β has documentation making clear that it does. I posted a message in the #danse Slack channel to confirm and will report back.
- πΊπΈUnited States jdleonard Austin, TX, USA
As requested by @bluegeek9 in today's Member Platform meeting π Member Platform (Zoom) Meeting on May 8, 2025 Active , I'm going to prototype a CRM Contact Address entity type (or Storage β Type) with an Address β field, its integration with CRM Contact via Inline Entity Form, and plotting contacts' addresses on a map to illustrate the value of using the contrib address field.
- πΊπΈUnited States freelock Seattle
Should also consider if/how SimpleNews might fit into this...
- πΊπΈUnited States jdleonard Austin, TX, USA
Yes, good idea.
jurgenhaas, DANSE maintainer and Member Platform supporter, replied:
that's correct, DANSE currently is built to users as recipients. Thinking about it, extending that to entities as recipient in general, shouldn't be hard. So, if DANSE otherwise is appealing, I'd be willing to make that enhancement.
We should probably move this discussion into a different issue.
- Merge request !26CRM Contact Detail Entity Type + Address bundle β (Open) created by Unnamed author
- First commit to issue fork.
- πΊπΈUnited States bluegeek9
bluegeek9 β changed the visibility of the branch 3522243-reuse-fields to hidden.
- πΊπΈUnited States jdleonard Austin, TX, USA
Please see comments in the MR