Using the Data

Once the supply chain has been operating for a while, the Platform account will have accumulated some useful data about stock movements and numbers. Developers can utilise this data directly via the API or visualise it through the reusable widgets available in the EVRYTHNG Dashboard. We will also consider how to limit access to data through the Roles and Permissions APIs.

## Limit Visibility with Roles

In a nutshell, the Roles and Permissions APIs allow account operators to limit visibility of other operators and Application Users to only certain projects that they are concerned with. For example, if the movements of products is considered sensitive data (possibly associated with brands/users) it can be stored in a separate project, and the Operator’s role can be adjusted to limit access to only that project. Similarly, users of the mobile app can have their access restricted to only specific products or Thngs with Application User roles, such as the only the items in the warehouses they are concerned with.

The implementation of this part of the API will not be directly explored here due to its level of detail, so be sure to read the Roles and Permissions page for more information.

Display Data with Widgets

Once a number of actions for product movement events have been created, the EVRYTHNG Dashboard can be configured to display insights in the form of customisable widgets. For example, to show the location and action frequency of the different types of supply chain action, or which type of event is the most common in each location. Begin by opening the Dashboard.


Import the example dashboard

Instead of adding the widgets described below manually, use the 'Import Dashboard' button in the 'Add dashboard' dialog to import the example dashboard.

To start implementing this, create a new Dashboard section using the plus icon next to ‘Dashboards’ in the left hand pane. Give the section a name (such as ‘Supply Chain Data’), and optionally choose an icon (such as beer), then click ‘Add Dashboard’. Once the new section has been created, click the pencil icon at the top of the page to begin adding widgets.

Create the first section using the left hand side of the modal section editing dialog, then add the following widgets one by one using the names provided: evtx-overview-locations, evtx-action-map, evtx-action-list, evtx-overview-interactions. At the end, you should have a dashboard section configuration as follows:

Click ‘Update’ and confirm to save the new widget configuration. After the page has reloaded, consider adding action filters to the widgets that allow filtering, and customizing the titles and descriptions to more accurately reflect the insights the action types and widgets chosen actually represent. The image below contains a suggestion.

Once a few days of data has been accumulated (for the purposes of this walkthrough either manually, or automatically with a Reactor schedule) the above widget configuration should look similar to the image below, and begin to give insights into the location and frequency of different action types within the supply chain.

Wrapping Up

After following through this walkthrough, you should have gained an insight into how some of the various basic resource types of the EVRYTHNG Platform can play a useful role in an example tagged products scenario. To recap:

  • Projects are used to limit access and visibility of resources.
  • Applications represent remote apps/integrations, and are used to give access to users of the app.
  • Products represent classes of objects, and are used to share metadata across instances.
  • Thngs are the main data containers, and are used to be the physical counterpart of real-world objects, products, and devices.
  • Actions are used to represent discrete events or alerts/notifications.
  • Roles and permissions can be used to limit data for account operators and Application Users as required.
  • Dashboard widgets can be customized to display insightful summaries of actions.

Check out some more features of the API to see what else is possible:

  • Reactor - scripting reactions to actions, property changes, and schedules.
  • Pub/Sub Broker - Use MQTT to connected devices to the EVRYTHNG API.