Step 1 – Basic Business Scenario Setup

AIM can simulate business scenarios through your model, so that you can gain extra certainty that your model is correct.

A scenario is a set of business information flows, involving receiving, processing, and outputting information across a number of business functions.

There are 2 parts to defining scenarios.

The first is to create a special function inside your scripts called GetScenarios. It’s shown below.

  • It must be in a class called Scenario.
  • It must receive a params argument.
  • It must return a JSON return value like the one shown.
  • This is the only method that must be specially named. All other methods can be called whatever you like.

AIM calls the GetScenarios method in the AIM Server to get the list of scenarios you’ve defined, and it expects to be given a result like the one below.

In this sample below, we’ve defined the stub of a scenario called “Enquiry”. We’ve given it a description, however it contains no function mapping yet, nor are any of the underlying scripts created that will power this scenario — however we will create those in next steps.

class Scenario {
  function GetScenarios(params) {
    var result = {};
    result["scenarios"] = [
        name: "Enquiry",
        description: "Customers inquires about products",
        mapping: [
    return result;

Next…Adding function mappings to your scenario