Pre-fill form through URL parameters
You can pre-fill the purchase funnel form through URL parameters so when users arrive at the form, some steps of the form will be pre-populated and will not be shown.
Users will be taken straight from the home page to the product selection page and skip trip and traveler details forms.
Build your pre-fill URL
A pre-fill URL has the following format:
https://<Your company name>.funnel.hikoala.co?payload=<Base64-encoded compressed JSON-stringified payload>
To build the payload, follow these steps:
- Build an object matching the payload schema described below
- JSON-stringify the object
- Compress the JSON string using GZIP
- Encode the result as Base64.
Note: If you use a Base64 encoding that produces non URL-safe characters, make sure you URL-encode the result when you build the URL.
Payload schema
Example
The following pre-fill URL:
https://demo.funnel.hikoala.co?payload=H4sIAHwhrWQAA5VS204bMRD9lZWfd6NxSNqyT2035KFCaRUlrVTEg1kPG4PXDr4gRVH%2Bij%2Fgx5hJAAkQQrzZZ87MOXPZigvvr43rJiqhqMUQhkcVfK0kLCTUI6gBBgDwX5RPxFnuLzAQdTr7t2z%2BnEgKtTkEdO2G0JPlfA%2FE5HumkYAJaaUVB%2BXxMVQwruSYONgrYwm88is30B6%2FdwwMWt9T8NKEmGaqZ0%2B%2FiECQVa7LqmPkMlRTlrHqmTTxKHalSEHdosUQRX22FcSeUxbHf0yWp4v3Cr%2BoUoqA0WjqBxufXQqbxmsOkuSu%2FLioclzjM0XP2bdZHzzHpDaP7rWmJHpvhTUOJbGb%2B7uExe%2BMMZVFs8J%2BUGiMxU%2BazU3GlDCS0trH1B6qH41GY%2BB9vNYkg75V1iRey1%2BjOC9gZ7yj%2FylPGrVvi7nPMRprCabhukM%2FjerXdAjF1PrE2pg5m3yH9OKKvlXw5c0VodOvSHK4kMMaxs8knseVz8HhfhD0WwfTUsr27aGpnjsTtQTYcd4trX7fhNw9AEUho4XbAgAA
Contains the payload:
{
"bookingDate": "2023-07-10T10:40:00.000Z",
"bookingNumber": "FNWUCPE1",
"currency": "EUR",
"customer": {
"birthday": "1990-05-15",
"email": "john.doe@gmail.com",
"firstName": "John",
"language": "fr-FR",
"lastName": "Doe"
},
"travelers": [
{
"ageRange": "ADULT",
"firstName": "John",
"lastName": "Doe",
"residenceCountryCode": "FR"
},
{
"ageRange": "ADULT",
"firstName": "Jane",
"lastName": "Doe",
"residenceCountryCode": "FR"
}
],
"trips": [
{
"stays": [
{
"address": {
"line1": "Côte Ouest, Chem. des Blanquettes",
"postcode": "34450",
"countryCode": "FR",
"locality": "Vias",
"region": "Languedoc Roussillon"
},
"name": "Camping Flots Bleus",
"startDate": "2023-08-06T10:40:00.000Z",
"endDate": "2023-08-12T12:05:00.000Z"
}
],
"journeys": [],
"price": {
"currency": "EUR",
"amount": 100
}
}
],
"version": 1
}