Follow

Magento - TBMagentoAdjust - Adjusting orders with values not passed by Magento API

On every order, Tradebox receives the order total from Magento as well as footer details such as carriage, and item line details about the product sold. Normally the total of item lines and footer will tally up with the order total passed by Magento. However, there may be instances where this doesn't happen - either due to a rounding discrepancy, or a value applied to the order that is included in the total but does not form part of the item lines or the footer. In this article we're using a real example of a Magento plugin that adds the PayPal fee on to the order so the customer picks up the cost rather than the vendor.

 

TBMagentoAdjust_unactioned.PNG

You can see that the item line total is £2,100 and the carriage value is £50. So the elements of the order that are passed by Magento's API add up to £2,150. Yet the order total was passed as £2,181.50, which is the value the customer actually paid. This is where Tradebox's Magento Adjustment kicks in. 

Where the order total is greater than the sum of the elements passed by the API, Tradebox will assign the difference to the SKU TBMAGENTOADJUST.

Where the order total is less than the sum of the elements passed by the API, Tradebox will assign the difference as a discount line.

In either case, this results in an order total that matches the real order total, with no amount unaccounted for.

In our example:

Working backwards, Tradebox arrives at the adjustment value of £31.50. Note that this is not a value passed down from the marketplace, so while it's unlikely, it is possible that it represents the sum of multiple unsurfaced elements.

In this example we have a positive difference, so Tradebox will assign it to the dummy SKU TBMAGENTOADJUST. If you run no stock control this won't need any action, it'll simply appear as an extra line on the order and the associated invoice. If you run stock in Tradebox or in Sage, this will place the order into Query status, as there's an unassigned product.

To action this query, open the order, highlight the TBMagentoAdjust line and choose Assign SKU. You'll then need to choose a Tradebox product to assign this to. We recommend creating a new product record to handle adjustments. If you have different types of adjustment on your orders, you may wish to create multiple products.

TBMagentoAdjust_ac_1.PNG

Once Tradebox can map all the lines on the order including the adjustment line, the order will come out of query automatically (once the data service reaches query-checking point in its loop).

Any future orders with an adjustment will need to be actioned in this way each time, though you can use the existing adjustment product once it's been created.

TBMagentoAdjust_ac_2.PNG

 

Mapping a Sage product

If you run Tradebox with Sage as the stock method, the order will drop back into query, as the Tradebox adjustment product is not mapped to a Sage product. In mapping terms, it's a product like any other, so will need to be mapped in the same way. We suggest creating a non-stock product in Sage based on the type of adjustment.

TBMagentoAdjust_Sage_product.PNG

 

Once this is done, map the product in Tradebox by going to Products > Mapping > Choose the sales channel and then map the Tradebox adjustment product to the accounts product.

TBMagentoAdjust_ac_3.PNG

Once this is done, the order will move out of query and is valid for posting to Sage assuming the other conditions are met.

TBMagentoAdjust_Sage_invoice.PNG

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk