Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Duplicate Check #663

Closed
4 tasks done
fredericalpers opened this issue Oct 26, 2023 · 13 comments · Fixed by #708
Closed
4 tasks done

Improve Duplicate Check #663

fredericalpers opened this issue Oct 26, 2023 · 13 comments · Fixed by #708
Assignees
Labels
component: contact form Issue, Pull Request or Discussion related to contact forms component: interest form Issue, Pull Request or Discussion related to interest forms component: owner form Issue, Pull Request or Discussion related to owner forms feature New feature QA Issue or Pull request that is in review
Milestone

Comments

@fredericalpers
Copy link
Member

fredericalpers commented Oct 26, 2023

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:

  • "noOverrideByDuplicate" integration: Integrate the "noOverrideByDuplicate" principle into the duplicate check mechanism to ensure that existing data in onOffice enterprise is not overriden when a duplicate email is detected.
    https://apidoc.onoffice.de/actions/datensatz-anlegen/adressen/
  • Email notification for duplicates: Implement a notification system that sends an email alert to the real estate agent when a duplicate entry is detected during the duplicate check process. The email should include details about the duplicate entry and guidance on how to hande the situation. Change email text only?

TASKS

  • Modify the duplicate check mechanism to incorporate the "noOverrideByDuplicate" principle.
  • 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.
  • Establish a testin environment that simulates various scenarios, including different configurations, forms etc.
  • Conduct thorough testing of the updated duplicate check functionality and verify the correct integration of "noOverrideByDuplicate". Test email notifications to ensure timely and accurate alerts.
@fredericalpers fredericalpers added this to the v4.19 milestone Nov 8, 2023
@yeneastgate
Copy link
Contributor

yeneastgate commented Nov 15, 2023

  • 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
Copy link
Member Author

@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
Copy link
Contributor

@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 yeneastgate self-assigned this Nov 16, 2023
@yeneastgate
Copy link
Contributor

@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.

send.mail.mp4

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
Copy link
Member Author

@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
Copy link
Contributor

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

@fredericalpers
Copy link
Member Author

@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
Copy link
Contributor

@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
Copy link
Contributor

yeneastgate commented Dec 1, 2023

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
Copy link
Member Author

@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
Copy link
Contributor

@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
Copy link
Contributor

@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
Copy link
Member Author

@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 :)

@fredericalpers fredericalpers added QA Issue or Pull request that is in review and removed investigate labels Jan 8, 2024
@fredericalpers fredericalpers linked a pull request Jan 8, 2024 that will close this issue
@fredericalpers fredericalpers added component: contact form Issue, Pull Request or Discussion related to contact forms component: interest form Issue, Pull Request or Discussion related to interest forms component: owner form Issue, Pull Request or Discussion related to owner forms labels Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: contact form Issue, Pull Request or Discussion related to contact forms component: interest form Issue, Pull Request or Discussion related to interest forms component: owner form Issue, Pull Request or Discussion related to owner forms feature New feature QA Issue or Pull request that is in review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants