Integration points for tax computation in Sterling Order Management System Software
Sterling™ Order Management System Software already uses some user exits to facilitate tax computation. Sterling Order Management System Software expects both user exits to return both tax amount and tax percentage used for calculation.
YFSRecalculateHeaderTaxUE- This user exit is used to recalculate the tax for an order at the header level. This user exit is called at Change Price order modification, when the shipping address changes, when invoicing, and during calculation of release costs.ThechangeOrderAPI calls theYFSRecalculateHeaderTaxUEuser exit when one of the following conditions is met:- If the
HeaderTaxelement is not passed and pricing is affected. - If the
TAX_EXEMPT_FLAGflag value changes on the order header and theHeaderTaxelement is not passed. - The
YFSOrderRepricingUEuser exit is invoked and returnsHeaderCharges, but notHeaderTaxes. - The ship to address changes.
YFSRecalculateHeaderTaxUEuser exit and implement therecalculateHeaderTaxmethod to compute tax. For more information aboutcom.yantra.yfs.japi.ue.YFSRecalculateHeaderTaxUEinterface, see the Javadoc.- If the
YFSRecalculateLineTaxUE- This user exit is used to recalculate tax for an order at the line level. This user exit is called on Change Price order modification when the shipping address changes, when invoicing, and during calculation of release costs. It is also invoked when the settled quantity of an order line changes in the order to computeSettledAmount. These taxes are not stored separately, and are only rolled up intoSettledAmount.ThechangeOrderAPI calls theYFSRecalculateLineTaxUEuser exit when one of the following conditions is met:- If the
LineTaxelement is not passed or it has not changed since last called to API. - If the
TAX_EXEMPT_FLAGflag value changes on the order header and theLineTaxelement is not passed. - The
YFSOrderRepricingUEuser exit is invoked and does not returnLineTaxes. - The ship to address changes.
- If the
- Implementations have to enable the
YFSRecalculateLineTaxUEuser exit and implement therecalculateLineTaxmethod to compute tax. For more information aboutcom.yantra.yfs.japi.ue.YFSRecalculateLineTaxUEinterface, see the Javadoc.If
YFSRecalculateLineTaxUEis not implementing,ChargeCategory,Tax, andTaxPercentageare required for the default repricing logic.
A user exit implementation makes a call to the tax provider system with the product details of the items in the cart or order along with the shipping method (freight charge) details. The tax provider system calculates the tax based on the shipping method and the ship from address. Usually, the order capturing application defaults these values. When a shopper chooses a different shipping method and/or modifies the Ship From address, Sterling Order Management System Software recalculates the tax accordingly.
It is not quite often that the tax on a particular item changes between the time that the shopper placed the order and the time that the order is shipped. If there is a change in the taxation rate either through a state or provincial tax rate change, or tax holiday, it is often charged as the tax rate on the day of shipping. There are other possible scenarios such as changes in quantity of goods or the ship to address. Each implementation can decide whether to consider tax changes for all these scenarios or consider a few scenarios such as the changes in ship from address and tax rates. In case of tax rates, all the other attributes are assumed to be unchanged during the order fulfillment cycle.