onOffice-Web-Org / oo-wp-plugin

onOffice for WP-Websites
https://wp-plugin.onoffice.com
GNU General Public License v3.0
9 stars 9 forks source link

Improve Duplicate Check #663

Closed fredericalpers closed 6 months ago

fredericalpers commented 11 months ago

INITIATIVE

Improve the usability of the onOffice for WP-Websites Plugin for a better user experience.

EPIC

Change the Duplicate Check behavior.

USER STORY

As a real estate agent heavily reliant on maintaining accurate and complete adress records for customers and prospects, I am concerned about the existing duplicate check functionality in the onOffice for WP-Websites Plugin. The current behavior, wherein data is overridden inavertently in onOffice enterprise when a duplicate email is detected, poses a significant risk of losing or distorting vital customer information. To address this, I require an updated duplicate check mechanism that incorporates the "noOverrideByDuplicate" principle and notifies me via email upon detecting a duplicate entry. This enhancement is critical to preserving the integrity of address records and ensuring that no data is inavertently overriden.

The current duplicate check process in the onOffice for WP-Websites Plugin lacks the necessary safeguards to prevent inadvertent data overrides in onOffice enterprise. To rectify this issue and enhance the duplicate check functionality, I propose the following improvements:

TASKS

yeneastgate commented 10 months ago
  • Develop a notification system that sends an email alert to the real estate agent when a duplicate entry is detected. Include details about the duplicate entry in the email notification. Maybe the existing feature can be modified with a new email text including these details and guidance on how to handle the situation.

=> I will implement including "two more parts" to the content email:

  1. Data has been duplicated
  2. Guidance on how to handle the situation (Contact link and suggested information to update)

image

Note: The "Data has been duplicated" part of the content email will only show updated information in which the customer adds a new contact form and modified existing information at a certain time. Ex: Customer adds a new contact form at 14/11 => The "Data has been duplicated" part only shows the updated information on 14/11 Note: The updated information at other times (ex:13/11: see the above image) will not show here.

image

  • Establish a testin environment that simulates various scenarios, including different configurations, forms etc.

=> I will implement this feature in the "contact form", "interest form", and "owner form". Is that right?

@fredericalpers Please confirm for me these above points so I can give you the optimized solution. Thanks!

fredericalpers commented 10 months ago

@yeneastgate I like the solution for the duplicate parts in the email, however I'm not sure if we can use a deep link, such as the link to the contact, to onOffice enterprise, because not everyone who might receive this mail has an onOffice enterprise account.

The text should be adjuste a bit and the link should be going to the official enterprise documentation on how to handle duplicates in onOffice enterprise. Is it possible to check for the language set in enterprise? It would be better if a german speaking customer will receive the link as mentioned below for the german help entry and a spanish speaking customer to the spanish version of the help entry and so on.


Suggestion for the mail text:

Duplicate detected. This data record may be a duplicate of an existing data record. Check for possible duplicates and then decide whether the data record should be updated.

How to search and update duplicates in onOffice enterprise: https://de.enterprisehilfe.onoffice.com/help_entries/duplicates/?lang=en


I will implement this feature in the "contact form", "interest form", and "owner form". Is that right?

This duplicate check needs to be implemented in all forms with which a data record can be created in onOffice enterprise

yeneastgate commented 10 months ago

@yeneastgate I like the solution for the duplicate parts in the email, however I'm not sure if we can use a deep link, such as the link to the contact, to onOffice enterprise, because not everyone who might receive this mail has an onOffice enterprise account.

The text should be adjuste a bit and the link should be going to the official enterprise documentation on how to handle duplicates in onOffice enterprise. Is it possible to check for the language set in enterprise? It would be better if a german speaking customer will receive the link as mentioned below for the german help entry and a spanish speaking customer to the spanish version of the help entry and so on.

Suggestion for the mail text:

Duplicate detected. This data record may be a duplicate of an existing data record. Check for possible duplicates and then decide whether the data record should be updated.

How to search and update duplicates in onOffice enterprise: https://de.enterprisehilfe.onoffice.com/help_entries/duplicates/?lang=en

I will implement this feature in the "contact form", "interest form", and "owner form". Is that right?

This duplicate check needs to be implemented in all forms with which a data record can be created in onOffice enterprise

@fredericalpers i will check and let you know soon

yeneastgate commented 10 months ago

@fredericalpers

  1. I already have solutions for all other requirements of the task.

Only the related issue remains "It would be better if a german speaking customer will receive the link as mentioned below for the german help entry and a spanish speaking customer to the spanish version of the help entry and so on." Is it possible to check for the language set in enterprise? => It is impossible.

Because: The only information on the onOffice plugin related to the onOffice enterprise system is: "API secret" & "API token". But we don't have any API to get the user's information (which will contain the language set in the onOffice enterprise of the user) based on the "API secret & API token" installed on the plugin side. => I can only embed the default link like https://de.enterprisehilfe.onoffice.com/help_entries/duplicates/?lang=en

  1. However, I have found another solution as follows: We can detect the language of the browser for the links which the user clicks in the email content. But we need the "send email" API to support the 'Content-Type' header to 'text/html' to use the email's content in HTML format. My purpose: hidden handles URL redirection logic in the "href" attribute and only displays the text title for "https://de.enterprisehilfe.onoffice.com/help_entries/duplicates" HTML tag

image

We have implemented for "interest form" at the branch "https://github.com/onOffice-Web-Org/oo-wp-plugin/tree/42550-implement-link-guide-check-duplicate". You can test and review it.

https://github.com/onOffice-Web-Org/oo-wp-plugin/assets/104892108/d2f08e71-c15f-4332-8e0e-42aef2658b1a

Please, check with the IT department:

  1. The API sends email supports the 'Content-Type' header to 'text/html'?
  2. Do you agree with my solution?
fredericalpers commented 10 months ago

@yeneastgate I like your suggested solution, however we will have to implement your it in a second step. Since this requires me to send a ticket to the IT-Department which will lead to this issue being blocked until there's a decision and changes made.

Please go ahead and first only embed the default link. Thank you :)

yeneastgate commented 10 months ago

@fredericalpers I got it. Thanks! I will notify you of the estimated time as soon as possible.

fredericalpers commented 10 months ago

@yeneastgate can this https://apidoc.onoffice.de/actions/datensatz-lesen/user/ be used to read out the API-Users language? "The own user can be queried via resourceid.."

yeneastgate commented 10 months ago

@yeneastgate can this https://apidoc.onoffice.de/actions/datensatz-lesen/user/ be used to read out the API-Users language? "The own user can be queried via resourceid.."

I will check again. Thanks!

yeneastgate commented 10 months ago

can this https://apidoc.onoffice.de/actions/datensatz-lesen/user/ be used to read out the API-Users language?

=> Yes, we can read out the API-Users language image

However, the value passed in "resourceid" is ID of "API-User" cannot be obtained through "API secret" and "API token" in admin settings. Ex: resourceid has ID = 39 as image blow image

image

fredericalpers commented 10 months ago

@yeneastgate thank you for your feedback. :) As mentioned before please go ahead and first embed the default link to the german enterprise help. We will have to implement your suggested solution in a second step.

yeneastgate commented 10 months ago

@yeneastgate thank you for your feedback. :) As mentioned before please go ahead and first embed the default link to the german enterprise help. We will have to implement your suggested solution in a second step.

I got it. Thanks!

yeneastgate commented 9 months ago

@fredericalpers

Suggestion for the mail text:

=> I have implemented email content like you suggested. Please watch the demo video and let me know your opinions. Thanks! https://files.fm/f/7fw45p276h

thank you for your feedback. :) As mentioned before please go ahead and first embed the default link to the german enterprise help. We will have to implement your suggested solution in a second step.

=> As for detecting language for this link guide, you mentioned that we will do it in the second step. Do you want me to implement the second step now? Or wait until you get back to work?

fredericalpers commented 9 months ago

@yeneastgate thank you for implementing the duplicate check.

We want to roll out the duplicate check "fix" first before making the additional changes to detecting the language of the link. Thank you :)