You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem?
The model contains the field phone number. There is no clear distinction between a landline and a mobile phone number. For example for sending text messages or voice messages this is information we would like to know.
Describe the solution you'd like
An extra contact details type 'mobilePhone'.
Describe alternatives you've considered
Use the phone number, but then you can't provide both phone number and mobile phone number.
We are wondering how exactly you want to use this information? Note that it is currently possible to provide multiple contact-details and use the same type of contact detail with a remark. See this actor for example:
This is of course not ideal if you need to know exactly what kind of phone you are using since it might contain typos, and you might want to use the remark for something else as well. But that is really only a problem if you are expecting to act on this information automatically.
We could also consider adding a few sub-types of the contact-detail type, such as a phoneType and emailType. However this will likely result in another union type to avoid having an emailType on a phone contact detail.
Maybe if you provide us with some more information on your use case we can look at the alternatives?
We use the mobile number to send automated text messages based on the status of a consignment or events that are happening. We also have to ability to send text to voice messages to a landline. Because these messages are more expensive and not everybody wants to use this feature we need a clear distinction between the types of phone numbers.
Mapping based on magic strings (remark) is far from ideal since we cannot enforce a value based on the scheme. Whereas the type as enum has an enforcement.
Yes I agree, for such an advanced use case a magic string is not sufficient.
I think the best way forward would be to identify types per contact detail. So the phone contact detail has a phoneType that exists of an enum with landLine and mobile (and potentially more in the future).
That would work, I'm not really sure if that change can be backwards compatible with the current model, but if that's the case I'd like to see this in a future version!
If the new fields are optional the JSON will be backwards compatible, though the OpenAPI specification needs to change a bit to make it possible. Need to check to be sure though. I'll make this suggestion will be discussed again at the next meeting.
@gerardpeters, sorry to get back to you so late. We had another discussion and will go with your original approach (so add a new contact detail option). It will be included in OTM5.1 (next Tuesday)
Activity
bmeesters commentedon Mar 22, 2021
Thanks for your contribution @gerardpeters.
We are wondering how exactly you want to use this information? Note that it is currently possible to provide multiple contact-details and use the same type of contact detail with a remark. See this actor for example:
This is of course not ideal if you need to know exactly what kind of phone you are using since it might contain typos, and you might want to use the remark for something else as well. But that is really only a problem if you are expecting to act on this information automatically.
We could also consider adding a few sub-types of the contact-detail type, such as a
phoneTypeandemailType. However this will likely result in another union type to avoid having anemailTypeon aphonecontact detail.Maybe if you provide us with some more information on your use case we can look at the alternatives?
gerardpeters commentedon Mar 25, 2021
We use the mobile number to send automated text messages based on the status of a consignment or events that are happening. We also have to ability to send text to voice messages to a landline. Because these messages are more expensive and not everybody wants to use this feature we need a clear distinction between the types of phone numbers.
Mapping based on magic strings (remark) is far from ideal since we cannot enforce a value based on the scheme. Whereas the type as enum has an enforcement.
bmeesters commentedon Mar 25, 2021
Yes I agree, for such an advanced use case a magic string is not sufficient.
I think the best way forward would be to identify types per contact detail. So the
phonecontact detail has aphoneTypethat exists of an enum withlandLineandmobile(and potentially more in the future).Is this acceptable for you?
gerardpeters commentedon Mar 25, 2021
That would work, I'm not really sure if that change can be backwards compatible with the current model, but if that's the case I'd like to see this in a future version!
bmeesters commentedon Mar 26, 2021
If the new fields are optional the JSON will be backwards compatible, though the OpenAPI specification needs to change a bit to make it possible. Need to check to be sure though. I'll make this suggestion will be discussed again at the next meeting.
bmeesters commentedon May 27, 2021
@gerardpeters, sorry to get back to you so late. We had another discussion and will go with your original approach (so add a new contact detail option). It will be included in OTM5.1 (next Tuesday)
bmeesters commentedon Jun 1, 2021
Closing this as it is now official part of OTM5.1