Configurations

Installation Parameters provide a way for the app to get some configurations for the app while installing or updating the app and use it in the app workflow.

For example, if the app requires the Freshservice domain to make API or a time on when an API should be made from the users, it would be a right place to get this configured while app is installed or updated. In our case, the app needs the domain of the current Freshservice portal to make an API request to create a ticket via API. So, let’s get the Freshservice domain from the installation parameters.

To configure the same, replace the contents of the config/iparams.json file with the following code.

config/iparams.json file
{
  "freshservice_domain": {
    "display_name": "Your Freshservice domain",
    "description": "Please enter your Freshservice domain. For example: subdomain.freshservice.com",
    "type": "text",
    "required": true
  }
}

Now, let’s see how to test this configuration.

  1. Run the app with “fdk run” again.
  2. Go to http://localhost:10001/custom_configs to view the configurations.
    • Alternatively, you can go to the Marketplace Apps section in your Freshservice portal, and then to “Manage Apps” section and then to “Custom Apps” tab and install the app with the folder name and “In dev” label to view the configurations.
  3. A text field requesting for the Freshservice domain will be visible. You can enter your domain without the protocol or trialing slashes or further path in the field and install the app. For example, “mycompany.freshservice.com” can be added as the value.

We have configured the domain, we need the authentication for the account as well. Let’s go to the next section to learn how to configure authentication for Freshservice.