2. Technology behind our Smart Widgets

From where do Smart Widgets retrieve data?

For displaying ratings and reviews in our Smart Widgets (SW) we need to import data to our SW-database. We run our review-importer within 12 hours after account creation. In new accounts we provide one default seller widgets (below) and one default product widget.

default widget

These default widgets require no reviews to be shown, so we will not import any reviews. We will import only following APIs data (Data related to shop level e.g. rating, total reviews, certificate URL etc)

  1. Get Snapshot
  2. Get Average
  3. Get Shop Details

After a new widget is created that does require reviews to be shown, then we will call the following APIs data to be imported (after 12 hours of the last importer run). 

  1. Get Feedback (Seller Reviews)
  2. Get Product Feedback (Product Reviews)

 

File System Smart Widgets - Our Smart Widgets are served by static JSON-files

After the recent implementation of CDN on Smart Widget project, we now use static JSON-files to render our widgets. We have the following type of json files:

  • Widget file (Example here)

This type of file contains the widget html & css and some mandatory data that is required to show a widget

  • Summary file (Example here)

This type of file contains aggregated data. In case of seller widgets we call this file: seller summary file. In case of product widgets we call this file: product summary file.

  • Reviews file (Example here)

This file contains reviews that is required to show reviews on widget or reviews that are required to populate any hidden data such as review content in Schema Markup.

  • Schema file (Example here)

This file contains schema markup that will be attached to widget html.

  • Product ids file (Example here)

This file contains all the products of the shop that have reviews or that are requested through the widget code at least once. We load this file on clients browser because we need to have some technical mapping to render the widget files.

  • Deleted Widgets file (Example here)

This file contains all the widget tokens that are deleted from Smart Widget interface for a particular shop.

 

Video 1 You can check with your browser if static JSON files are online for a particular widget/shop.

After mentioning all the required static JSON files, now we have to understand the basic flow to render the widget using these files.

Rendering of Widget

Whenever a client places a widget code on its website on the first attempt we load the widget file (Example here) containing widget html and widget css. After loading the widget file we call the seller summary or product summary file (Example here) based on the widget type. Now if the widget requires reviews to be shown then we call reviews file (Example here) otherwise not. In the end if the widget has Schema Markups enabled then we will load the schema file (Example here) otherwise not. After loading all the files we combine the data from our widget.js file and render the widget on the client site.

 

Update Static JSON-files manually

Under normal circumstances JSON-files are updated whenever new review data is added to eKomi system. The Reviews File (Example here) for example is not updated when no new reviews are collected. If it’s really needed then it is possible for us to force recreate all static JSON files for a particular shop. Please contact you eKomi agent if you need support here.

 

Basic and Premium Account

With the introduction of CDN we have also introduced a distinction between Basic and Premium accounts. Why? For every time we do an invalidation request (a request to update one of the static files) we have to pay Amazon. If we allow every client to update their widget as often as they like, then it would cost us lots of money.

The difference:

  • Basic Account (default) - Changes to widgets (for example to HTML or CSS) will be visible after 24 hours

  • Premium Account - Changes to widgets will be visible almost instantly. Shops can have between 1-10 changes a day.

If you need an upgrade to Premium, please contact eKomi support.

 

Cloudfront CDN

For our Smart Widgets we use AWS Cloudfront CDN. Data we store remains on AWS servers in Frankfurt. Read more about it below:

https://aws.amazon.com/cloudfront/

https://aws.amazon.com/compliance/gdpr-center/

 

Architecture CDN