FX Corporate configuration

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')

BENEFICIARY.DETAILS

Configures the fields used to store details of a settlement instruction’s beneficiary.

Type

Array of objects

Valid values

Each object in the array describes a field. For the object specification, see Beneficiary field description object.

Default value

[
  {
    id: "beneficiary",
    placeholder: i18n("ad-hoc-beneficiary-details.placeholder.beneficiary"),
    label: i18n("ad-hoc-beneficiary-details.label.beneficiary"),
    isMandatory: true
  },
  {
    id: "address1",
    placeholder: i18n("ad-hoc-beneficiary-details.placeholder.address1"),
    label: i18n("ad-hoc-beneficiary-details.label.address1"),
    mandatoryCurrencies: [
      "AED",
      "ARS",
      "BGN",
      "BHD",
      "BRL",
      "CLP",
      "CNH",
      "CNY",
      "COP",
      "CRC",
      "DOP",
      "EGP",
      "GTQ",
      "HNL",
      "IDR",
      "INR",
      "ISK",
      "JMD",
      "JOD",
      "KES",
      "KRW",
      "KWD",
      "MAD",
      "MYR",
      "PEN",
      "PHP",
      "PLN",
      "QAR",
      "RON",
      "RUB",
      "SAR",
      "SGD",
      "THB",
      "TRY",
      "TTD",
      "TWD",
      "UYU",
      "VND",
      "ZAR"
    ]
  },
  {
    id: "address2",
    placeholder: i18n("ad-hoc-beneficiary-details.placeholder.address2"),
    label: i18n("ad-hoc-beneficiary-details.label.address2")
  },
  {
    id: "city",
    placeholder: i18n("ad-hoc-beneficiary-details.placeholder.city"),
    label: i18n("ad-hoc-beneficiary-details.label.city")
  },
  {
    id: "postCode",
    placeholder: i18n("ad-hoc-beneficiary-details.placeholder.postCode"),
    label: i18n("ad-hoc-beneficiary-details.label.postCode")
  }
]
Beneficiary field description object
Property Type Description

id

String

Unique ID. (Required)

placeholder

String

Text to display in the field when empty.

label

String

Field label. (Required)

isMandatory

Boolean

Set to true if completion of the field is mandatory.

mandatoryCurrencies

Array of strings

A list of currencies (three-letter currency codes) for which completion of this field is mandatory.

The option isMandatory, if set to true, has precedence over this option.

CAPLIN.LOGIN

The configuration object for the built-in login page.

To customise the login page’s background graphic, company logo, and product logo, see Theme settings: login page artwork.

Type

JavaScript object

Valid values

See specification below

Default value

{
  enabled: true,
  forgottenPasswordFunction: ForgottenPasswordExample,
  keyMasterUrl: LIBERATOR_CONFIG.keymaster_url || "servlet/StandardKeyMaster",
  usernameFormat: '.+',
  usernameMessage: i18n('reactloginpage.login.user.name.validation'),
  links: [
    {
      text: "Caplin © " + ((new Date).getFullYear())
    },
    {
      url: "https://www.caplin.com/business/page/cookie-policy",
      text: i18n('reactloginpage.footer.cookies')
    },
    {
      url: "https://www.caplin.com/business/page/terms-conditions",
      text: i18n('reactloginpage.footer.terms')
    },
    {
      url: "https://www.caplin.com/business/page/privacy",
      text: i18n('reactloginpage.footer.privacy')
    }
  ],
  minimumPasswordStrength: 4,
  title: i18n('reactloginpage.title'),
  tradeModeRegex: "/.*~CustomerId=(.*)~.*/"
}
CAPLIN.LOGIN configuration object
Property Type Description

enabled

Boolean

Set to true (default) to use the built-in login page.

forgottenPasswordFunction

JavaScript function

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

keyMasterUrl

String

The URL of the KeyMaster servlet.

links

Array of link objects (see table below)

Text and hyperlinks to display on the login page.

minimumPasswordStrength

Integer (0-4)

The minimum password strength for new passwords. Password strength is measured using the zxcvbn library, which uses a scale of 0-4:

  1. Too guessable (no minimum strength enforced)

  2. Very guessable

  3. Somewhat guessable

  4. Safely unguessable

  5. Very unguessable

redirectURL

String

When enabled is set to false, unauthenticated users are redirected to this URL.

tradeModeRegex

String

Reserved. Do not change.

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.

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.PERMISSION.CONFIG

Specifies the names and roles of the permission data sources that supply real-time permissioning data for the current user.

FX Corporate receives permissioning data from a datasource by subscribing to a container with the following subject: /PERMISSIONS/permissioning_source_name/CONTAINER.

Type

Object

Valid values

{
  permissionSources: [
    {name: "<name>", role: "<role>"},
    ...
  ]
}

Default value

{
  permissionSources: [
    {name: "MASTER", role: "Master"},
    {name: "SLAVE1", role: "Slave"}
  ]
}

CONFIRMATION.EMAIL

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

Type

String

Default value

'support@caplin.com'

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'

CONFIRMATIONPDF.ADDRESS

The address shown on the confirmation PDF.

Type

String

Default value

The path to the image file of the logo shown on the confirmation PDF.

Type

String

Default value

CONFIRMATIONPDF.PHONE

The phone number shown on the confirmation PDF.

Type

String

Default value

COUNTRIES_TO_CURRENCIES.URL

URL to the CountriesToCurrencies.txt file.

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

Each line of the CountriesToCurrencies.txt file contains the name of a country mapped to a currency code in the following format:

CountriesToCurrencies.txt line format
<country name>: <currency code>
Example lines from a CountriesToCurrencies.txt file
United Kingdom: GBP
United States: USD
Uruguay: UYU
Uzbekistan: UZS

When creating an ad-hoc instruction for non-IBAN currencies (see IBAN_COUNTRIES.URL), this mapping is used to pre-populate the beneficiary’s country field based on the currency of the ad-hoc instruction.

Type

String

Valid values

URL to the CountriesToCurrencies.txt file. The URL can be an absolute URL or a URL relative to the location of the FX Corporate app.

Default value

'resources/CountriesToCurrencies.txt'

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'

IBAN_COUNTRIES.URL

URL of a text file containing a comma-separated list of currencies. When an ad-hoc settlement instruction’s currency is within this list, users can only search for the beneficiary by IBAN (the bank lookup search is hidden).

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

URL of the IBAN countries file. The URL can be an absolute URL or a URL relative to the location of the FX Corporate app.

Default value

'resources/IBANCountries.txt'

LOGOUT.CLOSE

When set to true, the application will attempt to close the browser window or tab when users log out. If the close operation fails, then, if LOGOUT.REDIRECT is set to true, the application will redirect the user to the URL specified in CAPLIN.LOGIN redirectUrl.

Type

Boolean

Valid values

true, false

Default value

false

LOGOUT.REDIRECT

When set to true, then on logging out, users are redirected to the URL specified in CAPLIN.LOGIN redirectUrl.

Type

Boolean

Valid values

true, false

Default value

false

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.

SETTLEMENT_DETAILS_CONFIG

Configures swift payment fields for tag 70 compliance.

The default configuration for SETTLEMENT_DETAILS_CONFIG is defined in the file src/config/settlement-details-config.js and imported into the file src/config/AppConfig.js.

Type

JavaScript object. Each property of the object holds an array of four field description objects. One property, 'Default', is mandatory, and holds the default settings for swift payment fields. All other property names are currency codes and are optional.

{
  Default: [
    <object>,
    <object>,
    <object>,
    <object>
  ],
  <currency>: [
    <object>,
    <object>,
    <object>,
    <object>
  ],
  ...
}

For the specification of the objects in the arrays, see Swift payment field description object.

Default value

{
  Default: [
    {
      label: i18n(`settlementdetailstooltip.label.purposeofpayment`),
      isMandatory: true,
      maxLength: 35,
      isMandatory: false
    },
    {
      label: "",
      isMandatory: false,
      maxLength: 35
    },
    {
      label: "",
      isMandatory: false,
      maxLength: 35
    },
    {
      label: "",
      isMandatory: false,
      maxLength: 35
    }
  ],
  INR: [
    {
      label: i18n(`settlementdetailstooltip.label.beneficiarytelephone`),
      isMandatory: true,
      minLength: 5,
      maxLength: 22
    },
    {
      label: i18n(`settlementdetailstooltip.label.purposeofpayment`),
      isMandatory: true,
      maxLength: defaultLength
    },
    {
      label: "",
      isMandatory: false,
      maxLength: 35
    },
    {
      label: "",
      isMandatory: false,
      maxLength: 35
    }
  ]
}
Swift payment field description object
Property Type Description

label

String

Field label. (Required)

isMandatory

Boolean

Set to true if the user must supply a value for this field.

length

Integer

Constrain field values to a specific number of characters.

minLength

Integer

Constrain field values to a minimum number of characters.

maxLength

Integer

Constrain field values to a maximum number of characters.

numericOnly

Boolean

Constrain field values to numeric values only.

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.EXPIRY.MONTHS

The number of months for which a user’s acceptance of your T&Cs is valid. After a user’s acceptance expires, the user must re-accept your T&Cs at their next login to continue using FX Corporate.

If TERMSANDCONDITIONS.EXPIRY.MONTHS is unset (the default), or set to 0, users' acceptance of T&Cs does not expire.

Regardless of the value of TERMSANDCONDITIONS.EXPIRY.MONTHS, users will be prompted to re-accept your T&Cs if you increment the T&C version number.

The effective expiry date is calculated by adding the specified number of months to the date of the user’s acceptance. If the end month has fewer days than the day-of-month of the user’s acceptance, then the expiry date is set to the final day of the end month. For example, if a user accepts T&Cs on 30 January 2018 and TERMSANDCONDITIONS.EXPIRY.MONTHS is set to 1, then the user’s acceptance expires on 28 February 2018.

Type

Integer

Valid values

Positive integer. 0 disables the feature.

Default value

not set

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'

Set to true to enable protection against cross-site request forgeries (often abbreviated to XSRF or CSRF).

When enabled, FX Corporate reads a cookie (XSRF.COOKIE.NAME) set by FX Corporate’s web application server. FX Corporate then includes the value of this cookie in an HTTP header (XSRF.HEADER.NAME) with every request to the web application server.

Type

Boolean

Default value

false

The name of the XSRF cookie. See XSRF.COOKIE.ENABLED.

Type

String

Default value

XSRF-TOKEN

XSRF.HEADER.NAME

The name of the custom HTTP header used to include the XSRF token with client requests. See XSRF.COOKIE.ENABLED.

Type

String

Default value

X-XSRF-TOKEN