SDK configuration

Configuration file

The novomind iAGENT SDK provides several features which need corresponding configurations. The central configuration file (iAGENTConfig.json) consists of the three parts:

  • server: API endpoint configuration
  • style: Supported skinnings of the native views provided by the SDK
  • localization: Translations of the native views provided by the SDK

This configuration file can be shared between the iOS and Android SDKs. You can also decide to host this configuration file remotely if you want to be able to apply changes without any app store releases.

A template of the configuration file is included in our sample apps for iOS and Android.

server

Within the server area you can define the endpoints and their behavior.

...
"server": {
    "iHELP_configuration": {
        "hostname": "YOUR_NOVOMIND_IAGENT_HELP_API_HOSTNAME",
        "port": "YOUR_NOVOMIND_IAGENT_HELP_API_PORT",
        "path": "YOUR_NOVOMIND_IAGENT_HELP_API_PATH",
        "configuration": [
            {
                "country": "DE",
                "agentId": "Agent",
                "questionNumber": "18",
                "faqRootContextId": "MYCONTEXT_DE"
            },
            {
                "country": "AT",
                "language": "de",
                "agentId": "Agent",
                "questionNumber": "18",
                "faqRootContextId": "MYCONTEXT_de_AT"
            },
            {
                "language": "de",
                "agentId": "Agent",
                "questionNumber": "18",
                "faqRootContextId": "MYCONTEXT_de"
            }
        ]
    },
    "iMAIL_configuration":{
      "hostname": "NOVOMIND_IAGENT_MAIL_API_HOSTNAME",
        "port": "NOVOMIND_IAGENT_MAIL_API_PORT",
        "path": "NOVOMIND_IAGENT_MAIL_API_PATH",
        "apiKey": "abcdef"
    },
    "iCHAT_configuration": {
      "hostname": "NOVOMIND_IAGENT_CHAT_API_HOSTNAME",
      "port": "NOVOMIND_IAGENT_CHAT_API_PORT",
      "path": "NOVOMIND_IAGENT_CHAT_API_PATH"
    }
}
...
  • iHELP_configuration: Endpoint configuration of the novomind iAGENT Help API if you are going to use novomind iAGENT Help services

    • hostname: novomind iAGENT Help API hostname
    • port: novomind iAGENT Help API port
    • (optional) path: The ootb default path to the API is /nmIQ/api/rest/ (e.g. https://[HOSTNAME] /nmIQ/api/rest/ [METHOD]). You can override the base path using this attribute.
    • configuration: novomind iAGENT Help has the capability to provide multiple knowledgebases. Every knowledgebase is is handled by an agent. If you are using this configuration you are able to support multiple languages/countries where an agent, faqRootContextId and questionNumber can be defined based on the device settings. Priority:

      1. country and language
      2. country
      3. language

      In addition to country and language parameters each agent should contain the following parameters:

      • questionNumber: The question number (identifier) that will be counted by rating an FAQ detail page.
      • faqRootContextId: The root context ID of your FAQ area.
  • iMAIL_configuration: Endpoint configuration of the novomind iAGENT mails bridge if you are going to use novomind iAGENT Mail services
    • hostname: novomind iAGENT Mail API hostname
    • port: novomind iAGENT Mail API port
    • (optional) path: The ootb default path to the API is /api/ (e.g. https://[HOSTNAME] /api/ /mails). You can override the base path using this attribute.
    • apiKey: novomind iAGENT Mail API key (provided by novomind AG)
  • iCHAT_configuration: Endpoint configuration of the novomind iAGENT Chat API if you are going to use novomind iAGENT Chat module
    • hostname: novomind iAGENT Chat API hostname
    • port: novomind iAGENT Chat API port
    • (optional) path: The ootb default path to the API is /chatRest/ (e.g. https://[HOSTNAME] /chatRest/ [METHOD]). You can override the base path using this attribute.

style

Changes within the style change the look & feel of the native views. We recommend to change the style according to your corporate identity.

...
"style": {
  "faqCentreViewBackgroundColor": "#FFFFFF",
  "faqCentreCellBackgroundColor": "#FFFFFF",
  "faqCenterSelectedCellBackgroundColor": "#E0E0E0",
  "faqCentreDefaultTextColor": "#000000",
  "faqCentreContextTextColor": "#000000",
  "faqCentreQuestionTextColor": "#DE391B",
  "faqCentreAnswerTextColor": "#000000",
  "faqCentreDonateButtonsBackgroundColor": "DE391B",
  "faqCentreCellFont": "16",

  "mailContactViewBackgroundColor": "#FFFFFF",

  "virtualAdvisorAgentIconName": "agent_chat_icon",
  "virtualAdvisorCellFont": "16",
  "virtualAdvisorViewBackgroundColor": "#EBEBF1",
  "virtualAdvisorAgentMessageBackgroundColor": "#FC683A",
  "virtualAdvisorAgentMessageTextColor": "#000000",
  "virtualAdvisorUserMessageBackgroundColor": "#9DA1A9",
  "virtualAdvisorUserMessageTextColor": "#000000",

  "chatAgentIconName": "agent_chat_icon",
  "chatVideoCallIconName": "video_icon",
  "chatRejectCallIconName": "reject_call",
  "chatCellFont": "16",
  "chatViewBackgroundColor": "#EBEBF1",
  "chatInfoCellBackgroundColor": "#DDDDDD",
  "chatTimestampTextColorForAgentCell": "#D3D3D3",
  "chatTimestampTextColorForUserCell": "#DDDDDD",
  "chatUserMessageTextColor": "#000000",
  "chatAgentMessageBackgroundColor": "#FC683A",
  "chatUserMessageBackgroundColor": "#9DA1A9",
  "chatAgentMessageTextColor": "#000000",
  "chatInfoMessageTextColor": "#000000",

  "backButtonColor": "#FC683A"
},
...
  • faqCentreViewBackgroundColor: Background color of FAQ Center views
  • faqCentreCellBackgroundColor: Background color of lits/table cells in FAQ CENTRE views
  • faqCenterSelectedCellBackgroundColor: Background color of selected lits/table cells in FAQ CENTRE views
  • faqCentreDefaultTextColor: Default text color of text in FAQ Center views
  • faqCentreContextTextColor: Text color of Context in FAQ Center views
  • faqCentreQuestionTextColor: Text color of questions in FAQ Center views
  • faqCentreAnswerTextColor: Text color of answers in FAQ Center views
  • faqCentreDonateButtonsBackgroundColor: Background color of donate buttons in FAQ Center views
  • faqCentreCellFont: Font size of list/table cells in FAQ Center views
  • mailContactViewBackgroundColor: Background color of Mail view
  • virtualAdvisorAgentIconName: Agent icon file name in Virtual Advisor view
  • virtualAdvisorCellFont: Font size in Virtual Advisor view
  • virtualAdvisorViewBackgroundColor: Background color of Virtual Advisor view
  • virtualAdvisorAgentMessageBackgroundColor: Background color of agent cells in Virtual Advisor view
  • virtualAdvisorAgentMessageTextColor: Text color of agent text in Virtual Advisor view
  • virtualAdvisorUserMessageBackgroundColor: Background color of user cells in Virtual Advisor view
  • virtualAdvisorUserMessageTextColor: Text color of user text in Virtual Advisor view
  • chatAgentIconName: Icon file name of agent in Chat view
  • chatVideoCallIconName: Icon file name of start video call button in Chat view
  • chatRejectCallIconName: Icon file name of close video call button in Chat view
  • chatCellFont: Font size in Chat view
  • chatViewBackgroundColor: Background color of Chat view
  • chatInfoCellBackgroundColor: Background color of info cells in Chat view
  • chatTimestampTextColorForAgentCell: Text color of message time in agent cells in Chat view
  • chatTimestampTextColorForUserCell: Text color of message time in user cells in Chat view
  • chatUserMessageTextColor: Text color of user text in Chat view
  • chatAgentMessageBackgroundColor: Background color of agent cells in Chat view
  • chatUserMessageBackgroundColor: Background color of user cells in Chat view
  • chatAgentMessageTextColor: Text color of agent text in Chat view
  • chatInfoMessageTextColor: Text color of info text in Chat view
  • backButtonColor: Color of back button in navigation bar

localization

The localization part is used to maintain translations which are used within the native views. If you don't use them, just skip this area!

...
"localization": [
  {
      "key": "FAQCENTRE.NAVIGATIONBAR.TITLE",
      "translation": [
          {
              "language": "en",
              "value": "FAQ CENTRE"
          },
          {
              "language": "de",
              "value": "FAQ CENTRE"
          }
      ]
  },
  {
      "key": "CHAT.NAVIGATIONBAR.TITLE",
      "translation": [
           {
                  "language": "en",
                  "value": "Chat"
           },
           {
                  "language": "de",
                  "value": "Chat"
           }
      ]
   },
...
]
...

You can see all available translation keys in the configuration file of the sample app, which will be provided to you by your account manager.

Initialize novomind iAGENT SDK

iOS

Initialize using JSON file

iAGENT.sharedInstance.initConfiguration(fileName: String, customConfiguration: CustomiAGENTConfiguration)

Initialize using parsed JSON dictionary

iAGENT.sharedInstance.initConfiguration(configDict: [String: Any], customConfiguration: CustomiAGENTConfiguration)

CustomiAGENTConfiguration contains:

  • mailContactEmailInput String: email address to be set in mail view controller email text field
  • mailContactEmailInputEnabled Bool: disable email text field in mail view controller
  • mailContactAttachmentsEnabled Bool: disable attachments view in mail view controller

CustomiAGENTConfiguration can be accessed and changed any time through iAGENT.sharedInstance.customiAGENTConfiguration

Android

Initialize using JSON file

iAGENT.sharedInstance.initConfiguration(getApplicationContext(), String filename, CustomiAGENTConfiguration customConfiguration);

Initialize using parsed JSON dictionary

iAGENT.sharedInstance.initConfiguration(getApplicationContext(), JSONObject jsonObject, CustomiAGENTConfiguration customConfiguration);

CustomiAGENTConfiguration contains:

  • mailContactEmailInput String: email address to be set in mail activity email text field
  • mailContactEmailInputEnabled boolean: disable email text field in mail activity
  • mailContactAttachmentsEnabled boolean: disable attachments view in mail activity

CustomiAGENTConfiguration can be accessed and changed any time through iAGENT.sharedInstance.customiAGENTConfiguration