With the fill details options I would expect that a email is added when no email with the location type exists.
When an email with that location type already exists I would expect that nothing changes. However the new email gets added and I end up with two emails of the same location type.
Steps to reproduce
Create an XCM Profile with no overriding details and at fill details select email, for location type select home
On this profile match on external identifier
Create a contact with external identifier 123aa and add a email test1@example.com with location type home
Now use the XCM profile to lookup/create a contact. I have used the form processor for this. Provide data as follows, external identifier 123aa and add the email test2@example.com (the email is different)
Expected result
Nothing will happen because an email with the location type home already exists.
Actual result
The email gets added and the contacts has two email with location type home
Remarks
It is possible to have multiple emails with the same location type. So in one sense this behavior is correct.
However in my specific use case this is exactly not what we want.
For the address field we already have such options. Fill if contact has no address, or fill if contact no address of that type.
With the fill details options I would expect that a email is added when no email with the location type exists.
When an email with that location type already exists I would expect that nothing changes. However the new email gets added and I end up with two emails of the same location type.
Steps to reproduce
123aa
and add a emailtest1@example.com
with location type home123aa
and add the emailtest2@example.com
(the email is different)Expected result
Nothing will happen because an email with the location type home already exists.
Actual result
The email gets added and the contacts has two email with location type home
Remarks
It is possible to have multiple emails with the same location type. So in one sense this behavior is correct.
However in my specific use case this is exactly not what we want.
For the address field we already have such options. Fill if contact has no address, or fill if contact no address of that type.