Raise a warning on duplicate party identifier

One of our customers asked us to add a warning when they create a party with the same identifier.
As the identifier may be used to determine the uniqueness of a party I’m wondering if it make sense to have this feature as part of party module.

So the idea is that when creating or updating an identifier the system wil check if another party with the same value already exists. In this case the user will be notified and he may decide to use the Replace Parties wizard to merge both parties if aplicable.

Toughts?

2 Likes

It’s a very good idea and necessary.
In the actuality exists the option in Party to replace by other Party, this Merge would use the same function?

Yes, I mean to use the Party replace wizard. Sorry for the confusion

Very good, thank you by the explanation.
Now the question is the Party replace wizard, could have an additional characteristic is that it determine from that moment the new party goes to replace the previous. The main reason is that it exists information that already is posted of closed years with reports generated and the Party replace wizard would change all this historical information.

For me, the workflow is not clean. What happens if I create an empty party than add an identifier that is already in use? Also what happens when parties are created by non-user like the party of a web_user?
I think we already had this discussion during the development of the party replace wizard and not good solution were found.

Then the waring should be also raised because there is a party that can be probably merged thanks to the new information added to the system.

I think this is a recurring issue with warnings. Normally all warning will cause an issue for non interactive inputs. So I’m wondering if it makes sense to add some flag to skip warnings for non interactive usages (similar to debian non interactive frontend to apt).

Along with duplication check, one frecuent requirement was to force an identifier for a party. We had to create a custom module for this, it also manage identifier by country making the id and country the key of the identifier.

So you prevent use to enter data that would help to merge the parties later?

root user skips all the warnings.

But the point is that such warning does not actually help as there are many scenario where duplicate parties can be created. And frankly it is not a problem as we have tools to merge parties.
Also I think it will be more an annoyance because there are legit cases where you may want to have duplicate parties like external vs internal created, aliases for marketing etc.

That sounds completely custom and not generic at all.

For me the problem is that is hard to find duplicates when there are so much parties on the system. The idea of the warning is that it notices the user about such duplicate so the merge wizard can be used.

Another option is to have a wizard or a tree view to show all the duplicated records that exist on the system (based on a customizable criteria) but I’m not sure how this can be implemented.

I think both features may be desirable. It’s quite annoying to create a duplicate party when the system could have warned the user when she was creating the duplicate. And even more if the company has no e-commerce or external system creating records. So we should try to prevent it whenever possible.

The warning is the way to do it using Tryton-native mechanisms but we could also think of creating something more elaborated. For example, when you create a new contact in android, you get a prompt asking if you want to updated an existing similar contact. Or in a different scenario, in discuss, the system also suggests topics that may be related to the one you’re about to create.

The wizard to detect duplicates makes sense when that situation could not be prevented. I don’t think it should be difficult to implement.

And google contacts app notice you when it thinks that has find out a duplicated contact and propose you to combine it (merge it).

It is clear that notification will be better than warning for the workflow and the user experience.
It is possible to have a wizard (a little bit similar to the reconciliation one) that make proposal to replace parties.