In one of our commercetools implementations, we need to integrate with Avalara for tax calculations and have some custom logic to calculate shipping cost - the shipping can be a fixed cost defined at the variant level or have to be fetched from UPS based on the variant attribute. To make a pure composable implementation instead of having the logic written in Apihub, we had different api extensions for shipping and tax calculations which are invoked when the cart has items and has shipping address and has an anonymousid/customerid populated.
This worked perfectly fine in local/stage environments but when we tried to validate this in Production -- we had this issue where the extensions werent called in any sequence (as the document mentions) so we had erratic behaviour and we saw the shipping gets calculated after tax and wiping out tax values -- etc, We ended up merging the two extensions into one but this means the extension should return within 2 secs which was a problem, so we had to request Commercetools to extend the timeout which helped resolve the issue - but this looks like some kinda restriction that we should try and overcome.
Did you have any similar issues and how did you solve the same? Share your ides/suggestions/thoughts/experiences.
Thanks,
-Naga