one of the steps of my flow is to create a contact. The users enter in the interface all the details and click next, my flow then tries to save the contact; however, if salesforce detects a duplicate user via the duplicate rules, then it only throws an error message. Is there any way to detect the duplicate error and also capture the duplicate matches(records)? I would like to display all the duplicate matches and provide a nicer error message to the end-user.
I know that in apex is possible to detect the duplicate errors and also capture the duplicate matches. So I think I could create an Apex Action and detect the duplicate error and return the duplicate matches, but I am looking for an out-of-box solution for flows or an easier solution.