Esta página no está disponible actualmente en Español. Si lo necesita, póngase en contacto con el servicio de asistencia de Icon (correo electrónico)

Using the Rules Library

Once imported, the functions from the libraries can be used the same as any other function made using the Rules Designer. They can be accessed from within Decisions, Validations and other Functions.

Example Decision

Add the function library to the top of the file

Import function library

Then each of the functions will be available within the expression fields

Example decision

Available Libraries

Tabla 1. EPCFunctions

Function Name

Inputs

Outputs

Description

validateCharacterSet

string

boolean

Validates that the given identifier or reference meets the EPC character set and rules. Only alphanumeric characters and the special characters /-?:().,'+ and Space are used. Additionally / cannot occur consecutively and cannot be the first or last character.

validateCharacterSetDetailed

string

Outcome(boolean:outcome, string:reason)

Performs the same check as above but additionally returns a description of the issue.

findSEPAZoneFromCountryCode

string

opt<SEPAZoneOutcome(boolean:isEEAorEU,enum:location)>

Checks the given string is a 2-digit country code and performs a lookup on a table of SEPA or EEA/EU codes. If found, the response contains if the code is for a country or territory, and if they are in the EEA/EU. If the code is not found in the table, empty is returned.

findSEPAZoneFromBIC

string

opt<SEPAZoneOutcome(boolean:isEEAorEU,enum:location)>

Performs the same lookup as the above function, but first checks and extracts the country code from the BIC. If the BIC is invalid, empty is returned

findSEPAZoneFromIBAN

string

opt<SEPAZoneOutcome(boolean:isEEAorEU,enum:location)>

Performs the same lookup as the above function, but first checks and extracts the country code from the IBAN. If the IBAN is invalid, empty is returned

checkAddressType

PostalAddress24:address, enum:type

Outcome(boolean:outcome, string:reason)

Validates the given address is of the expected type(Structured, Unstructured or Hybrid). If invalid, the reason for failure is returned.

determineAddressType

PostalAddress24:address

Outcome(boolean:outcome,string:reason)

Validates the given address is of one of the expected type(Structured, Unstructured or Hybrid). If the address is of a valid structure, the outcome will be true and its type will be given in the reason field.

Tabla 2. ISOValidators

Function Name

Inputs

Outputs

Description

validateLEI

string

Outcome(boolean:outcome,string:reason)

Validates the given string is of the correct structure for an LEI [A-Z0-9]{18,18}[0-9]{2,2}, and has valid check digits.

validateRFCreditorReference

string

Outcome(boolean:outcome,string:reason)

Validates the given string is of the correct structure for a creditor reference RF[0-9]{2,2}[a-zA-Z0-9]{1,21}, and has valid check digits.

validateIBAN

string

Outcome(boolean:outcome,string:reason)

Validates the given string is of the correct structure for an IBAN [A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}, and has valid check digits.

validateCountryCode

string

CountryCodeOutcome(boolean:outcome CountryCodeDetails(string: alpha3Code, string:numericCode, string:shortName):details)

Checks the given string against a list of active country codes. If found the country’s name, alpha3 code and numeric code are provided.

validateBICCountryCode

string

CountryCodeOutcome(boolean:outcome CountryCodeDetails(string: alpha3Code, string:numericCode, string:shortName):details)

First, validates the given BIC, then checks the extracted code against a list of active country codes. If found the country’s name, alpha3 code and numeric code are provided.

validateIBANCountryCode

string

CountryCodeOutcome(boolean:outcome CountryCodeDetails(string: alpha3Code, string:numericCode, string:shortName):details)

First, validates the given IBAN, then checks the extracted code against a list of active country codes. If found the country’s name, alpha3 code and numeric code are provided.

validateCurrencyCode

string

CurrencyCodeOutcome(boolean:outcome CurrencyCodeDetails(string :currency, string:numericCode, string:minorUnit):details)

Checks the given string against a list of active currency codes. If found the currency’s name, numeric code and minorUnits are provided. Minor units may take the value of a number or N.A..