FX Corporate configuration

Editing configuration options

Caplin FX Corporate’s configuration options are stored in a JavaScript map exported by the CommonJS module: config/AppConfig.js. An extract from this file is shown below:

File: corporatetrader/src/config/AppConfig.js
const appMetaService = require("service!br.app-meta-service");
const i18n = require("br/I18n");
const { ForgottenPasswordExample } =
    require("react-login-page/examples/ForgottenPasswordExample");

require("react-login-page/_resources/i18n/en.properties");
require("./_resources/i18n/en.properties");

export default {
    'APP_ID': 'corporate',
    'APP_NAME': i18n("app.name"),

    // ...

}

To customise the configuration, edit the values assigned to the keys of the map.

Configuration reference

Caplin FX Corporate configuration items.

APP_ID

The StreamLink application identifier. The application identifier distinguishes client traffic in StreamLink log files and in Liberator licence monitoring.

Type

String

Valid values

If your Liberator is licensed at the application level, then APP_ID must match an application identifier that your Liberator servers are licensed to accept.

Default value

'corporate'

APP.NAME

Sets the HTML title of the application page. The HTML title is visible in the title of the browser window or tab.

Type

String

Valid values

Default value

i18n('app.name')

CAPLIN.LOGIN

The configuration object for the built-in login page.

Type

JavaScript object

Valid values

See specification below

Default value

{
 title: i18n('reactloginpage.title'),
 usernameFormat: '.+',
 usernameMessage: i18n('reactloginpage.login.user.name.validation'),
 loginBackground: 'images/login_screen_bg.jpg',
 loginCompanyLogo: 'images/login_screen_company_logo.svg',
 loginProductLogo: 'images/login_screen_product_logo.png',
 links: [
   {
     text: "Caplin © " + ((new Date).getFullYear())
   },
   {
     url: "http://www.caplin.com/business/page/cookie-policy",
     text: i18n('reactloginpage.footer.cookies')
   },
   {
     url: "http://www.caplin.com/business/page/terms-conditions",
     text: i18n('reactloginpage.footer.terms')
   },
   {
     url: "http://www.caplin.com/business/page/privacy",
     text: i18n('reactloginpage.footer.privacy')
   }
 ],
 keyMasterUrl: LIBERATOR_CONFIG.keymaster_url || "servlet/StandardKeyMaster",
 tradeModeRegex: "/.*~CustomerId=(.*)~.*/",
 forgottenPasswordFunction: ForgottenPasswordExample
}
CAPLIN.LOGIN configuration object
Property Type Description

title

String

The title to display for the login page.

usernameFormat

String or Regex

The name of a validator or a regular expression. A validator, 'email', is provided out-of-the-box to validate email addresses.

usernameMessage

String

The message displayed when a username format is incorrect.

links

Array of link objects (see table below)

Text and hyperlinks to display on the login page.

keyMasterUrl

String

The URL of the KeyMaster servlet.

loginBackground

String

The background image of the login page.

loginCompanyLogo

String

The company logo on the login page.

loginProductLogo

String

The product logo on the login page.

tradeModeRegex

String

Reserved. Do not change.

forgottenPasswordFunction

JavaScript function

Function that handles a password recovery request. See example code below.

Link object
Property Type Description

text

String

The text to display

url

String

[optional] The URL to navigate to on clicking the text

Example function for the forgottenPasswordFunction property:

export const ForgottenPasswordExample = function(loginData, callback) {
  /**
   * example:
   * loginData = { user: "st1@caplin.com" }
   */
  setTimeout(function() {
    if(callback) {
      callback({
        success: true,
        message: ""
      });
    }
  }, 1000);
};

export default ForgottenPasswordExample;

CAPLIN.LOGINENABLED

Enables FX Corporate’s built-in login page.

Type

Boolean

Valid values

true, false

Default value

true

CAPLIN.PERMISSION.CONFIG.URL

The path to the permissions configuration file, which specifies the subjects that supply FX Corporate with real-time permissioning data.

The default permissions configuration file, static/permissionDatasourceDefinitions.xml, contains the following configuration:

<?xml version="1.0" encoding="UTF-8"?>
<permissionDatasourceDefinitions
        xmlns="http://schema.caplin.com/CaplinTrader/permissionDatasourceDefinitions">
    <permissionsource name="MASTER" role="Master"/>
    <permissionsource name="SLAVE1"/>
</permissionDatasourceDefinitions>

The configuration above configures FX Corporate to subscribe to permissioning data in two containers:

  • /PERMISSIONS/MASTER/CONTAINER/fx-corporate-username

  • /PERMISSIONS/SLAVE1/CONTAINER/fx-corporate-username

Type

String

Valid values

Valid path to the permissions XML file in the FX Corporate WAR file.

Default value

'static/permissionDatasourceDefinitions.xml'

CONFIRMATION.PHONE

The support phone number displayed in the dialog for affirming trades and assigning settlement instructions.

Type

String

Default value

'+44 20 7826 9600'

CONFIRMATION.EMAIL

The support email displayed in the dialog for affirming trades and assigning settlement instructions.

Type

String

Default value

'support@caplin.com'

HELP.PANELS

Configures the panels displayed in the Help dialog. The help dialog is displayed when a user clicks the help icon ( ).

There are two panels in the Help dialog. Each panel has a title and a series of key-value pairs.

fx corp help dialog

Type

Array of objects. Each object represents a panel. Panels are laid out from left-to-right. The first object in the array is the left-most panel.

Default value

[
  {
    title: i18n("help.panel.inquiries.title"),
    data: [
      {
        key: "London",
        value: "+44 20 7826 9600"
      },
      {
        key: "America",
        value: "+1 (212) 266 0198"
      },
      {
        key: "Asia",
        value: "+65 6704 5484"
      }
    ]
  },
  {
    title: i18n("help.panel.support.title"),
    data: [
      {
        key: "Tel",
        value: "+44 20 7826 9600"
      },
      {
        key: "Email",
        value: "support@caplin.com"
      }
    ]
  }
]

The URI to the application user guide file.

The file must be hosted at a publicly accessible location on the same website you use to host FX Corporate’s application code.

Type

String

Valid values

URI to the terms and conditions file. The URI can be an absolute URI or a URI relative to the location of the FX Corporate app.

Default value

'resources/UserGuide.pdf'

SETTLEMENT

Configuration options for the Manage Settlement Instructions page.

Type

JavaScript object

Default value

{
  ALLOW_DEFAULT_SI: false,
  PENDING_HEADERS_LIST: [
    "SettlementCurrency",
    "SettlementDisplayName",
    "IndividualName",
    "IndividualAccount",
    "BankName",
    "BankAddress1"
  ],
  SAVED_HEADERS_LIST: [
    "SettlementCurrency",
    "SettlementDisplayName",
    "IndividualName",
    "IndividualAccount",
    "BankName",
    "BankAddress1"
  ],
  DETAIL_FIELDS: [
    "BankName",
    "BankAccount",
    "BankSwift",
    "BankAddress1",
    "BankAddress2",
    "BankAddress3",
    "IndividualName",
    "IndividualAccount",
    "IndividualSwift",
    "IndividualAddress1",
    "IndividualAddress2"
  ]
}
SETTLEMENT object keys
Property Type Description

ALLOW_DEFAULT_SI

Boolean

If settlement instructions have not been provided during the trading process, automatically suggest the default settlement account for each currency at affirmation.

PENDING_HEADERS_LIST

Array of strings

Array of field names corresponding to the columns of the table listing settlement instructions pending authorisation by the bank.

SAVED_HEADERS_LIST

Array of strings

Array of field names corresponding to the columns of the table listing saved settlement instructions.

DETAIL_FIELDS

Array of strings

Array of field names to display when a row in the pending or the saved table is selected by a user.

SSI.URL

The URI to the bank’s settlement instructions file.

The file must be hosted at a publicly accessible location on the same website you use to host FX Corporate’s application code.

Type

String

Valid values

URI to the terms and conditions file. The URI can be an absolute URI or a URI relative to the location of the FX Corporate app.

Default value

'resources/SSIs.pdf'

TERMSANDCONDITIONS.URL

The URI to the file containing the text for FX Corporate’s terms and conditions of use. The text is rendered in a dialog when users first log in to FX Corporate and on subsequent logins if the version of the terms and conditions has been incremented.

The file must be hosted at a publicly accessible location on the same website you use to host FX Corporate’s application code.

For information on the format of the terms and conditions file, see Terms and conditions.

Type

String

Valid values

URI to the terms and conditions file. The URI can be an absolute URI or a URI relative to the location of the FX Corporate app.

Default value

'resources/TermsAndConditions.txt'