Background
Breville | Sage Appliances have a number of guided product selection tools to help customer choose the right appliance for their needs. These tools have been made available for retail partners to easily integrate into their retail websites. This guide provides the technical details of how this can be achieved and what widgets and products are available / need to be mapped with to your (the retailers) prices and product landing pages. Demonstrations for each widget can be found at https://prod-widgets.breville.com
Solution
The breville-widget is a general Web Component that allows to host a Breville Widget inside an iFrame on your (3rd party/retailer) website. The code is necessary to control an iframe and create a communication bridge to pass critical information to the widget around pricing, styling and product pages. The widget also sends back information to resize the height of the iframe appropriately. Once the widget is placed on your site, the:
- breville-widget renders an iFrame with a link to a Breville / Sage Appliances Decision tool that is hosted on https://prod-widgets.breville.com
- breville-widget uses postMessage calls to configure the widget inside an iFrame and to pass widget configuration for locale/language, styling, product range, product page URL’s, and prices to the widget.
- A domain white-listing policy has been applied to minimize the risk of improper use of the decision tool and thus you (the retailer) must ask to be added to that whitelist
- The breville-widget has been designed with security in mind to reduce the attack surface and the possibility of a widget somehow breaking the retailers site. All the widget code run inside an iframe and the breville-widget is just the glue to ensure the iframe is correctly setup and resized on the retailer’s site and to ensure it does not block the rest of the page from loading.
Installation
There is a 3 step installation process
1. Contact Breville and ensure that your domain has been properly whitelisted so that the component is allowed to run on your site/domain. If you do not do this it will not work.
2. breville-widget JavaScript to the bottom of your page.
1 | <!--====== Breville Widget js ======--> |
2 | <script src="//widgets.breville.com/etc/designs/bvl-widgets/bridge-widget/js/app.js"></script> |
3. Add breville-widget-v1 snippet on the page and configure it. The breville-widget-v1 Web Component accepts the following parameters:
- type- The type of widget. - a list of widget types in provided within this document
- locale - The widget locale - a list of applicable locales is provided within this document
- topoffset - At times the widget will need to scroll up to relieve the top of the widget. If you have a sticky header, your header may overlap the widget. In such case, provide the number of pixels the header takes up so the top of the widget is below the bottom of your sticky header.
- JSON script element “<script type="application/json">“ that must have:
- env - URL where widget is hosted (this should always be set to prod-widgets.breville.com
- props with
- an optional styles property to style the widget
- a mpns property to send product mappings, prices, and availability information to the widget. This is a mandatory property to configure where each recommended product resides on your site, it’s price and availability. Each entry is defined by the Breville product parent SKU on the Breville website, but will eventually be the official manufacture product number (MPN). Please refer to specific widget examples for products and structure.
Migration from Legacy Widgets
For a migration from legacy widgets env property should be changed to
http://prod-widgets.breville.com (instead of http://widgets.breville.com ):
1 "env": "prod-widgets.breville.com ", Configuration examples
Configuration example for Espresso is shown below. This structure is also applicable for Tea, Waves, Smart Ovens, Air & Water decision tools, but requires different type and mpns.
1 <breville-widget-v1 type="espresso-widget" locale="us/en"> 2 <script type="application/json"> 3 { 4 "env": "prod-widgets.breville.com", 5 "props": { 6 "mpns": { 7 "BES500": { 8 "url": "https://www.your_site.com/your_BES500_product_page/", 9 "price": "$9111.11" 10 }, 11 "BES840": { 12 "url": "https://www.your_site.com/your_BES840_product_page/", 13 "default": 1, 14 "price": "$9222.22" 15 }, 16 "BES870": { 17 "url": "https://www.your_site.com/your_BES870_product_page/", 18 "default": 2, 19 "price": "$9333.33" 20 }, 21 "BES878": { 22 "url": "https://www.your_site.com/your_BES878_product_page/", 23 "price": "$9444.44" 24 }, 25 "BES880": { 26 "url": "https://www.your_site.com/your_BES880_product_page/", 27 "price": "$9555.55" 28 }, 29 "BES920": { 30 "url": "https://www.your_site.com/your_BES920_product_page/", 31 "price": "$9666.66" 32 }, 33 "BES980": { 34 "url": "https://www.your_site.com/your_BES980_product_page/", 35 "price": "$9777.77" 36 }, 37 "BES990": { 38 "url": "https://www.your_site.com/your_BES990_product_page/", 39 "price": "$9888.88" 40 } 41 } 42 } 43 } 44 </script> 45 </breville-widget-v1> Configuration example for the “Colour Me Healthy” (Blend, Juice or Bluice) shown below.
Note: the inclusion of product categories, must be maintained. If no products are ranged by the retailer then the category (bluicing, blender etc) should be left empty to avoid warning in the console log.
1 <breville-widget-v1 type="cmh-widget" locale="us/en"> 2 <script type="application/json"> 3 { 4 "env": "prod-widgets.breville.com", 5 "props": { 6 "mpns": { 7 "bluicing": { 8 "BJB815": { 9 "url": "https://www.breville.com/us/en/products/bluicers/bjb815.html", 10 "price": "$1111.01" 11 } 12 }, 13 "blenders": { 14 "BBL920": { 15 "url": "https://www.breville.com/us/en/products/blenders/bbl920.html", 16 "price": "$1111.02" 17 }, 18 "BBL820": { 19 "url": "https://www.breville.com/us/en/products/blenders/bbl820.html", 20 "price": "$2222.02" 21 }, 22 "BBL620": { 23 "url": "https://www.breville.com/us/en/products/blenders/bbl620.html", 24 "price": "$3333.02" 25 }, 26 "BPB610": { 27 "url": "https://www.breville.com/us/en/products/blenders/bpb610.html", 28 "price": "$4444.02" 29 }, 30 "BBL002": { 31 "url": "https://www.breville.com/us/en/products/blenders/bbl002.html", 32 "price": "$5555.02" 33 } 34 }, 35 "fast_juicers": { 36 "BJE820": { 37 "url": "https://www.breville.com/us/en/products/juicers/bje820.html", 38 "price": "$1111.03" 39 }, 40 "BJE830": { 41 "url": "https://www.breville.com/us/en/products/juicers/bje830.html", 42 "price": "$2222.03" 43 }, 44 "800JE": { 45 "url": "https://www.breville.com/us/en/products/juicers/800je.html", 46 "price": "$3333.03" 47 }, 48 "BJE530": { 49 "url": "https://www.breville.com/us/en/products/juicers/bje530.html", 50 "price": "$4444.03" 51 }, 52 "BJE430": { 53 "url": "https://www.breville.com/us/en/products/juicers/bje430.html", 54 "price": "$5555.03" 55 }, 56 "JE98XL": { 57 "url": "https://www.breville.com/us/en/products/juicers/je98xl.html", 58 "price": "$6666.03" 59 }, 60 "BJE200": { 61 "url": "https://www.breville.com/us/en/products/juicers/bje200.html", 62 "price": "$77777.03" 63 } 64 }, 65 "slow_juicers": { 66 "BJS700": { 67 "url": "https://www.breville.com/us/en/products/juicers/bjs700.html", 68 "price": "$1111.04" 69 } 70 }, 71 "citrus_presses": { 72 "800CP": { 73 "url": "https://www.breville.com/us/en/products/juicers/800cp.html", 74 "price": "$1111.05" 75 }, 76 "BCP600": { 77 "url": "https://www.breville.com/us/en/products/juicers/bcp600.html", 78 "price": "$2222.05" 79 } 80 } 81 } 82 } 83 } 84 </script> 85 </breville-widget-v1> Configuration example for the Your Perfect Brew tool shown below.
1 <breville-widget-v1 type="your-perfect-brew" locale="au/en"> 2 <script type="application/json"> 3 { 4 "env": "prod-widgets.breville.com", 5 "props": { 7 "link": { 8 "title": "View More", 9 "url": "https://breville.com/" 10 }, 11 "} 12 </script> 13 </breville-widget-v1>
How to override a product’s description
Example of a product’s description (the burlywood background part)
If a retailer wishes to provide their own description for a specific product, add description’s value to that product’s mpn, for example:
1 "mpns": { 2 "BES500": { 3 "url": "https://www.your_site.com/your_BES500_product_page/", 4 "price": "$9111.11", 5 "description": "<p>this is the new description <strong>yo check this out</strong><p>" 6 }, 7 ... You can use just simple text strings or rich text strings for description.
Decision tool type and locale parameters
The following widget types and locales are currently supported.
Espresso
type="espresso-widget"Tea
type="tea-widget"Waves
type="wave-widget"Smart Ovens
type="smart-ovens"Air
type="air-widget"Water
type="water-widget"Blend, Juice, Bluice
type="cmh-widget"Perfect Brew
type="brewer-widget"United States - English locale="us/en" locale="us/en" locale="us/en" locale="us/en" contact Breville / Sage Appliances contact Breville / Sage Appliances locale="us/en" locale="us/en" Canada - English locale="ca/en" locale="ca/en" locale="ca/en" locale="ca/en" contact Breville / Sage Appliances contact Breville / Sage Appliances locale="ca/en" locale="ca/en" Canada - French locale="ca/fr" locale="ca/fr" locale="ca/fr" locale="ca/fr" contact Breville / Sage Appliances contact Breville / Sage Appliances locale="ca/fr" locale="ca/fr" Australia - English locale="au/en" contact Breville / Sage Appliances locale="au/en" locale="au/en" locale="au/en" locale="au/en" locale="au/en" locale="au/en" New Zealand - English locale="nz/en" contact Breville / Sage Appliances locale="nz/en" locale="nz/en" locale="nz/en" locale="nz/en" locale="nz/en" locale="nz/en" United Kingdom - English locale="uk/en" locale="nz/en" locale="nz/en" locale="nz/en" contact Breville / Sage Appliances contact Breville / Sage Appliances locale="nz/en" locale="nz/en" Switzerland - German locale="ch/de" contact Breville / Sage Appliances contact Breville / Sage Appliances contact Breville / Sage Appliances contact Breville / Sage Appliances contact Breville / Sage Appliances locale="ch/de" locale="ch/de" Switzerland - French locale="ch/fr" contact Breville / Sage Appliances contact Breville / Sage Appliances contact Breville / Sage Appliances contact Breville / Sage Appliances contact Breville / Sage Appliances locale="ch/fr" locale="ch/fr" Switzerland - Italian locale="ch/it" contact Breville / Sage Appliances contact Breville / Sage Appliances contact Breville / Sage Appliances contact Breville / Sage Appliances contact Breville / Sage Appliances locale="ch/it" locale="ch/it" Europe - German locale="eu/de" locale=”eu/de” locale=”eu/de” locale=”eu/de” contact Breville / Sage Appliances contact Breville / Sage Appliances locale=”eu/de” locale=”eu/de” Europe - French locale="eu/fr" contact Breville / Sage Appliances locale="eu/fr" locale="eu/fr" contact Breville / Sage Appliances contact Breville / Sage Appliances locale="eu/fr" locale="eu/fr" Europe - Spanish locale="eu/es" contact Breville / Sage Appliances locale="eu/es" contact Breville / Sage Appliances contact Breville / Sage Appliances contact Breville / Sage Appliances locale="eu/es" locale="eu/es" Europe - Dutch locale="eu/nl" contact Breville / Sage Appliances locale="eu/nl" contact Breville / Sage Appliances contact Breville / Sage Appliances contact Breville / Sage Appliances locale="eu/nl" locale="eu/nl" Europe - English locale="eu/en" contact Breville / Sage Appliances locale="eu/en" contact Breville / Sage Appliances contact Breville / Sage Appliances contact Breville / Sage Appliances locale="eu/en" locale="eu/en" Applicable MPN’s for Each Tool Per locale
The following MPN’s can be included when setting up the configuration for each decision tool. Simply omit any MPN’s not included in the range on your retail website to avoid that product being recommended.
For each MPN added to the configuration, make sure both url and price information is provided. The example below shows all information required for each MPN for Espresso, Tea, Waves, Smart Ovens, Air & Water. For the “Blend, Juice or Bluce” (type="cmh-widget" each list of mpn need to be contained in a specific category (see separate example at end of document).
1 "BES500": { 2 "url": "https://www.your_site.com/your_BES500_product_page/, 3 "price": "$9111.11" 4 } Espresso
*MPNs are case insensitive
Name US CA AU NZ UK EU CH The Dual Boiler BES920 BES920 N/A N/A BES920 BES920 BES920 The Barista Express BES870 BES870 BES870 BES870 BES875 N/A BES875 the Barista Express Impress BES876 BES876 BES876 BES876 BES876 N/A N/A The Infuser BES840 BES840 BES840 BES840 N/A N/A N/A The Oracle Touch BES990 BES990 BES990 BES990 BES990 BES990 BES990 The Oracle BES980 BES980 BES980 BES980 BES980 BES980 BES980 The Barista Touch BES880 BES880 BES880 BES880 BES880 BES880 BES880 The Duo Temp Pro N/A N/A N/A N/A BES810 BES810 BES810 The Bambino Plus BES500 BES500 BES500 BES500 BES500 BES500 BES500 The Barista Pro BES878 BES878 BES878 BES878 BES878 BES878 BES878 The Bambino BES450 BES450 BES450 BES450 N/A N/A N/A The Dynamic Duo N/A N/A BEP920 BEP920 N/A N/A N/A The Creatista Plus (Nespresso) N/A N/A BNE800 BNE800 N/A N/A N/A Creatista Uno (Nespresso) N/A N/A BNE500 BNE500 N/A N/A N/A Waves
Name US CA AU NZ UK EU CH the Combi Wave™ 3 in 1 BMO870 BMO870 BMO870 BMO870 BMO870 BMO870 BMO870 the Smooth Wave™ BMO850 BMO850 BMO850 BMO850 N/A N/A N/A the Compact Wave™ BMO650 BMO650 BMO650 BMO650 BMO650 BMO650 BMO650 Tea
Name US CA UK EU The Breville Smart Tea Infuser BTM600 BTM600 BTM600 BTM600 The IQ Kettle Pure BKE830 BKE830 N/A N/A The Tea Maker BTM800 BTM800 BTM800 BTM800 the Temp Select BKE720 N/A N/A N/A the Tea Maker Compact BTM700 BTM700 BTM700 BTM700 the IQ Kettle™ BKE820 BKE820 N/A N/A the Breville Smart Tea Infuser™ Compact BTM500 BTM500 BTM500 BTM500 the Smart Kettle Luxe BKE845 BKE845 BKE820 BKE820 Smart Ovens
Name US CA AU NZ UK EU The Smart Oven Air BOV900 BOV900 N/A N/A N/A N/A The Smart Oven Air Fryer BOV860 BOV860 BOV860 BOV860 SOV860 SOV860 The Smart Oven Pro BOV845 BOV845 BOV845 BOV845 BOV820 BOV820 The Smart Oven BOV800 N/A N/A N/A N/A N/A the Joule Oven Air Fryer Pro BOV950 BOV950 N/A N/A N/A N/A the Smart Oven Pizzaiolo BPZ820 BPZ820 BPZ820 BPZ820 SPZ820 SPZ820 The Compact Smart Oven BOV650 N/A N/A N/A N/A N/A The Mini Smart Oven BOV450 BOV450 N/A N/A N/A N/A The Smart Oven Compact Convection N/A BOV670 N/A N/A N/A N/A Air
Name US CA AU NZ UK EU the Easy Air™ Connect Purifier N/A N/A LAP158 LAP158 N/A N/A The Smart Air Viral Protect Compact Purifier N/A N/A BAP208 BAP208 N/A N/A The Smart Air Viral Protect Compact Purifier N/A N/A BAP408 BAP408 N/A N/A the Smart Air™ Plus Connect Purifier N/A N/A LAP508 LAP508 N/A N/A the Smart Air™ Plus Purifier N/A N/A LAP500 LAP500 N/A N/A the Smart Air™ Purifier N/A N/A LAP300 LAP300 N/A N/A the Easy Air™ Purifier N/A N/A LAP150 LAP150 N/A N/A the Smart Dry™ 2-in-1 Viral Protect Dehumidifier N/A N/A BAP708 BAP708 N/A N/A the Smart Dry Plus™ Connect Dehumidifier N/A N/A BAP308 BAP308 N/A N/A the Smart Dry™ Connect Dehumidifier N/A N/A BAD208 BAD208 N/A N/A the Smart Dry Ultimate™ Dehumidifier N/A N/A LAD500 LAD500 N/A N/A the All Climate™ Dehumidifier N/A N/A LAD250 LAD250 N/A N/A the Smart Mist™ Humidifier N/A N/A LAD400 LAD400 N/A N/A the Smart Mist™ Humidifier N/A N/A LAH300 LAH300 N/A N/A Water
Name US CA AU NZ UK EU the AquaStation™ Purifier N/A N/A LWA100BSS LWA100BSS N/A N/A the AquaStation™ Purifier Hot N/A N/A LWA200BSS LWA200BSS N/A N/A AquaStation Chilled Water Filter N/A N/A LWA300BSS LWA300BSS N/A N/A AquaStation Chilled + Hot Water FiIter N/A N/A LWA600BSS LWA600BSS N/A N/A Blend, Juice, Bluice
For each MPN added to the configuration for Blend, Juice, Bluice, make sure all information is provided, and MPN is placed under the correct product category.
If a product is not ranged, it can be omitted leaving the category blank (with no products) and thus removing causing the widget to never recommend that category. To avoid possible warnings in the console, we recommend to always have the list of categories (i.e bluicing, blenders etc) present even when they are empty.
*Product category naming must be maintained.
1 { 2 "mpns": { 3 "bluicing": { 4 "BJB815": { 5 "url": "https://www.your_site.com/your_product_page.html", 6 "price": "$1111.01" 7 } 8 }, 9 "blenders": { 10 "BBL920": { 11 "url": "https://www.your_site.com/your_product_page.html", 12 "price": "$1111.02" 13 }, 14 "fast_juicers": { 15 "BJE820": { 16 "url": "https://www.your_site.com/your_product_page.html", 17 "price": "$1111.03" 18 }, 19 "slow_juicers": { 20 "BJS700": { 21 "url": "https://www.your_site.com/your_product_page.html", 22 "price": "$1111.04" 23 } 24 }, 25 "citrus_presses": { 26 "800CP": { 27 "url": "https://www.your_site.com/your_product_page.html", 28 "price": "$1111.05" 29 } 30 } 31 } 32 } 33 } 34 }
Name US CA AU NZ UK EU CH Bluicers The 3x Bluicer Pro BJB815 BJB815 BJB815 BJB815 BJB815 BJB815 BJB815 The 3x Bluicer N/A BJB615 BJB615 BJB615 BJB615 BJB615 Blenders The Super Q BBL920 BBL920 BBL920 BBL920 BBL920 BBL920 BBL920 The Boss N/A N/A BBL915 N/A N/A N/A N/A The Q N/A BBL820 BBL820 BBL820 BBL820 BBL820 N/A The Kinetix Pro N/A N/A BBL800 N/A N/A N/A N/A The Fresh & Furious BBL620 BBL620 BBL620 BBL620 BBL620 BBL620 BBL620 The Kinetix Twist N/A N/A BBL405 BBL405 N/A BBL405 N/A The Breville Boss to Go Sport/Plus BPB610 N/A N/A N/A N/A BPB620 BPB620 The Boss to Go N/A N/A N/A N/A BPB550 BPB550 BPB550 The Vac Q BBL002 BBL002 BBL002 BBL002 BBL002 BBL002 BBL002 Fast Juicers The Juice Fountain Duo BJE820 N/A N/A N/A N/A N/A N/A The Juice Fountain/Nutri Juicer Cold XL BJE830 BJE830 BJE830 BJE830 BJE830 BJE830 The Cold Fountain Pro N/A N/A BJE825 N/A N/A N/A N/A The Juice Fountain Elite 800JE 800JE N/A N/A N/A N/A The Juice Fountain/Nutri Juicer Cold Plus BJE530 BJE530 BJE530 BJE530 BJE530 N/A N/A The Froojie Fountain / Nutri Juicer Plus N/A N/A BJE520 N/A N/A BJE520 N/A The Juice Fountain Multi-Speed N/A BJE510 N/A N/A N/A N/A N/A The Juice Fountain/Nutri Juicer Cold BJE430 BJE430 BJE430 BJE430 BJE430 BJE430 BJE430 The Juice Fountain Plus /Max /Nutri Juicer Classic JE98XL JE98SI BJE410 BJE410 N/A BJE410 BJE410 The Juice Fountain Compact BJE200 BJE200 BJE200 N/A N/A N/A N/A Slow Juicer The Big Squeeze BJS700 BJS700 BJS700 N/A BJS700 BJS700 N/A Citrus Press The Citrus press Pro 800CP 800CP 800CP 800CP 800CP 800CP 800CP The Citrus press BCP600 BCP600 N/A N/A BCP600 BCP600 BCP600 Widget Security
The breville-widget has been designed with following security measures in place
1. A white-listing policy is applied across all widgets. This prevents any widget from loading unless it can verify that the retail website domain (URL) has been added to the list of acceptable domains under the policy.
a. To add you website domain(s) to the white-listing policy, please submit a request via email to your regional Breville/Sage Appliances contact stating all retail website domains where the widget / decision tools are intended to be used.2. All widgets code runs within an iframe that is embedded on the retailer website via the script provided as part of this implementation guide. The script ensures the iframe is correctly setup to call & display widget content within the retailer site. Minimal code and changes are made to the breville-widget scripts.