Example config file

The JSON document below is a sample of how the config.json file that needs to be added to the application can look like.

{
  "comment": "This is the config.template.json file. It needs to be renamed as config.json before use. Notice the core workflows (case, unit, contract, files) are disabled. Enable the ones you want. ",
  "workflows": {
    "contract": {
      "enabled": false,
      "mapping": {
        "title": {
          "property": "name"
        }
      }
    },
    "unit": {
      "enabled": false,
      "limetype": "serviceunit",
      "hierarchy": {
        "mapping": {
          "title": {
            "delimiter": " - ",
            "join": [
              {
                "property": "serviceunitno"
              },
              {
                "property": "name"
              }
            ]
          },
          "description": {
            "property": "description"
          }
        }
      },
      "mapping": {
        "title": {
          "property": "name"
        },
        "code": {
          "property": "serviceunitno"
        }
      },
      "descendants": [],
      "component": {
        "enabled": false,
        "limetype": "appliance",
        "mapping": {
          "unit": {
            "coalesce": [
              {
                "relation": "serviceunit",
                "limetype": "serviceunit"
              }
            ]
          },
          "title": {
            "property": "title"
          },
          "type": {
            "property": "type",
            "optionemptykey": "empty"
          },
          "model": {
            "property": "model"
          },
          "serialnumber": {
            "property": "serialnumber"
          },
          "productnumber": {
            "property": "productnumber"
          },
          "warrantyenddate": {
            "property": "warrantyenddate"
          },
          "installationdate": {
            "property": "installationdate"
          },
          "removaldate": {
            "property": "removaldate"
          },
          "endoflife": {
            "property": "endoflife"
          },
          "description": {
            "property": "description"
          },
          "externalsystemid": {
            "property": "externalsystemid"
          }
        }
      },
      "componentchangerequest": {
        "enabled": false,
        "limetype": "appliancechangerequest",
        "mapping": {
          "unit": {
            "coalesce": [
              {
                "relation": "plant",
                "limetype": "plant"
              },
              {
                "relation": "object",
                "limetype": "object"
              },
              {
                "relation": "building",
                "limetype": "building"
              },
              {
                "relation": "property",
                "limetype": "property"
              }
            ]
          },
          "workorder": {
            "relation": "workorder",
            "limetype": "workorder"
          },
          "unitcomponent": {
            "relation": "appliance",
            "limetype": "appliance"
          },
          "title": { "property": "title" },
          "type": {
            "property": "type",
            "optionemptykey": "empty"
          },
          "model": { "property": "model" },
          "serialnumber": { "property": "serialnumber" },
          "productnumber": { "property": "productnumber" },
          "warrantyenddate": { "property": "warrantyenddate" },
          "installationdate": { "property": "installationdate" },
          "removaldate": { "property": "removaldate" },
          "endoflife": { "property": "endoflife" },
          "description": { "property": "description" },
          "externalsystemid": { "property": "externalsystemid" },
          "state": {
            "property": "state",
            "optionemptykey": "empty"
          },
          "changetype": { "property": "changetype" }
        },
        "meterrequest": {
          "enabled": false,
          "limetype": "meterrequest",
          "mapping": {
            "title": { "property": "title" },
            "location": { "property": "location" },
            "metric": { "property": "metric" },
            "metervalue": { "property": "metervalue" },
            "activitycode": {
              "property": "activitycode",
              "optionemptykey": "empty"
            },
            "measureddate": { "property": "measureddate" },
            "meter": {
              "relation": "meter",
              "limetype": "meter"
            },
            "unitcomponentchangerequest": {
              "relation": "appliancechangerequest",
              "limetype": "appliancechangerequest"
            }

          } 
        }
      },
      "meter": {
        "enabled": false,
        "mapping": {
          "unit": {
            "coalesce": [
              {
                "relation": "serviceunit",
                "limetype": "serviceunit"
              }
            ]
          },
          "unitcomponent": {
            "relation": "appliance",
            "limetype": "appliance"
          }
        }
      }
    },
    "case": {
      "mapping": {
        "title": { "property": "title" },
        "description": { "property": "description" },
        "contract": {
          "relation": "company",
          "limetype": "company"
        },
        "primarycontact": {
          "relation": "person",
          "limetype": "person"
        },
        "individuals": {
          "set": [
            {
              "relation": "person",
              "limetype": "person"
            }
          ]
        }
      },
      "usagequantity": {
        "enabled": false,
        "mapping": {
          "inactive": {
            "property": "inactive"
          },
          "metric": {
            "property": "metric"
          },
          "status": {
            "property": "state",
            "optionemptykey": "empty"
          },
          "producttype": {
            "property": "producttype",
            "optionemptykey": "empty"
          }
        }
      },
      "usetraits": false,
      "workordertask": {
        "enabled": false,
        "limetype": "workordertask"
      },
      "workorder": {
        "mapping": {
          "started": {
            "property": "started"
          },
          "finished": {
            "property": "finished"
          }
        }
      }
    },
    "file": {
      "enabled": true,
      "usefilecategories": false
    }
  }
}