What is an Addon App?

In Tradetraks an Addon App is a web application, built by a developer that can extend the functionality of Tradetraks. It is published to the Marketplace, where it can then be installed into Tradetraks into several slots throughout the app.

For example, if an Addon App is related to the Equipment Module, it can be installed within the Equipment Module space, where it will then be accessible from the 'Apps' tab.

An Addon App usually leverages the web API in order to query and manipulate Tradetraks data.

Addon Apps are hosted externally to Tradetraks, which means that developers are free to make their own choices with regard to the technology they would like to build the app in, and how they manage their infrastructure.


How to build an Addon App

There is a simple example Addon App you can see here: https://github.com/ChadTiffin/TradetraksAddonAppDemo.

The example Addon App is built in PHP, and simply queries the Tradetraks the API for a list of Equipment, and renders them into an HTML table. It is also published in the Tradetraks Marketplace to see it work in action.

Key Points

Security Tokens for API use

When the addon app loads within Tradetraks, the Tradetraks will pass along a current security token like so: https://addonappdomain.com?token={the_security_token}

Your app can then retrieve this as a GET query parameter. In PHP, it would look like this:

$apiToken = $_GET['token'];	

Use of HTTPS

Addon Apps must make use of HTTPS. Because the Tradetraks runs under the HTTPS protocol, any non-encrypted resources will be blocked, so without it, your app will not load.


How to publish an Addon App

Publishing an app involves these steps:

  1. Deploying your addon to a web-host/domain that is external to the Tradetraks platform, just like you would deploy a regular web app or website.
  2. Create a listing of that app on the Tradetraks Marketplace.

In order to create a listing on the Marketplace, follow these steps:

  1. Navigate from the main menu to Apps, then go to the Marketplace tab
  2. Click Publish an App...
  3. Fill out the form fields which includes a url to your app, and other information to help describe what your app does and help people to learn what it does.
  4. Choose whether you want to publish it publicly to Marketplace so that other companies can find and install it to their Tradetraks accounts, or keep it private so only your Tradetraks company account can use it.

FAQ

Why would I want to build an Addon App?

Addon Apps exist in order to provide companies the ability to extend the capability of Tradetraks. Often a company will have a unique need for a special kind of report to visualize a certain bit of data in a particular way, or they would like to track something that Tradetraks doesn't support natively, they can build an Addon App to meet their needs.

What skills do a I need to build an Addon App?

Building an Addon App requires knowledge in web development. You or your web developer should be comfortable with a server side programming language to make requests to the web API, working with the JSON data format, and building dynamic web pages in your programming language of choice.

Where is an Addon App hosted?

Tradetraks does not provide hosting for Addon Apps, so they will need to be hosted on a third party web host controlled by the developer.

What kind of programming language does the Addon App need to be written in?

Any language you want! Since Addon Apps are self-contained web applications, they can be built using any technology you or your developer is comfortable using. Some examples include PHP, Ruby, NodeJS, or C#. If the language can run on the web, you can use it for your Addon App.

How do I pass in my API key or token to the App?

In the vast majority of cases your app will want to query the Tradetraks API, but in order to do this, you will need an API key or security token.

Conveniently, when an Addon App is loaded into a Tradetraks page, it automatically appends a token query parameter to the app URL. Your app can then grab this token from the URL and use it in Tradetraks API requests.