{"action":"created","issue":{"url":"https://api.github.com/repos/wombat/netsuite_integration/issues/2","labels_url":"https://api.github.com/repos/wombat/netsuite_integration/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/wombat/netsuite_integration/issues/2/comments","events_url":"https://api.github.com/repos/wombat/netsuite_integration/issues/2/events","html_url":"https://github.com/wombat/netsuite_integration/pull/2","id":36166857,"number":2,"title":"Customer Improvement: Search on Email instead of using ExternalId","user":{"login":"iloveitaly","id":150855,"avatar_url":"https://avatars.githubusercontent.com/u/150855?v=3","gravatar_id":"","url":"https://api.github.com/users/iloveitaly","html_url":"https://github.com/iloveitaly","followers_url":"https://api.github.com/users/iloveitaly/followers","following_url":"https://api.github.com/users/iloveitaly/following{/other_user}","gists_url":"https://api.github.com/users/iloveitaly/gists{/gist_id}","starred_url":"https://api.github.com/users/iloveitaly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iloveitaly/subscriptions","organizations_url":"https://api.github.com/users/iloveitaly/orgs","repos_url":"https://api.github.com/users/iloveitaly/repos","events_url":"https://api.github.com/users/iloveitaly/events{/privacy}","received_events_url":"https://api.github.com/users/iloveitaly/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-06-20T13:27:02Z","updated_at":"2015-05-07T16:57:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/wombat/netsuite_integration/pulls/2","html_url":"https://github.com/wombat/netsuite_integration/pull/2","diff_url":"https://github.com/wombat/netsuite_integration/pull/2.diff","patch_url":"https://github.com/wombat/netsuite_integration/pull/2.patch"},"body":"The endpoint [assigns the ExternalId](https://github.com/spree/netsuite_endpoint/blob/master/lib/netsuite_integration/services/customer.rb#L16) of the customer to the order email and [relies on that ExternalId](https://github.com/spree/netsuite_endpoint/blob/master/lib/netsuite_integration/services/customer.rb#L6) for retrieving the customer record in NS\r\n\r\nThis will cause issues for us because we use NS for phone sales. A rep might change the email on the customer based on a phone conversation causing ExternalID ≠ customer email. That customer might order via the web with their new email address and the endpoint won't find the correct customer record.\r\n\r\nI've changed the find_by_external_id to use a search on email instead of a external_id match. Any thoughts on this?"},"comment":{"url":"https://api.github.com/repos/wombat/netsuite_integration/issues/comments/99937847","html_url":"https://github.com/wombat/netsuite_integration/pull/2#issuecomment-99937847","issue_url":"https://api.github.com/repos/wombat/netsuite_integration/issues/2","id":99937847,"user":{"login":"phstc","id":105652,"avatar_url":"https://avatars.githubusercontent.com/u/105652?v=3","gravatar_id":"","url":"https://api.github.com/users/phstc","html_url":"https://github.com/phstc","followers_url":"https://api.github.com/users/phstc/followers","following_url":"https://api.github.com/users/phstc/following{/other_user}","gists_url":"https://api.github.com/users/phstc/gists{/gist_id}","starred_url":"https://api.github.com/users/phstc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phstc/subscriptions","organizations_url":"https://api.github.com/users/phstc/orgs","repos_url":"https://api.github.com/users/phstc/repos","events_url":"https://api.github.com/users/phstc/events{/privacy}","received_events_url":"https://api.github.com/users/phstc/received_events","type":"User","site_admin":false},"created_at":"2015-05-07T16:57:24Z","updated_at":"2015-05-07T16:57:24Z","body":"Hi @iloveitaly \r\n\r\nDo you still want to merge this?"}}