I noticed that when updating customer’s phone number in pop rest store through /pop/customer/updateInfo endpoint (which calls update#Customer service), a new number with ‘PhonePrimary’ set as purpose gets created, without expiring any previously existing primary number. I believe that is an issue because we would not want multiple primary numbers to exist against a party especially that this is an update service. So what I realized is that by passing replaceByPurpose as true down to mantle.party.ContactServices.store#PartyContactInfo, the previous number’s contact mech gets expired and so a single primary number is active at a time.
I have created a PR to review and discuss