{"action":"created","issue":{"url":"https://api.github.com/repos/solidusio/solidus/issues/1252","repository_url":"https://api.github.com/repos/solidusio/solidus","labels_url":"https://api.github.com/repos/solidusio/solidus/issues/1252/labels{/name}","comments_url":"https://api.github.com/repos/solidusio/solidus/issues/1252/comments","events_url":"https://api.github.com/repos/solidusio/solidus/issues/1252/events","html_url":"https://github.com/solidusio/solidus/issues/1252","id":160460105,"number":1252,"title":"Provide a way to use third party tax services","user":{"login":"jordan-brough","id":23050,"avatar_url":"https://avatars.githubusercontent.com/u/23050?v=3","gravatar_id":"","url":"https://api.github.com/users/jordan-brough","html_url":"https://github.com/jordan-brough","followers_url":"https://api.github.com/users/jordan-brough/followers","following_url":"https://api.github.com/users/jordan-brough/following{/other_user}","gists_url":"https://api.github.com/users/jordan-brough/gists{/gist_id}","starred_url":"https://api.github.com/users/jordan-brough/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordan-brough/subscriptions","organizations_url":"https://api.github.com/users/jordan-brough/orgs","repos_url":"https://api.github.com/users/jordan-brough/repos","events_url":"https://api.github.com/users/jordan-brough/events{/privacy}","received_events_url":"https://api.github.com/users/jordan-brough/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-06-15T16:01:52Z","updated_at":"2016-06-15T19:25:48Z","closed_at":null,"body":"There is no good way to use third party tax services with Solidus.  All solutions and extensions that the core team has seen so far are very hacky.  This is because Solidus does not provide a good extension point for third party tax systems.  We want to fix that.\r\n\r\nOne of the primary problems is that Solidus calculates taxes on a line-by-line basis, and third party tax systems generally calculate taxes on an entire order at once.  This means that for a order with 5 line items, for example, Solidus will trigger tax calculation 5 times.  If you submit the entire order to your third party tax service 5 times then 1) it will be fragile, 2) it will be slow, 3) some services (including Avatax) charge for every API call, so it may be costly.\r\n\r\nOne approach that some have tried is to attempt to cache api calls to the third party provider.  However, this doesn't work in a scenario like this:\r\n1) Start updating an order, e.g. applying a promo\r\n2) Update line item 1, trigger tax calculation\r\n3) Update line item 2, trigger tax calculation -- the totals for the order have now changed, so you cannot use the previously cached results\r\n4) Update line item 3, ...\r\nand so on."},"comment":{"url":"https://api.github.com/repos/solidusio/solidus/issues/comments/226293454","html_url":"https://github.com/solidusio/solidus/issues/1252#issuecomment-226293454","issue_url":"https://api.github.com/repos/solidusio/solidus/issues/1252","id":226293454,"user":{"login":"jrochkind","id":149304,"avatar_url":"https://avatars.githubusercontent.com/u/149304?v=3","gravatar_id":"","url":"https://api.github.com/users/jrochkind","html_url":"https://github.com/jrochkind","followers_url":"https://api.github.com/users/jrochkind/followers","following_url":"https://api.github.com/users/jrochkind/following{/other_user}","gists_url":"https://api.github.com/users/jrochkind/gists{/gist_id}","starred_url":"https://api.github.com/users/jrochkind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrochkind/subscriptions","organizations_url":"https://api.github.com/users/jrochkind/orgs","repos_url":"https://api.github.com/users/jrochkind/repos","events_url":"https://api.github.com/users/jrochkind/events{/privacy}","received_events_url":"https://api.github.com/users/jrochkind/received_events","type":"User","site_admin":false},"created_at":"2016-06-15T19:25:48Z","updated_at":"2016-06-15T19:25:48Z","body":"Ah, yeah, I understand existing architecture constrains. \r\n\r\nI understood that in what was being [proposed by jordan-brough](https://github.com/solidusio/solidus/issues/1252#issuecomment-226237332), you'd miss out on tax calcs unless you used the `OrderUpdateAttributes` anyway already. If that's not an acceptable situation (I am not sure), then jordan's proposal doesn't work, right? If it is, then it becomes okay to plan on tax calculation points being customized via extension points in the `OrderUpdateAttributes`, not in a tax calculator. I think?"}}
{"actor":{"display_login":"jrochkind"}}