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

Use order numbers to guide deduplication #6

Closed
michielbdejong opened this issue Jun 14, 2021 · 1 comment
Closed

Use order numbers to guide deduplication #6

michielbdejong opened this issue Jun 14, 2021 · 1 comment

Comments

@michielbdejong
Copy link
Member

If you order an item from mobile and then order the same item from desktop, how many should be ordered? Should these be deduplicated or not?

In the latest strawman implementation (86fde5f) these are never deduplicated, if there are two separate 'add quantity' user interactions, then these will add up.

However, it may be more intuitive to say that within one invoice id, you never 'add' quantity of an item, but instead 'set' quantity of an item.

If you want to buy 2 cans of paint for the shed and another 2 cans of paint for the fence, then you should open two separate orders (invoices), and if you still edited the same invoice from two devices can then be interpreted then maybe we can assume that you're talking about the same two cans in both GUI interactions?

An even beter UX might be if you specify the purpose, so:
From mobile:

  • operation: 'set quantity needed'
  • product: 'cans of paint',
  • amount: 2
  • purpose (note to self): 'for shed'

From desktop:

  • operation: 'set quantity needed'
  • product: 'cans of paint',
  • amount: 2
  • purpose (note to self): 'for fence'

From desktop:

  • operation: 'set quantity needed'
  • product: 'cans of paint',
  • amount: 3
  • purpose (note to self): 'for shed'

End result: 5 cans of paint (3 for shed, 2 for fence)

@michielbdejong
Copy link
Member Author

A simpler version of this, for now, is to change the three 'add' operations to absolute value-setting operations, and last write (according to wall clock, with a random hash as a tie-breaker) wins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant