General rules

Considerations

It is an absolute load, so bear in mind these considerations:

  • If there is any problem with the file or its data then the load is cancelled and no rules are modified.
  • If a rule is not referenced on the file then its value is not modified (only rules explicitly referenced on the file are affected).
  • If you want to set the default value of a rule you just have to delete that rule.


Specifications

  • File name: Rules_GeneralRules.csv.

  • Each line represents a unique temporary pricing rule and contains all the information (fields) about it.

  • The first line is not a header line: it contains data directly.

  • Inside a line, by default fields and subfields are separated using the characters #, | and ;. None of these characters can’t be used inside data because fields and subfields would be gathered in a wrong way.

  • The data of the fields is not encapsulated by " or any other character: the information must be included directly.

  • Any blank line will be skipped.

  • The file and its data have to be encoded using UTF-8. Otherwise there can be stored strange characters.

  • If a field is mandatory then it has to be present in each line, even if it has no data: its used position cannot be omitted. If mandatory then we have to see if its data is mandatory or not.

  • If a field is not mandatory but we want to set it then all previous fields must be present: if any previous field is not mandatory and we don’t want to set a value we will have to include it with no value. We need it this way as it is used the field position to map it to the target data.

  • If a field’s data is not mandatory and we don’t want to set it then we just keep it empty: i.e. …##…

  • If a field’s data is mandatory then we have to set something (no value is not admitted).


The fields are separated by #. And if a field is a list of values it also has its values separated by ;.


Case Example Description
Field without data …##… We have the separator # and nothing inside.
Field directly with data and no lists …#12#… It is just the value 12.
Field with a list of elements …#AS;XF;TR#… Its value is a list and its elements are separated with ; (“AS”, “XF” and “TR”).


Data Line fields

Position Mandatory Field Mandatory Data Type Description/Value
0 Yes Yes enumeration Defines the rule type we want to operate with. It may be one of the following values:
  • COM: Comission/Markup. To define a comission to a set of agencies
  • DEF_MAR: Default/Fixed Market. To define a default/fixed market to a set of agencies
  • SEL_REL: Selling Release. To define a selling release to a set of agencies.
  • RATE: Rate Type. To define the rate type filter to a set of agencies
  • CLO_REL: Closing Release. To define a closing release to a set of agencies.
  • FIL_NRF: Filter NRF. To define the NRF/RF filter to a set of agencies.
  • ALW_CUR: Allowed Currencies. To define a list of allowed currencies to a set of agencies.
  • FRC_CUR: Force Currency. To define if the currency on the RQ has to be forced to a set of agencies.
  • FIL_BIND: Filter Binding. To define the binding filter to a set of agencies.
  • CUR_EXC: Allow Currency Exchange. To define if currency exchange is allowed or not, and to define a set of currencies to accomplish.
  • ADD_MRK_PRC: Add Markup to Pricing. To define if we add the markup to the price after the pricing rules.
  • MAX_TQ: Max Time to Quote. To define the maximum amount of minutes between Availability and Quote.
  • MAX_TB: Max Time to Book. To define the maximum amount of minutes between Quote and Book.
  • MIN_COM: Minimum Selling Pricing Rules: To define a Minimum Selling Price and how to act in sellings with lower pricing. It can choosen to set the Minimum Selling Price value or to discard the selling.
1 Yes Yes enumeration Defines the type of operation that will be done with the rule.
  • U: Update. Updates the rule’s current value removing any previous definition.
  • D: Delete. Removes the rule’s current value and sets it to its default value
2 Yes Yes/- complex Value to set to the rule.
  • This field’s data is mandatory if we want to update the value of a rule (if not then an error will be generated).
  • This field must be empty If we want to delete a rule (if not then an error will be generated).
Note: Depending on the type of rule that is applied, this list can contain a different number of elements. Also, depending on the type of rule, the content of the values can be different. Check the table *Rules to know the available values for this field.
3 Yes Yes enumeration Defines if the rule is applied in general (affecting all agencies) or only for a list of concrete agencies.
  • GEN = in general (the rule will be set on the general settings and will affect all agencies).
  • LIST = a list of concrete agencies (the rule will be set only to these agencies).
Not all rules can be set always as GEN and as LIST, it depends on the rule type. All rules can be a LIST, and rules that can be a GEN are: ADD_MRK_PRC, MAX_TQ, MAX_TB, MIN_COM.
4 Yes/- Yes list of strings List of agencies for which the rule is applied, separated with “;”.
  • ****:
  • If the operation is defined for a list of agencies then this field must contain a list (it can not be empty).
  • If the operation is defined in general then this field must be empty.

Apendix: Rules table

Rule Type Values
COM Decimal value.
DEF_MAR String value. It is the market.
SEL_REL Integer value.
RATE Integer value that has to be one of the folllowing:
  • 0 = All (no filter)
  • 1 = Only B2B rates
  • 2 = Only B2C rates
CLO_REL Integer value.
FIL_NRF Integer value that has to be one of the folllowing:
  • 0 = = All (no filter)
  • 1 = Only NRF
  • 2 = Only RF
ALW_CUR List of string, separated with “;”. It is a list of currencies (at least one).
FRC_CUR Boolean value (true/false).
FIL_BIND Integer value that has to be one of the folllowing:
  • 0 = All (no filter)
  • 1 = Only binding prices
  • 2 = Only not binding prices
CUR_EXC Complex value: See Apendix CUR_EXC
ADD_MRK_PRC Values when set for agencies:
  • -1: Add markup to pricing
  • 0: Use general definition (default value)
  • 1: Do not add markup to pricing
Values when set in general:
  • -1: Add markup to pricing (default value)
  • 1: Do not add markup to pricing
MAX_TQ Values when set for agencies:
  • -1: Not limit
  • 0: Use organization limit (default value)
  • >0: Defines the limit (integer, represents minutes).
Values when set in general:
  • -1: No limit (default value)
  • >0: Defines the limit (integer, represents minutes).
MAX_TB Values when set for agencies:
  • -1: No limit
  • 0: Use organization limit (default value)
  • >0: Defines the limit (integer, represents minutes).
Values when set in general:
  • -1: No limit (default value)
  • >0: Defines the limit (integer, represents minutes).
MIN_COM Complex value: it is composed of a Type and a Value separated with ‘;’. Type values when set for agencies:
  • -1: Use Organization Setting (only for agencies)
  • 0: Do not set minimum
  • 1: Define minimum and discard selling with lower pricing
  • 2: Define a minimum and apply it for sellings with lower pricing
Type values when set in general:
  • 0: Do not set minimum
  • 1: Define minimum and discard selling with lower pricing
  • 2: Define a minimum and apply it for sellings with lower pricing
Value (for agencies and in general): It is a decimal. Example of line: MIN_COM#U#2;5.2 Type 2 and it is set a minimum of 5.2

Apendix: CUR_EXC

The value to set (field position 2) for the CUR_EXC rule is a complex one. Tt is composed of 3 items:

  • A type, to allow or not the currency exchange.
  • A list of currencies.
  • A list of countries with a sublist of currencies.

This field includes information about these items (subfields) using “|” as separator.

Each subfields has the following format:

Subfield Position Mandatory subfield Mandatory Data Type Description/Value
0 Yes Yes int Indicates if currency exchange is allowed or not, with the following values.
  • 0 = Allow any currency exchange. (we don’t have to add the following subfields)
  • 1 = Do not allow exchange and apply filters (we have to add the following subfields)
  • 2 = Allow currency exchange but only to the given currencies (we have to add the following subfields)
1 No No list List of admitted currencies. Example: 1
2 No No list List of countries and their admitted currencies. Example: 2


Examples of complete lines:

  • Exchange is allowed CUR_EXC#U#0#LIST#Agency1;Agency2
  • Exchange is not allowed and only have a general list of currencies CUR_EXC#U#1|*;GBP;USD#LIST#Agency1;Agency2
  • Exchange is not allowed and we have currencies by country CUR_EXC#U#1|*;GBP;USD|ES;EUR#LIST#Agency1;Agency2
  • Exchange is allowed and only have a general list of currencies CUR_EXC#U#2|*;GBP;USD#LIST#Agency1;Agency2
  • Exchange is allowed and we have currencies by country CUR_EXC#U#2|*;GBP;USD|ES;EUR#LIST#Agency1;Agency2