Sales confirmation script
To automatically send your sales confirmation to Usizy, you simply need to insert the sales script into your ecommerce “Thank you” page or any other page that confirms a purchase to your customers at the very end of the confirmation process.
Please review the Sales variables to prepare our script.
Essential variables
The following variables are required to share your sales information correctly:
event
It always has the same value: “CONFIRM”
order_id
Unique order identifier
product_ids
List of purchased product_ids (this is the same reference as “product_id” or any other unique IDs that were used in the product feed and as “data-product” in the Size Adviser API call).
If more than one product was purchased within a single order, the list should include each individual product purchased within the specific order considered, separated by commas (“,”).
variation_ids
List of purchased variation_ids (SKUs). If more than one product was purchased within a single order, you should include a comma-separated list of variations, for each product purchased within the specific order considered.
sizes
List of purchased product sizes. If more than one product was purchased within a single order, you should include a comma-separated list of sizes, for each product purchased within the specific order considered.
sizes_system
List of purchased product size systems. If more than one product was purchased within a single order, you should include a comma-separated list of size systems, for each product purchased within the specific order considered.
Recommended variables
currency
Currency used in the order.
prices_vat
List of purchased product prices with taxes. If more than one product was purchased within a single order, you should include a comma-separated list of prices with tax, for each product purchased within the specific order considered.
prices_no_vat
List of purchased product prices without taxes. If more than one product was purchased within a single order, you should include a comma-separated list of prices without taxes, for each product purchased within the specific order considered.
total_vat
Total basket amount with tax, excluding shipping costs.
total_no_vat
Total basket amount without tax, excluding shipping costs.
shipping_cost
Total order shipping cost.
Sales confirmation script example
A typical script can be viewed here:
Sales integration script example
<!--CONVERSION CONFIRMATION SCRIPT --> <!-- Add this code in the footer of your page code --> <script src="https://static.usizy.es/js/platform.min.js"></script> <script> uSizy.push({ 'event':'CONFIRM', 'order_id':'order_id', 'product_ids':['unique_product_id_1', 'unique_product_id_2', 'unique_product_id_3'], 'variation_ids':['product_variation_1', 'product_variation_2', 'product_variation_3'], 'sizes':['product_size_1', 'product_size_2', 'product_size_3',...], 'sizes_system':['product_size_system_1', 'product_size_system_2', 'product_size_system_3', ...], 'currency':'order_price_currency', 'total_no_vat':'order_total_price_no_vat', 'total_vat':'order_total_price_vat', 'prices_no_vat':['product_price_1', 'product_price_2', 'product_price_3', ...], 'prices_vat':['product_price_vat_1', 'product_price_vat_2', 'product_price_vat_3', ...], }) </script>