Trough Booking Manager API, discounts will be presented for each boat individually.
Clients can calculate discounts on its own, by following certain discount rules and their implementation logic.
Sometimes discounts can be hard to interpret, therefore below you will find some discount examples and how to correctly interpret their meaning and how to safely conclude when particular discount will be valid. Additional explanation of discounts can be found in API documentation under section
4. Discount Calculation
Examples of Discounts from Booking Manager API:
Discount no.1 :
<discount id="xy" name="Last minute discount" percentage="15.0" validdatefrom="1970-01-01" validdateto="2125-12-17" sailingdatefrom="2020-07-20" sailingdateto="2020-12-31" includedinbaseprice="0" validdaysfrom="0" validdaysto="604800000" discounttype="3" excludesotherdiscounts="0" affectedbymaximum="0" availableinbase="-1" discountkind="0" priceincurrency="0.0" currency="EUR" freedays="0.0" />
Discount no.2 :
<discount id="xy" name="Last minute discount" percentage="15.0" validdatefrom="1970-01-01" validdateto="2125-12-17" sailingdatefrom="2020-07-20" sailingdateto="2020-12-31" includedinbaseprice="0" validdaysfrom="0" validdaysto="604800000" discounttype="3" excludesotherdiscounts="0" affectedbymaximum="0" availableinbase="-1" discountkind="0" priceincurrency="0.0" currency="EUR" freedays="0.0" />
Discount no.3 :
<discount id="xy" name="Special Discount" percentage="20.0" validdatefrom="1970-01-01" validdateto="2125-07-30" sailingdatefrom="2020-03-02" sailingdateto="2020-04-30" includedinbaseprice="0" validdaysfrom="" validdaysto="" discounttype="2" excludesotherdiscounts="0" affectedbymaximum="1" availableinbase="-1" discountkind="0" priceincurrency="0.0" currency="EUR" freedays="0.0" />
For the first discount (discounttype="0"), you are looking at all parameteres including validdays from/to ( it means that discount is valid from 0-7 days when you recalculate duration from miliseconds to days).
For the discounts type 1 and 2 there is no validdaysfrom/to element filled with data because for these discounts there is sailingdatefrom/to and validdate/from parameters that require validation (besides all other ones but without validdaysfrom/to).
For discount types 1 and 2, validdays from/to are not being validated. Validdays from/to are not applicable for these types of dicounts.
For discounts type 0 and 3,you are validating every element from the response.
FREQUENTLY ASKED QUESTIONS
1. Are "validdaysfrom" and "validdaysto" information recorded in milliseconds timeunit (while the field name seems to be in days)?
Yes, validdaysfrom and validdaysto are recorded in miliseconds.
If the values are validdaysfrom : 1209600000 and validdaysto: 1728000000, it means that discount is applicable for charter duration from 14 to 20 days.
Reservation period means that the discount is valid for a certain period of reservations e.g 01.05.-.01.06. ( it means that a client will get a discount if reservation is made between 01.05. - 01.06).
Service period means that discount will be valid for a certain period of sailing ( e.g. 01.07.-01.08.) ; so client will get a discount if he books a boat for the sailing period 01.07.- 01.08.
2. Are "validdaysfrom" and "validdaysto" information NOT valid in case of discounttype = 1 or discounttype = 2?
Yes, validdaysfrom" and "validdaysto are not valid in case of discounttype = 1 or discounttype = 2
3. For rows having discounttype = 0, is "validdaysfrom" information valid?
Yes, it is valid
4. For rows having discounttype = 0, is "validdaysto" information valid?
Yes, it is valid
5. For rows having discounttype = 3, is "validdaysfrom" information valid?
Yes, it is valid
6. For rows having discounttype = 3, is "validdaysto" information valid?
Yes, it is valid
7. Do the prices always include VAT?
Yes
8. What does "maximumdiscount = 0" mean?
It means that a boat does not have maximum discount set, and it will apply maximum general discount that is presented in getResources in maximumdiscount="xy" flag.
9. Why there are rows of discount entity having discount percentage greater than "maximumdiscount" and affectedbymaximum = 1?
Because discount (value) can be inserted in amount greater than maximum. Eg: you can have 60 % discount inserted , but if the boat has maximum of 20 %, then only 20 % will be applied.
10. What data have to be considered and what is the proper discount calculation when discounttype = 1 - Reservation period (date of request)?
If you have discount of - 20 % that applies from 01.04- 31.05 (reservation period) all the reservations that are made in this period, will have 20 % discount on base price.
11. How to calculate the price if discounts have /do not have subtotals
If discountshavesubtotals is 1, the calculation goes like this:
-
- Original price: 1000
- Discounts: 5% and 10%
- 5% applied to 1000 leaves 950
- 10% applied to 950 leaves 855
- Final price: 855
If discountshavesubtotals is 0, the calculation goes like this:
-
- Original price: 1000
- Discounts: 5% and 10%
- 15% applied to 1000 leaves 850
- Final price: 850
12. Why does my requets fail if I have xmlValues parameter to be sent to web service
Some function require one of the parameter to be sent as xmlValues (getSearchResultsFilter, getSpecialOffers, getResourcesDiscount etc..).
Proper request structure is :
<cbm:in3>
<![CDATA[
<filter>
<element id="datefrom">2020-08-15T00:00:00</element>
<element id="dateto">2020-08-22T00:00:00</element>
<element id="flexibility">1</element>
</filter>
]]>
</cbm:in3>
</cbm:getSearchResultsFilter>
</soapenv:Body>
</soapenv:Envelope>
Note : first 3 elements (long _userId, String _username, String _password,) from the request are always the same (your id, username and password) in all your requests.
You will also notice that with this method (getSearchResultsFilter), you can use flexibility element which gives you more possibilities to search the boat/s availability within whole year (e.g flexibility - 6 – in year).
Comments
0 comments
Please sign in to leave a comment.