Changes

Jump to navigation Jump to search

FastSearch - the Transfer of Parameters to the Search Form

19,738 bytes added, 22:48, 11 December 2020
Created page with " FastSearch in Websky is a feature of the Websky online booking system that allows you to redirect users to a page with already filled in search parameters or directly to the..."

FastSearch in Websky is a feature of the Websky online booking system that allows you to redirect users to a page with already filled in search parameters or directly to the actual search results.

==Purpose==
The function automatically fills in the search form and starts the search process.

== Examples of usage ==
Generating links for banners or special offers for customers; such links will lead user to the [[Search form (Air tickets)| search form]] with filled in search parameters: departure and destination, date, number and types of passengers and other parameters. You can also start the [[Search (Airline tickets)|search]] process according to the set parameters.

== Working principle ==
To use Fast Search, enable the option of the same name under settings ''''Site Management → Domains and Protocols → Enable FastSearch feature (transfer of search parameters)'''.
A Fast Search request consists of ''parameters'' and their ''values'', which are entered in a certain order in the link.

==Fast Search for Frontend 1.0==

'''Attention!''' The instructions below are only valid for old design themes! For design themes inherited from the wurst theme, see subsection "Fast Search for Frontend 2.0" of this article! <br>
When using Frontend 1.0 the link looks like this:

<pre>http://SITENAME/?trip_type=OW&out_iata=MOW&in_iata=BER&departure_date=21.10.2009&adults=1&children=0&input_vendors=SU,PS&param_by_get=on</pre>

Variable names are the same as field names on the search form.

*Variable names must satisfy the constraints from the corresponding search form settings. For example, if you can search up to 270 days in advance according to the settings, this limitation will also apply to FastSearch.
*It is recommended not to include variables that suppose ''true'' as a value in your query.
*To redirect user ''''' to form with filled in search parameters''''', add get-param '''&param_by_get=on''' at the end of query, otherwise standard search form field presets will work.
*To send the user directly to ''''' search results''''', add the get-parameter '''&fast_search=on''.

=== Examples ===
{| class="wikitable mw-collapsible mw-collapsed" style="width: 1000px;"
! style="text-align:left;"| One way route
|-
|
Direct one way itinerary from Moscow to Paris for two adults with departure on 25.10.2016
* '''''Request fills out a search form'''''
<syntaxhighlight lang="text" enclose="div" style="font-size:9pt;background: #F9F9F9F9; border: 1px dashed #2F6FAB; padding: 10px 5px; margin: 10px 0;">
http://SITENAME/?trip_type=OW&out_iata=MOW&in_iata=PAR&departure_date=25.10.2016&direct=true&adults=2&param_by_get=on
</syntaxhighlight>
* '''''Request starts the search process'''''
<syntaxhighlight lang="text" enclose="div" style="font-size:9pt;background: #F9F9F9F9; border: 1px dashed #2F6FAB; padding: 10px 5px; margin: 10px 0;">http://SITENAME/?trip_type=OW&out_iata=MOW&in_iata=PAR&departure_date=25.10.2016&direct=true&adults=2&param_by_get=on&fast_search=on
</syntaxhighlight>

Translated with www.DeepL.com/Translator (free version)


<!-- {| class="wikitable"
|-
|[[Файл:FS1Маршрут в одну сторону.png]]
|-
|Маршрут в одну сторону
|}
|}-->

{| class="wikitable mw-collapsible mw-collapsed" style="width: 1000px;"
! style="text-align:left;"| Round-trip route
|-
|
Round-trip itinerary Moscow - Paris - Moscow in economy class for two adults and an infant
* '''''Request fills in the search form'''''
<syntaxhighlight lang="text" enclose="div" style="font-size:9pt;background: #F9F9F9; border: 1px dashed #2F6FAB; padding: 10px 5px; margin: 10px 0;">
http://SITENAME/?trip_type=RT&out_iata=MOW&in_iata=PAR&departure_date=25.10.2016&back_departure_date=27.10.2016&class=econom&adults=2&infants=1&param_by_get=on
</syntaxhighlight>
* '''''Request starts the search process'''''
<syntaxhighlight lang="text" enclose="div" style="font-size:9pt;background: #F9F9F9F9; border: 1px dashed #2F6FAB; padding: 10px 5px; margin: 10px 0;">http://SITENAME/?trip_type=RT&out_iata=MOW&in_iata=PAR&departure_date=25.10.2016&back_departure_date=27.10.2016&class=econom&adults=2&infants=1&param_by_get=on&fast_search=on
</syntaxhighlight>

<!--{| class="wikitable"
|-
|[[File:FS1Itinerary round trip.png]]
|-
|-[[FS1Fax round trip itinerary]]] ---[[File:FS1Faxyntaxhighlight]]
|}
|}-->

{| class="wikitable mw-collapsible mw-collapsed" style="width: 1000px;"
! style="text-align:left;"| Complex route
|-
|
Complex route for one adult from Moscow to Paris with departure 25.10.2016, from Paris to St. Petersburg with departure 26.10.2016, from St. Petersburg to Moscow, with departure 29.10.2016.
* '''''Request fills in the search form'''''
<syntaxhighlight lang="text" enclose="div" style="font-size:9pt;background: #F9F9F9F9; border: 1px dashed #2F6FAB; padding: 10px 5px; margin: 10px 0;">
http://SITENAME/?trip_type=CR&cr_iata[0]=MOW&cr_back_iata[0]=PAR&cr_date[0]=25.10.2016&cr_iata[1]=PAR&cr_back_iata[1]=LED&cr_date[1]=26. 10.2016&cr_iata[2]=LED&cr_back_iata[2]=MOW&cr_date[2]=29.10.2016&adults=1&param_by_get=on
</syntaxhighlight>
* '''''Request launches search process'''''
<syntaxhighlight lang="text" enclose="div" style="font-size:9pt;background: #F9F9F9F9; border: 1px dashed #2F6FAB; padding: 10px 5px; margin: 10px 0;">http://SITENAME/? trip_type=CR&cr_iata[0]=MOW&cr_back_iata[0]=PAR&cr_date[0]=25.10.2016&cr_iata[1]=PAR&cr_back_iata[1]=LED&cr_date[1]=26. 10.2016&cr_iata[2]=LED&cr_back_iata[2]=MOW&cr_date[2]=29.10.2016&adults=1&param_by_get=on&fast_search=on
</syntaxhighlight>

<!--{| class="wikitable"
|-
|[[Файл:FS1сложный маршрут.png]]
|-
|Сложный маршрут
|}
|}-->

=== Request Parameters ===
==== Route "One-way" or "Round trip" ====
{| class="wikitable mw-collapsible mw-collapsed" style="width: 800px;"
!colspan="3" style="text-align:left;"| Query parameters for one-way and round-trip itinerary searches
|-
! scope="col" width="300" | Element
! scope="col" width="250" | Variable
! scope="col" width="250" | Allowable values
|-
| Trip type
| trip_type
| style="padding: 0;" |

{| style="width: 257px; height: 100%; margin: -1px;" class="wikitable"
|-
| width="80" | OW
| One way
|-
| RT
| Round trip
|-
| CR
| Complex route
|}

|-
| Departure point
| out_iata
| style="padding: 0;" |

{| style="width: 257px; height: 100%; margin: -1px;" class="wikitable"
|-
| width="80" | MOW
| IATA airport code
|}

|-
| Arrival point
| in_iata
| style="padding: 0;" |

{| style="width: 257px; height: 100%; margin: -1px;" class="wikitable"
|-
| width="80" | LED
| IATA airport code
|}

|-
| Departure date
| departure_date
| style="padding: 0;" |

{| style="width: 257px; height: 100%; margin: -1px;" class="wikitable"
|-
| width="80" |- 10/25/2013
|Date in the format dd.mm.yyyy
|}

|-
| Date of return flight
| back_departure_date
| style="padding: 0;" |

{| style="width: 257px; height: 100%; margin: -1px;" class="wikitable"
|-
| width="80" |- 10/27/2013
|Date in the format dd.mm.yyyy
|}

|-
| Departure time
| prefered_departure_type
| style="padding: 0;" |

{| style="width: 257px; height: 100%; margin: -1px;" class="wikitable"
|-
|| width="80" |- not_important
|Any time
|-
|morning
|In the morning
|-
|afternoon
| In the afternoon
|-
|evening
|In the evening
|-
|night
|In the night
|}

|-
|Return flight time
| prefered_back_departure_type
| style="padding: 0;" |

{| style="width: 257px; height: 100%; margin: -1px;" class="wikitable"
|-
|width="80" | not_important
|Any time
|-
|morning
|In the morning
|-
|afternoon
| In the afternoon
|-
|evening
|Evening
|-
|night
|In the night
|}

|-
| Search only among direct flights ("No transfer")
| direct
| true
|}

{| class="wikitable mw-collapsible mw-collapsed" style="width: 800px;"
!colspan="3" style="text-align:left;"| Optional request parameters for one-way and round-trip route searches
|-
! scope="col" width="300" | Element
! scope="col" width="250" | Variable
! scope="col" width="250" | Allowable values
|-
|- lower price limit by default
| money_from
| style="padding: 0;" |

{| style="width: 257px; height: 100%; margin: -1px;" class="wikitable"
|-
|width="80" | 0
| Integer number greater or equal to 0
|}

|-
| Upper limitation to the default price
| money_to
| style="padding: 0;" |

{| style="width: 257px; height: 100%; margin: -1px;" class="wikitable"
|-
| width="80" | 10000
| Integer number greater than 0
|}

|-
| Search for nearest dates
| district_date
| true
|-
| Range of neighboring dates +(-) [days]
| date_range
| style="padding: 0;" |

{| style="width: 257px; height: 100%; margin: -1px;" class="wikitable"
|-
| width="80" |- 1
| An integer greater than [1...3]
|}

|-
| Search for nearby airports
| district_airport
| true
|-
| Service class
| class
| style="padding: 0;" |

{| style="width: 257px; height: 100%; margin: -1px;" class="wikitable"
|-
| econom
| Economy class flight
|-
| business
| Business class flight
|-
| first
| First class flight
|}

|-
| Filter by airline
| input_vendors
| style="padding: 0;" |

{| style="width: 257px; height: 100%; margin: -1px;" class="wikitable"
|-
| width="80" | SU,PS
| IATA airline codes, separated by commas without spaces
|}

|-
| Sorting
| sort
| style="padding: 0;" |

{| style="width: 257px; height: 100%; margin: -1px;" class="wikitable"
|-
| width="80" | price
| By price
|-
| out_date
| On schedule
|-
|- company
| By airline
|-
| fltduration
| By flight length
|}
|}

==== Complex route ====
'''Attention!''' These variables only apply to the complex route (trip_type&#61;CR).

{| class="wikitable mw-collapsible mw-collapsed" style="width: 800px;"
!colspan="4" style="text-align:left;"| Request parameters for complex route search
|-
! scope="col" width="300" |Element
! scope="col" width="250" | Variable
! scope="col" width="250" colspan="2" | Allowable values
|-
| Departure points
|- cr_iata[0]<br/>
cr_iata[1]<br/>
...<br/>
cr_iata[8]
| width="80" | MOW
| IATA airport code
|-
| Arrival points
| cr_back_iata[0]<br/>
cr_back_iata[1]<br/>
...<br/>
cr_back_iata[8]
| width="80" | LED
| IATA airport code
|-
| Departure date
| cr_date[0]<br/>
cr_date[1]<br/>
...<br/>
cr_date[8]
| width="80" | 25.10.2013
| Date in the format dd.m.yyyy
|-
| Departure time
| cr_pref_departure[0]<br/>
cr_pref_departure[1]<br/>.
...<br/>
cr_pref_departure[8]
| colspan="2" style="padding: 0;"|

{| style="width: 257px; height: 100%; margin: -1px;" class="wikitable"
|-
| width="80" | not_important
| Any time
|-
| morning
| In the morning
|-
| afternoon
| In the afternoon
|-
| evening
|In the evening
|-
|- night
| In the night
|}

|-
| Service class
| cr_class[0]<br/>
cr_class[1]<br/>
...<br/>
cr_class[8]
| colspan="2" style="padding: 0;" |

{| style="width: 257px; height: 100%; margin: -1px;" class="wikitable"
|-
| econom
| Economy class flight
|-
| business
| Business class flight
|-
| first
| First class flight
|}

|-
| Nearest airports (±XX kilometers)
| cr_district_airport[0]<br/>
cr_district_airport[1]<br/>
...<br/>
cr_district_airport[8]
| colspan="2" | true
|}

'''[X]''' - the numbers of individual flights. The numbering starts with 0, which means the first flight.

The maximum number of segments for complex route is defined in Product control → Outdated Settings → Search Restrictions.

==== Passengers ====
{| class="wikitable mw-collapsible mw-collapsed" style="width: 800px;"
!colspan="3" style="text-align:left;"| Options for specifying passengers in the search request
|-
! scope="col" width="300" |Element
! scope="col" width="250" |Variable
! scope="col" width="250" | Allowable values
|-
| Adults from 12 years old
| adults
| style="padding: 0;" |

{| style="width: 257px; height: 100%; margin: -1px;" class="wikitable"
|-
| Integer number greater or equal to 0
|}

|-
|Children from 2 to 12 years old
| children
| style="padding: 0;" |

{| style="width: 257px; height: 100%; margin: -1px;" class="wikitable"
|-
| Integer number greater or equal to 0
|}

|-
|Infants under 2 years old
| infants
| style="padding: 0;" |

{| style="width: 257px; height: 100%; margin: -1px;" class="wikitable"
|-
| Integer number greater or equal to 0
|}

|-
| Infants with seat up to 2 years old
| infants_seat
| style="padding: 0;" |

{| style="width: 257px; height: 100%; margin: -1px;" class="wikitable"
|-
| Integer number greater or equal to 0
|}

|-
| Youth 12 to 24 years old <br/>
| youths
| style="padding: 0;" |

{| style="width: 257px; height: 100%; margin: -1px;" class="wikitable"
|-
| Integer number greater or equal to 0
|}

|-
| Seniors age 65 and over
| seniors
| style="padding: 0;" |

{| style="width: 257px; height: 100%; margin: -1px;" class="wikitable"
|-
| Integer number greater or equal to 0
|}

|}

==Fast Search for Frontend 2.0==

=== Request parameters ===
When using Frontend 2.0, the following variables are available for the link:
Parameters in the table are given in the order in which they should follow in the request.
{| class="wikitable" style="width: 800px;"
!colspan="3" style="text-align:left;"| Parameters for specifying passengers in a search request
|-
! scope="col" width="300" |Element
! scope="col" width="250" | Entry format
! scope="col" width="250" | Allowable values
|-
| rowspan="2" | Departure point || rowspan="2" | three-letter '''IATA code''' || MOW
|-
|LED
|-
|rowspan="2"|Airport arrival point || rowspan="2"|The 3-letter '''IATA code''' of the airport || IEV
|-
|MOW
|-
|| rowspan="2" || Departure date in the format '''YYYYYMMDD''' || 20160818
|-
|'''dX''', where ''X'' is the offset of the departure date from the current date. A non-negative number. || d7
|-
||rowspan="3"| Passenger types and their quantity ||rowspan="3"|The three-letter '''type code''' of the passenger (ADT,CLD,INF,INS,YTH,SRC) with the quantity || ADT2
|-
|ADT2INF2
|-
|ADT3INS1CLD2SRC1
|-
| Search only for direct flights || Command || -direct
|-
| Search only by nearest dates || Command || -vicinityDates
|-
|rowspan="3"| Class|| rowspan="3"| Flight class name (Economy, Business, First) || -class=Economy
|-
| -class=Business
|-
| -class=First
|-
| Currency || Three-letter '''currency code''' (USD, EUR, RUB) || -ccCurrency=USD
|-
| Search process start. If the parameter is not specified, the parameters will be inserted in the search form, but the search process will not be started || -GO
|-
| Disabling redirect || Command. Allows to disable the redirect to another domain for FastSearch links with enabled "Redirect specified pages to another domain" setting. If it is not set, the redirect will be handled as in the "Redirect specified pages to another domain" setting| ?noredirect=1
|}

'''Note.''' If it is necessary to pass parameters to the form without the dates of departure-arrival, leaving the date fields empty, you can substitute 8 zeros instead of specific dates, for example: /search/MOWMAD00000000ADT1-class=Economy. Then the user will choose the date himself, and the other passed parameters will be filled.

===Examples===
{| class="wikitable mw-collapsible mw-collapsed
| '''One way route'''
|-
|
Direct one-way economy class itineraries from Moscow to Paris departing February 18, 2016 for three adults, two children and one infant with seat search by the nearest dates.
* '''''Request fills in the search form'''''
<pre>http://SITENAME/search/MOWPAR20160218ADT3INS1CLD2-direct-vicinityDates-class=Economy</pre>

* '''''Request starts the search process'''''
<pre>http://SITENAME/search/MOWPAR20160218ADT3INS1CLD2-direct-vicinityDates-class=Economy-GO</pre>

<!--{| class="wikitable"
|-
|-[[[File:FS2Mroute one way.png]]
|-
|-[Search form automatically populated with Fast Search query
|}-->

<!--{| class="wikitable"
|-
|-]][[[File:FS2Mar Route One Way Passengers.png]]
|-
|-[[Passengers form, automatically filled in with Fast Search query
|}
|}-->

{| class="wikitable mw-collapsible mw-collapsed
|- '''Round trip itinerary'''
|-
|
Business class itinerary from Moscow to Berlin with departure in 10 days from the current date and back in 20 days from the current date for two adults.

* '''''Request fills in the search form'''''
<pre>http://SITENAME/search/MOWBERd10BERMOWd20ADT2-class=Business</pre>.

* '''''Questionnaire starts the search process'''''
<pre>http://SITENAME/search/MOWBER20160218d10BERMOW20160222d20ADT2-class=Business-GO</pre>

<!--{| class="wikitable"
|-
|-[[[File:FS2Itinerary round trip.png]]
|-
|-[Search form automatically filled out with Fast Search query
|}
|}-->

{| class="wikitable mw-collapsible mw-collapsed
|- '''Complex route'''
|-
|
Itinerary from Kiev to Peshevar with departure 10.07.2016, from Peshevar to Moscow with departure 18.07.2016, from Moscow to Paris, with departure 19.07.2016 for one adult.

* '''''Request fills in the search form'''''
<pre>http://SITENAME/search/IEVPEW20150710PEWMOW20150718MOWPAR20150719ADT1</pre>

* '''''Request launches the search process'''''
<pre>http://SITENAME/search/IEVPEW20150710PEWMOW20150718MOWPAR20150719ADT1-GO</pre>

<!--{| class="wikitable"
|-
|[[[File:FS2complex route.png]]
|-
|-[[Fast Search query form automatically filled in
|}
|}-->

== Interaction between Fast Search and the metrics module ==
<!--[[[File:Jump source in service information.png|thumb|250px|right|Display jump source in service information.]]-->
In order to fix the source of the link which was used by the user you must pass additional parameter at the end of the request:
<syntaxhighlight lang="text" style="font-size:9pt;background: #F9F9F9F9; border: 1px dashed #2F6FAB; padding: 10px 5px; margin: 10px 0;">?utm_source=source_alias</syntaxhighlight>
where '''source_alias''' is the alias of the transition source of the metrics module.

Information about source of transition is displayed in [[System Logs| logs]] and on the order page in service information.

=== Example of Fast Search for Frontend 1.0 ===
{| class="wikitable mw-collapsible mw-collapsed"
! style="text-align:left;"| Fast Search request for Frontend 1.0 including metrics module transition source
|-
|
One way itinerary without transfer for one adult from Moscow to Paris with departure 25.10.2016 (taking into account metrics module transfer source).

* '''''Request fills in the search form'''''
<syntaxhighlight lang="text" enclose="div" style="font-size:9pt;background: #F9F9F9F9; border: 1px dashed #2F6FAB; padding: 10px 5px; margin: 10px 0;">
http://SITENAME/?trip_type=OW&out_iata=MOW&in_iata=PAR&departure_date=25.10.2016&direct=true&adults=2&param_by_get=on&utm_source=source_alias
</syntaxhighlight>

* '''''Request starts the search process'''''
<syntaxhighlight lang="text" enclose="div" style="font-size:9pt;background: #F9F9F9; border: 1px dashed #2F6FAB; padding: 10px 5px; margin: 10px 0;">
http://SITENAME/?trip_type=OW&out_iata=MOW&in_iata=PAR&departure_date=25.10.2016&direct=true&adults=2&param_by_get=on&fast_search=on&utm_source=source_alias
</syntaxhighlight>
|}

====Fast Search example for Frontend 2.0===
{| class="wikitable mw-collapsible mw-collapsed"
! Fast Search request for Frontend 2.0 considering source of metrics module
|-
|
Direct one way economy class itineraries from Moscow to Paris with departure 18.02.2016 for three adults, two children and one infant with seat, searched by the nearest dates (taking into account metric module transition source).

* '''''Request fills in the search form'''''
<pre>http://SITENAME/search/MOWPAR20160918ADT3INS1CLD2-vicinityDates-class=Economy?ccCurrency=USD&utm_source=source_alias</pre>

* '''''Request starts the search process'''''
<pre>http://SITENAME/search/MOWPAR20171218ADT1-vicinityDates-class=Economy-GO?ccCurrency=USD&utm_source=source_alias</pre>
|}

== See also ==
*[[Search (Air tickets)]]
*[[Route type]]
*[[Metrics module]]
*[[Search form (Air tickets)]]
333
edits

Navigation menu