Return to Introduction to Interaction Connect Add-ins

Basic Requirements for Creating Add-ins

As you create an add-in for Interaction Connect, you will follow a basic set of steps for each one:

  1. Create a directory that will contain your add-in's files.
  2. Create a manifest.json file for your add-in using the following as an example.
  3. Create the main.js file for your add-in using the following as an example.
  4. Deploy your add-in alongside Interaction Connect using the instructions in deployment.

Example: manifest.json

The manifest.json file contains details for loading the add-in

{
    "manifestVersion": 1,
    "addinId": "com.inin.connect.testAddin"
}

Note:

  • The manifestVersion must be set to 1.
  • The addinId must be a unique name for each add-in using the alpha-numeric and period format.

Example: main.js

The main.js file acts as the main entry point into an add-in. This means that calling APIs such as registering views or creating subscriptions can occur in this scope.

console.log("Hello world! I am running version", ININ.Addins.version, "of the add-in API.");

Note:

  • The ININ.Addins namespace is available automatically for use from line 1.
  • Add-ins run in a limited-feature JavaScript environment known as a web worker that is in the Interaction Connect origin. For more information, see this article on Mozilla Developer Network.