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 due to:
- Incorrect settings within your Tradebox
- A rounding discrepancy
- A value applied to the order that is included in the total but is not passed by Magento's API within 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. For reasons outside our control, the Magento site shows this value but it's not present anywhere in the order information provided by Magento's API.
For each order, Tradebox will calculate the total of all the available elements and check if there's a difference to the order total provided by Magento.
Where the order total is greater than the sum of the elements passed by the API, Tradebox will assign the difference to and adjustment line - using the dummy 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 total of items that matches the real order total, with no amount unaccounted for.
If you see the adjustment on every order
If you see the adjustment on every order through a given channel then it's likely that you've got an incorrect setting within that channel. For example, where users have net prices on Magento but haven't checked the relevant setting, we see:
The price of this item is £600+vat and this Magento site holds net prices. Because the user hasn't chosen the relevant setting, Tradebox is expecting a gross price of £600, comparing this to the order total of £720 and coming up short.
To resolve this, in Channels > Edit > tick the Product Prices are Net option. This will correct the problem for future orders (or any that are deleted from the order list and re-downloaded).
Items not passed or rounding discrepancies
This example isn't an incorrect VAT setting, it's from our plugin that doesn't pass values by API. 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.
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 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 use 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.
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.
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, the Tradebox sku is 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.
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.
Once this is done, the order will move out of query and is valid for posting to Sage assuming the other conditions are met.