0

I would like to extract unique values from incoming emails to my app.

For example, if the email is:

Subject: Order 1234 confirmed

Body: Your order 1234 containing twelve cute kitties has been confirmed. Final price $100.

I would want to extract:

  • Order #: 1234
  • Price: $100
  • Status: confirmed.

On the other hand, if the email is:

Subject: Order 1234 delayed

Body: Your order 1234 containing twelve cute kitties has been delayed.

I would want to extract:

  • Order #: 1234
  • Status: delayed.

What is a good UX pattern to do this reliably? I can write regular expressions to do it, but I'd like to make an interface that does not require the user to know regular expressions. Something like this:

mockup

Are there easier-to-use patterns out there? I'm aware of Zapier Parse, but I don't have the experience to build something that sophisticated. I mainly just need to wrap regexes.

5
  • I assume you made a typo and you'd want to extract that the order had been delayed
    – Perchik
    Apr 15, 2014 at 21:18
  • Sorry, but I don't really get the use of your app. Does the app give "summaries" of incoming emails? Or does it allow user to filter email, like "show me all the email that have order-status delayed". Apr 16, 2014 at 9:07
  • The former: the goal is pretty much to build intelligent summaries of incoming emails. For example, one user story might be "Show me the total cost of all delayed shipments."
    – dshack
    Apr 16, 2014 at 12:47
  • Please help me understand. What kind of user would need to get that information from e-mails? If the number of e-mails necessitates the automation of summaries wouldn't the user have access to the originating system? I can't imagine any single person ordering so many items (s)he would require an app like this? Apr 16, 2014 at 18:12
  • Let's assume this system helps an accountant track expenses for a very privacy-oriented client. The client is happy to share their receipts, but doesn't want to give the accountant access to their amazon account.
    – dshack
    Apr 16, 2014 at 23:55

1 Answer 1

1

You didn't explain how the original emails are written.

If it is a human, writing in their mail client, you won't be able to parse the content. Regular expressions expect structured input that is not compatible with natural language. There are systems capable of reading and understanding natural language but they never give 100% accurate results.

If the message is computer-generated, I would keep the human-readable part and append a code intended to the receiving system. This can be an URL containing the parameters:

http://domain.com?ordernum=1234&price=100&status=confirmed

This URL can be made almost invisible to the user (small font, white color, etc.).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.